Vaults
CapyFi offers tokenized yield-bearing vaults that abstract complex strategies behind a single ERC-20 share token. Vault shares accrue yield through an oracle-driven exchange rate.
Introduction
What CapyFi vaults are
A CapyFi vault is composed of three on-chain contracts: the Vault itself, a Yield Oracle that reports yield/loss to update the share price, and one or more Strategies that put underlying assets to productive use.
Users deposit an underlying asset and receive vault share tokens. As yield is reported, the share-to-underlying exchange rate increases. When users redeem, they burn shares and receive underlying assets back.
stBTC Vault
Off-chain BTC yield vault
The stBTC vault accepts WBTC deposits and mints stBTC vault shares. WBTC is routed to off-chain BTC yield strategies; an off-chain operator periodically reports yield through the Yield Oracle, which lifts stBTC's exchange rate against WBTC.
Underlying
WBTC (8 decimals)
Share Token
stBTC (8 decimals)
Network
Ethereum (Chain ID 1)
Vault Type
OffchainBtcVault
Vault Architecture
Component diagram
- Vault contract: holds total managed assets, mints/burns shares, exposes
paused,availableBalanceandtotalManagedAssets. - Yield Oracle: receives off-chain yield/loss reports from operators with the
OPERATIONS_ROLEand updates the vault accounting accordingly. - Strategy: a per-strategy address registered against the oracle. Each strategy has a configured
apyBpsceiling that bounds reportable yield.
Vault Interface
Read-only methods
totalManagedAssets()
function totalManagedAssets() view returns (uint256)Total underlying assets currently managed by the vault, including off-chain positions.
availableBalance()
function availableBalance() view returns (uint256)On-chain balance available for immediate redemptions.
paused()
function paused() view returns (bool)Whether deposits and redemptions are currently paused.
Yield Oracle
APY-bounded yield reporting
The Yield Oracle is the trusted entry point for reporting yield and loss to a vault. Each strategy has its own configured apyBps, capped between protocol-wide minApyBps and maxApyBps bounds.
Key methods
function setStrategyApy(address strategy, uint256 apyBps)function disableStrategy(address strategy)function reportYield(address strategy) returns (uint256)function reportLoss(address strategy, uint256 loss)function getPendingYield(address strategy) view returns (uint256)function strategyApyBps(address strategy) view returns (uint256)function lastReportAt(address strategy) view returns (uint256)function minReportInterval() view returns (uint256)function totalYieldReported() view returns (uint256)function totalLossReported() view returns (uint256)function vault() view returns (address)Reporting is gated by OPERATIONS_ROLE on AccessControl. Yield reports beyond the strategy's APY cap are clamped to the maximum permitted accrual since lastReportAt.
Strategy
Per-strategy yield source
Strategies represent distinct yield sources for a vault. The stBTC vault uses an off-chain BTC strategy; the strategy contract is the registered identity inside the Yield Oracle that operators target when calling reportYield or reportLoss.
Deployed Addresses
stBTC Vault stack on Ethereum
0x6cbe98Eb2CdF0bc2E52A9b3ed014cd1740A4B30C0xb40dC920dfc7BD7d68322a0E1b8A05557AdbeC540x331e42aE8678A0c1BEB4cfC80FfF5A884d0877b20xbAD529586bBDb37D975184fa57805809bb205c70The stBTC vault is currently only deployed on Ethereum.