Description
Some offerings impose a holder-level lockup (e.g. 12 months from purchase). Add set_holder_lockup(offering_id, holder, lockup_end_ts) enforced by transfer and redemption paths, with structured-error rejection prior to lockup_end.
Requirements and context
- Must be secure, tested, and documented
- Should be efficient and easy to review
- Relevant code:
Revora-Contracts/src/lib.rs
- Claim of accrued revenue must remain allowed during lockup; only share movement is gated
Suggested execution
- Fork the repo and create a branch
git checkout -b feat/holder-lockup-periods
- Implement changes
- Add
Lockups storage map keyed by (offering_id, holder)
- Gate
transfer_with_attestation and request_redemption on now >= lockup_end
- Emit
lockup_set and lockup_block events
- Validate security and correctness assumptions
Test and commit
- Run tests
- Cover edge cases
- lockup_end == now must permit the action
- Include test output and security notes
Example commit message
feat: enforce holder lockup periods on transfer and redemption
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
Some offerings impose a holder-level lockup (e.g. 12 months from purchase). Add
set_holder_lockup(offering_id, holder, lockup_end_ts)enforced by transfer and redemption paths, with structured-error rejection prior to lockup_end.Requirements and context
Revora-Contracts/src/lib.rsSuggested execution
git checkout -b feat/holder-lockup-periodsLockupsstorage map keyed by (offering_id, holder)transfer_with_attestationandrequest_redemptiononnow >= lockup_endlockup_setandlockup_blockeventsTest and commit
cargo test --allExample commit message
feat: enforce holder lockup periods on transfer and redemptionGuidelines