Skip to content

Define MIN_INTERVAL_SECS, MAX_INTERVAL_SECS, and MAX_ACTIVE_RECURRING constants with documented rationale #435

Description

@thegreatfeez

Smart Contract — New Feature

Summary

The recurring feature needs well-defined constants for the minimum and maximum interval, and the active schedule cap. This adds them with documented rationale beside the existing validation constants.

Background

The contract in contracts/accord/src/lib.rs already defines validation constants like MIN_AMOUNT and MAX_ACTIVE_PROPOSALS. Recurring schedules need MIN_INTERVAL_SECS, MAX_INTERVAL_SECS, and MAX_ACTIVE_RECURRING with comments explaining why each value was chosen.

What Needs to Be Done

  1. Add MIN_INTERVAL_SECS, MAX_INTERVAL_SECS, and MAX_ACTIVE_RECURRING constants near the existing validation constants.
  2. Write a documentation comment beside each explaining the rationale (e.g. minimum interval prevents spam, maximum interval bounds the payback period, active cap limits storage cost).
  3. Choose sensible defaults that align with the proposal model's existing cap.

Acceptance Criteria

  • The three constants are defined and documented.
  • The rationale for each value is explained in a code comment.
  • The contract compiles with the new constants.

Files to Look At

  • contracts/accord/src/lib.rs — add the constants in the validation constants section

Difficulty: Easy

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions