Skip to main content

Claim and Stake

info

This feature is currently in development and not yet available.

TokenOps ERC20 token vesting contracts with a "claim and stake" feature that allows recipients to seamlessly claim their vested tokens and automatically stake them in a single transaction. This feature includes bonus token rewards for users who choose to stake directly rather than simply claiming, with configurable bonus percentages set by the contract deployer. The system handles both vesting claim fees and staking gas fees in one operation, providing a streamlined experience while maximizing rewards for long-term token holders.

How It Works

The claim and stake feature integrates with external staking contracts to provide a seamless experience for users who want to stake their vested tokens immediately upon claiming.

Architecture Overview

┌─────────────────┐    ┌──────────────────┐    ┌─────────────────┐
│ Vesting User │────│ Vesting Contract │────│ Staking Contract│
│ │ │ │ │ │
│ • Has vested │ │ • Holds tokens │ │ • Stakes tokens │
│ tokens ready │ │ • Calculates │ │ • Manages │
│ • Wants to │ │ claimable │ │ rewards │
│ stake │ │ • Adds bonus │ │ • Tracks │
│ │ │ • Transfers │ │ ownership │
└─────────────────┘ └──────────────────┘ └─────────────────┘

Key Components

  1. Vesting Manager Contract - Manages token vesting schedules and executes claim and stake operations
  2. Staking Contract Interface - External staking contract that receives and stakes tokens
  3. Bonus System - Additional token rewards (Optional) for users who choose to stake instead of claim
  4. Fee Management - Handles both vesting claim fees and staking gas fees

3. Fee Structure

The total fee paid by users consists of:

  • Vesting Claim Fee: Standard fee for claiming vested tokens (if applicable)
  • Staking Gas Fee: Standard fee for the staking operation (if applicable)
// Example fee calculation
uint256 totalFee = vestingClaimFee + stakingFee;
if (msg.value != totalFee) revert("Insufficient fee");

Benefits

For Users

  • Single Transaction: Claim and stake in one operation, saving gas
  • Bonus Rewards: Additional tokens for choosing to stake if set by the protocol
  • Simplified UX: No need to approve tokens or make separate staking transaction

For Protocol

  • Increased Staking: Incentivizes long-term token holding
  • Reduced Selling Pressure: Tokens go directly to staking instead of market
  • Better Token Velocity: Encourages productive use of vested tokens

Configuration Options

Bonus System

  • Bonus Percentage: Configurable percentage (in basis points) of additional tokens
  • Reward Owner: Wallet address that provides the bonus tokens
  • Bonus Calculation: Based on pre-fee claimable amount

Fee Management

  • Vesting Fee Type: Can be gas-based or percentage-based
  • Staking Gas Fee: Fixed fee set in the staking contract for the stake operation
  • Fee Distribution: Collected by the vesting contract's fee collector