BIO
  • Introduction
    • Overview
    • Concepts
      • Decentralized Science
      • Bio Protocol
      • BioDAOs
        • Operations
        • Deal Flow Process
      • BioAgents
      • IP-Tokens
    • Bio Protocol V1
      • Launchpad
        • Curation
        • Funding
          • Auction
          • Bonding Curve
      • Liquidity Engine
      • bio/acc Rewards
      • BioAgents
    • BIO Token
  • Quick Start Guides
    • Join BioDAO Launches
      • Curate
      • Fund
      • Bridge BIO
      • Provide Liquidity
    • Start a BioDAO
    • Run BioAgents
  • Developers
    • DAO Setup
      • EVM Contracts
        • Token Contract
        • Vesting Contracts
        • Airdrop Contracts
      • Solana Programs
    • Launchpad
      • EVM Contracts
      • Solana Programs
    • Utils
      • TokenLists
      • Scripts
    • Audits
  • Resources
    • Media Kit
      • Bio Media
      • Network Media
    • Terms & Conditions
      • Airdrop: Terms & Conditions
      • BIO Genesis: Terms & Conditions
      • Launchpad: Terms & Conditions
  • Audits
Powered by GitBook
On this page
  • Key Features
  • Contracts
  • TokenVesting Contract
  • TokenVestingMerkle Contract
  • TokenVestingMerklePurchasable Contract
  • Deprecated Contracts
  1. Developers
  2. DAO Setup
  3. EVM Contracts

Vesting Contracts

PreviousToken ContractNextAirdrop Contracts

Last updated 1 month ago

Key Features

  • Flexible Vesting Schedules: Configure start time, cliff period, duration, and release intervals

  • Access Control: Role-based permissions for administrative functions

  • Safety Features: Includes reentrancy protection and pausable functionality

  • Virtual Token: ERC20-compatible representation of vested tokens (non-transferable)

  • Merkle Tree Support: Efficient distribution of vesting schedules

  • Purchase Options: Optional ETH payment for vesting schedule creation

Contracts

TokenVesting Contract

The base vesting contract that implements core vesting functionality and virtual token features.

Features

  • Vesting Schedule Management:

    • Configurable start time, cliff period, and duration

    • Customizable slice periods for gradual token release

    • Optional revocability per schedule

    • Admin controls for schedule management

  • Virtual Token Implementation:

    • ERC20-compatible interface

    • Non-transferable by design

    • Balance represents vested tokens

    • Automatic balance updates on vesting events

  • Access Control:

    • DEFAULT_ADMIN_ROLE: Can manage vesting schedules and contract settings

    • VESTING_CREATOR_ROLE: Can create new vesting schedules

Inheritance

  • OpenZeppelin's AccessControlDefaultAdminRules

  • OpenZeppelin's ReentrancyGuard

  • OpenZeppelin's Pausable

  • IERC20Metadata

Key Functions

  • createVestingSchedule(): Creates new vesting schedules

  • release(): Releases vested tokens to beneficiaries

  • revoke(): Allows admin to revoke revocable schedules

  • withdraw(): Enables admin to withdraw unused tokens

Security Features

  • Reentrancy protection on critical functions

  • Pausable functionality for emergency stops

  • Role-based access control

  • Comprehensive input validation

TokenVestingMerkle Contract

Extends TokenVesting with Merkle tree functionality for efficient schedule distribution.

Features

  • Merkle Tree Integration:

    • Efficient proof verification

    • Prevention of double-claiming

    • Batch schedule distribution support

Inheritance

  • TokenVesting

Key Functions

  • claimSchedule(): Claims vesting schedule using Merkle proof

  • updateMerkleRoot(): Updates the Merkle root

  • scheduleClaimed(): Checks if a schedule has been claimed

TokenVestingMerklePurchasable Contract

Extends TokenVestingMerkle with purchasing capabilities.

Features

  • Purchase Mechanism:

    • ETH payments for vesting schedules

    • Configurable cost per vToken

    • Customizable payment receiver

Inheritance

  • TokenVestingMerkle

Key Functions

  • claimSchedule(): Claims schedule with payment

  • setVTokenCost(): Updates the cost per vToken

  • setPaymentReceiver(): Sets payment receiver address

Deprecated Contracts

Located in src/deprecated/:

MultiTokenVesting

  • Enables querying vesting balances across multiple contracts

  • Supports external vesting contract integration

MultiTokenVestingMerklePurchasable

  • Combines MultiTokenVesting and TokenVestingMerklePurchasable

  • Supports cross-contract schedule verification

GitHub - bio-xyz/vesting-contractsGitHub
Logo