Vauban Docs
Architecture

Smart Contracts

Smart Contracts

Cairo smart contracts deployed on Starknet.

VaubanDelegationManager

Upgradeable proxy contract that sits between users and Starknet's native delegation pools.

Responsibilities

  • Handles ERC20 token transfers from users
  • Delegates to Starknet native pools (STRK pool, BTC pool)
  • Tracks individual user positions per token
  • Implements fee collection (5% on claims, 0% on restaking)
  • Epoch-based withdrawal batching (24h collection + 7d unbonding)

Centralized Delegation Model

VaubanManager enters each pool once as a single pool_member, then aggregates user stakes:

User A stakes 100 STRK ─┐
User B stakes 200 STRK ─┤── VaubanManager (single pool_member) ──> STRK Pool
User C stakes 50 STRK  ─┘

This reduces commission from 10% per user to 10% total, split across all users.

Key Functions

FunctionDescription
enter_pool(token, amount, reward_address)First-time delegation
add_to_pool(token, amount)Add to existing position
claim_rewards(token)Claim with 5% fee
restake(token)Auto-compound at 0% fee
request_epoch_withdrawal(token, amount)Join withdrawal batch
propose_upgrade(class_hash)Start 60s timelock upgrade
execute_upgrade()Complete upgrade after timelock

Security Features

  • OpenZeppelin: Ownable, ReentrancyGuard, Pausable, Upgradeable
  • Anti-flash-loan protection (minimum stake duration)
  • Synthetix-pattern reward distribution (V2.8)
  • u256 arithmetic for fee calculation (no u128 overflow)

VaubanVault (ERC4626)

Tokenized vault implementing liquid staking tokens (LST).

LST Tokens

TokenUnderlyingVault
vaSTRKSTRKVAUBAN_VAULT
vawBTCwBTCVAWBTC_VAULT
vatBTCtBTCVATBTC_VAULT
vaLBTCLBTCVALBTC_VAULT
vasBTCsBTCVASBTC_VAULT

V5.0 Withdrawal Flow

Buffer is disabled. All withdrawals require 7-day unbonding:

  1. request_withdraw(assets) -- Burns shares, starts unbonding
  2. Wait 7 days
  3. complete_withdrawal(request_id) -- Retrieves assets

For instant liquidity, swap LST tokens on Ekubo DEX.

Auto-Compounding

Anyone can call compound() to reinvest vault rewards and earn a 0.1% incentive on compounded amount.

Privacy & Governance Contracts

Three additional contracts implement privacy-preserving payments and sybil-resistant governance:

ContractPurposeTests
StealthRegistryERC-5564 stealth addresses for private transfers20/20
ConfidentialPoolPrivacy Pools (Poseidon commitments + nullifiers)29/29
DaoGovernanceOne-person-one-vote via HumanAttestation SBT21/21

See Privacy & Governance for full documentation.