Skip to main content

VSC-20: Programmable Staking Pools

VSC-20 is a protocol-level standard for creating programmable staking pools on Vexidus. Any token holder can create a staking pool for any VSC-7 fungible token with configurable reward rates, lock periods, and capacity limits.

Unlike validator delegation staking which is limited to VXS, VSC-20 pools are general-purpose -- any project, community, or individual can create one.

Why VSC-20?

  • DeFi infrastructure -- Every L1 needs programmable staking
  • Project incentives -- Token projects can incentivize holding with yield
  • Community pools -- Groups can create staking pools for their members
  • Game economies -- Games can reward players with staking yields on in-game tokens
  • Composable -- VexFi lending/yield protocols can build on top of pools

How It Works

Create a Pool

vexidus staking-pool create \
--stake-token VXS \
--reward-token VXS \
--reward-rate 1000000000 \
--lock-period 2592000 \
--source treasury \
--from <wallet>

Fund the Treasury

For treasury-funded pools (non-inflationary), the creator deposits reward tokens upfront:

vexidus staking-pool fund --pool <id> --amount 1000000000000 --from <wallet>

Stake Tokens

vexidus staking-pool stake --pool <id> --amount 500000000000 --from <wallet>

Claim Rewards

vexidus staking-pool claim --pool <id> --from <wallet>

Pool Configuration

ParameterDescriptionExample
stake_tokenToken users stakeVXS, MSHU, any VSC-7
reward_tokenToken paid as rewardsCan be same or different
reward_rateRewards per day per staked token (raw units)1000000000 = 1 token/day
lock_periodMinimum lock duration in seconds2592000 = 30 days
min_stakeMinimum stake amount1000000000 = 1 token
max_stake_per_userPer-user cap (optional)Prevents whale dominance
max_pool_capacityTotal pool cap (optional)Creates scarcity
start_timeWhen staking opens (optional)Scheduled launches
end_timeWhen pool closes (optional)Seasonal pools

Reward Sources

The pool creator deposits reward tokens upfront. Rewards are distributed from this treasury. The pool pauses when treasury runs dry. The creator can top up at any time.

This is the safe, non-inflationary model. Suitable for most use cases.

Mint

The pool mints new reward tokens as rewards. Requires the pool creator to hold mint authority on the reward token. This is inflationary -- use with caution.

Suitable for: Protocol-level incentive programs where controlled inflation is part of the tokenomics design.

Reward Calculation

Rewards accrue linearly over time:

rewards = staked_amount × reward_rate × time_elapsed / 86400
  • Rewards compound when claimed (claim, then re-stake)
  • Partial unstaking is supported
  • Rewards continue accruing even if not claimed

Security

  • Lock enforcement -- Cannot unstake before the lock period expires
  • Treasury protection -- Treasury pools never distribute more than deposited
  • Mint authority check -- Mint pools verify creator has mint authority
  • Creator limits -- Maximum 10 pools per creator to prevent spam
  • Overflow protection -- All calculations use checked arithmetic

Operations

DiscOperationGasDescription
90CreateStakingPool150,000Create a new pool
91FundStakingPool75,000Deposit reward tokens
92StakeToPool100,000Stake tokens
93UnstakeFromPool100,000Withdraw staked tokens
94ClaimPoolRewards75,000Claim accumulated rewards
95UpdateStakingPool50,000Modify pool settings
96CloseStakingPool100,000Close empty pool

IntentVM Support

Staking operations can be expressed as natural language intents:

"Stake 500 VXS into Cherry Blossom pool"
"Claim my staking rewards"
"Unstake all my MSHU from Torii Domain"

IntentVM resolves pool names to IDs and handles multi-pool operations atomically.

Transaction Cost

~$0.00003 per staking operation at current gas prices. Making micro-staking economically viable -- stake $1 worth of tokens without fees eating the yield.