Smart Contract — New Feature
Summary
Schedules can disburse in two ways: a fixed amount each period or a continuous vesting curve. This adds a RecurringKind enum distinguishing the two, defaulting to fixed for the first milestone.
Background
The RecurringPayment struct from the data model work needs a field that distinguishes a fixed-amount-per-period schedule from a linear-vesting schedule. The fixed variant is the primary target for the first implementation; the linear-vesting variant is reserved for future use but the type must be designed now.
What Needs to Be Done
- Add a
RecurringKind enum with a FixedAmountPerPeriod variant and a LinearVesting variant, stored on the RecurringPayment struct.
- Default the kind to
FixedAmountPerPeriod when creating a new schedule.
- Place the enum beside the existing
RecurringStatus definitions.
Acceptance Criteria
Files to Look At
contracts/accord/src/lib.rs — add the enum beside RecurringStatus and add the field to the struct
Difficulty: Medium
Smart Contract — New Feature
Summary
Schedules can disburse in two ways: a fixed amount each period or a continuous vesting curve. This adds a
RecurringKindenum distinguishing the two, defaulting to fixed for the first milestone.Background
The
RecurringPaymentstruct from the data model work needs a field that distinguishes a fixed-amount-per-period schedule from a linear-vesting schedule. The fixed variant is the primary target for the first implementation; the linear-vesting variant is reserved for future use but the type must be designed now.What Needs to Be Done
RecurringKindenum with aFixedAmountPerPeriodvariant and aLinearVestingvariant, stored on theRecurringPaymentstruct.FixedAmountPerPeriodwhen creating a new schedule.RecurringStatusdefinitions.Acceptance Criteria
RecurringKindhasFixedAmountPerPeriodandLinearVestingvariants.RecurringPaymentstruct carries akindfield of this type.FixedAmountPerPeriod.Files to Look At
contracts/accord/src/lib.rs— add the enum besideRecurringStatusand add the field to the structDifficulty: Medium