Skip to content

Add vesting / scheduled token release for RWA investors #8

Description

@Prasiejames

Problem

The RWA token supports mint() and mint_to_investor() for immediate token issuance. Real-world asset deals often require vesting schedules (cliff + linear release) for regulatory compliance or investor lock-ups.

Expected Behavior

A VestingContract that holds tokens and releases them to beneficiaries according to a schedule.

Proposed Solution

Create a new contracts/vesting/ contract:

pub fn create_vesting(
    beneficiary: Address,
    total_amount: i128,
    cliff_duration_ledgers: u32,
    vest_duration_ledgers: u32,
    start_ledger: u32,
) -> u64 /* vesting_id */

pub fn claim_vested(vesting_id: u64) -> i128
pub fn get_vesting_schedule(vesting_id: u64) -> VestingSchedule
pub fn revoke(vesting_id: u64) /* admin only */

The calculation: vested = total * min(1, (current - start) / vest_duration), with nothing before cliff.

Dependencies

  • New contract that holds RWA tokens and transfers on vesting

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions