Token Staking Vaults

Parameterized BRC2.0 staking contracts

What are Token Staking Vaults?

Token staking vaults are isolated BRC2.0 smart contract instances deployed via a Vault Factory. Each vault governs:

  • A specific ERC20-compatible token

  • Minimum and maximum deposit thresholds

  • Block-based lock durations

  • Time-based multipliers (basis points)

  • Amount-based multipliers (basis points)

  • An XP emission rate

All staking positions are recorded as onchain Position structs containing:

  • user

  • amount

  • startBlock

  • endBlock

  • claimed status

circle-info

Settlement and unlock eligibility are determined exclusively by Bitcoin L1 block height progression. No offchain accounting exists.


Vault Deployment Model

Vaults are created through a Factory contract and optionally managed via a Router contract.

Factory Responsibilities

The Vault Factory:

  • Deploys new vault instances

  • Stores vault-to-token mappings

  • Maintains protocol and caller fee parameters

  • Enables vault closure

Vault parameters are immutable once deployed.

Router Responsibilities

The Router:

  • Handles token transfer and approval logic

  • Forwards staking calls to the correct vault

  • Enables batched XP and position queries

  • Can be administratively enabled or disabled

circle-info

The Router does not custody assets beyond transaction forwarding.


Mechanics

Staking is executed via:

The flow:

  1. Tokens are transferred from the user to the Router.

  2. The Router approves the corresponding vault.

  3. The vault creates a new Position for the beneficiary.

Each position defines:

  • startBlock = current block

  • endBlock = startBlock + blocksToStake

Unlock eligibility is calculated deterministically:

No timestamp-based logic is used. All duration logic is block-based.


Multiplier Model

Vaults support two multiplier types:

1) Time Multipliers

Defined as:

If blocksToStake >= minBlocks, the multiplier applies.

Multipliers are expressed in basis points (10000 = 1x).

2) Amount Multipliers

Defined as:

If amount >= minAmount, the multiplier applies.

These multipliers stack according to vault configuration and affect XP accrual.


XP Accrual Model

Each vault defines an xpRate.

XP is accumulated per position according to:

  • Staked amount

  • Lock duration

  • Applicable multipliers

  • Vault XP rate

XP is calculated entirely onchain via:

The system also supports:

  • Aggregated XP across all vaults

  • Vault-specific leaderboards

  • Deterministic ranking via onchain sorting

XP is not manually distributed. It is derived from contract state.


Analytics & State Transparency

Vault analytics are accessible onchain:

All data is derived from contract state. No offchain indexing is required for correctness.


Step-by-Step Guide

1

Connect the wallet holding the tokens

2

Select Vault

Choose the vault corresponding to the token you wish to stake.

3

Review Vault Parameters

Verify:

  • minDeposit

  • maxDeposit

  • Available lock durations

  • Multiplier thresholds

  • XP rate

4

Select Lock Duration

Choose blocksToStake. Multiplier tiers update automatically.

5

Enter Amount

Ensure amount satisfies minDeposit and maxDeposit constraints.

6

Confirm Transaction

The Router transfers tokens and forwards the stake call to the vault.

7

Position Activation

Position becomes active after block confirmation.

8

Monitor XP & Status

Track:

  • Active positions

  • XP accumulation

  • Lock expiration block

9

Release Tokens

After endBlock, call release to withdraw staked tokens.

10

Inscribe Stake Position Onchain (Optional)

After confirming your staking transaction, you may optionally inscribe a staking certificate representing your vault position.

This inscription acts as a cryptographic reference to your staking state and includes:

  • Associated vault contract

  • Staked token

  • Amount committed

  • Lock duration (block-based)

  • Start and end block

  • Linked Taproot address

  • Linked EVM address

The inscription does not custody funds. It serves as a verifiable, Bitcoin-native certificate of participation.

Last updated