Skip to content

Add per-jurisdiction transfer cooldown configurable via set_transfer_cooldown #588

Description

@greatest0fallt1me

Description

Some jurisdictions require a cooldown between successive share transfers by the same holder. Add set_transfer_cooldown(offering_id, jurisdiction, cooldown_secs) and enforce it in the transfer path.

Requirements and context

  • Must be secure, tested, and documented
  • Should be efficient and easy to review
  • Relevant code: src/test_transfer_restrictions.rs, src/test_jurisdiction.rs
  • Cooldown state must be persisted per (offering_id, holder)

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feat/transfer-cooldown
  • Implement changes
    • Persist last-transfer timestamp per holder
    • Compare against jurisdiction-specific cooldown
    • Reject early transfer with TransferCooldownActive
  • Validate security and correctness assumptions

Test and commit

  • Run tests
    • cargo test --all
  • Cover edge cases
    • Cooldown exactly elapsed
  • Include test output and security notes

Example commit message

feat: enforce per-jurisdiction transfer cooldown

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Activity

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

Metadata

Metadata

Assignees

Labels

Stellar WaveStellar Wave issue batch

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions