Logo
Registry

vesting

@example

• v1.0.0

Time-locked token vesting protocol with beneficiary management

Token Vesting Protocol

A comprehensive time-locked vesting protocol that enables owners to lock tokens for beneficiaries until specified unlock times. This protocol uses Cardano's TimeLock policy to enforce vesting schedules and provides secure token distribution mechanisms.

Features

  • Time-locked Security: Uses TimeLock policy to enforce vesting schedules
  • Beneficiary Management: Supports designated beneficiaries for token releases
  • Dual Transaction Model: Separate lock and unlock operations
  • Owner Control: Original owners maintain control over locking process
  • Automatic Validation: Built-in time validation for unlock attempts

How It Works

Locking Process (lock transaction)

  1. Token Deposit: Owner specifies quantity and unlock time
  2. State Creation: Creates a State datum with lock details
  3. TimeLock Escrow: Tokens are locked in TimeLock script address
  4. Change Return: Remaining balance returned to owner

Unlocking Process (unlock transaction)

  1. Time Validation: Checks if current time >= lock_until
  2. Beneficiary Verification: Validates beneficiary authorization
  3. Token Release: Transfers locked tokens to beneficiary
  4. State Cleanup: Consumes the locking UTxO

State Structure

State {
  lock_until: Int     // Unix timestamp for unlock time
  owner: Bytes        // Original token owner
  beneficiary: Bytes  // Designated beneficiary
}

Parameters

Lock Transaction

  • quantity: Int - Amount of ADA to lock (in lovelace)
  • until: Int - Unix timestamp when tokens can be unlocked

Unlock Transaction

  • locked_utxo: UtxoRef - Reference to the locked UTxO

Use Cases

  • Employee Compensation: Vesting schedules for team token allocation
  • Investment Agreements: Time-locked investor token releases
  • Milestone Payments: Project-based token distribution
  • Trust Funds: Beneficiary-based inheritance mechanisms
  • Educational Examples: Learn time-lock mechanics and policy usage

This protocol demonstrates advanced UTxO management, time-based constraints, and multi-party token custody patterns in the TX3 ecosystem.

vesting

Published by

@example

Install

trix install example/vesting

Publication datePublished 10 months ago
Back to all Protocols