Docs

Roost Protocol, in full.

Everything public about Roost — what we built, why each piece exists, how it fits together, and how to use it.

Part I
The protocol
Who we are

Roost is a small team building stablecoin infrastructure on Base. The protocol is open source under AGPL; the contracts are immutable wherever operationally feasible; the codebase is designed so any independent reader can verify what we claim.

Our focus is one thing: an onchain dollar that is fully collateralized by real productive assets (tokenized US equities + USDC reserves), permissionlessly mintable, and natively wired into the agent economy.

What Roost is

Roost is a CDP (Collateralized Debt Position) protocol on Base. A CDP lets you lock collateral and mint debt against it. Roost's collateral is tokenized US equities issued by Backed Finance: bCOIN (Coinbase stock), bIB01 (1–3 month US Treasuries), bCSPX (S&P 500 index). The debt is rUSD, a stable dollar that targets $1 and is backed by the collateral plus a USDC peg-stability reserve.

rUSD-holders can stake into srUSD — an ERC-4626 vault whose share price compounds as the protocol collects fees. ROOST is the governance token and sROOST is the staked-ROOST vault, where the share price grows as protocol revenue is converted into ROOST via permissionless buybacks.

Why we exist

Money has had three phases — cash, bank balances, stablecoins. Each phase changed who got paid the yield. Cash paid no yield. Bank balances paid yield to banks. Today's stablecoins pay yield to issuers (Circle keeps the interest on USDC reserves). Roost ships the fourth phase: permissionless dollars where the yield reaches holders, and where AI agents are first-class operators alongside humans.

The three things you can do
1

Hold rUSD

A stable dollar backed by tokenized equities and USDC reserves. Targets $1. Defended by the PSM. Composable across Base DeFi.

2

Stake into srUSD

ERC-4626 vault. Share price grows over time as the protocol collects stability fees and PSM fees. No claim step — your srUSD is worth more rUSD every block.

3

Borrow against your stocks

Open a vault with bCOIN / bIB01 / bCSPX. Mint rUSD. Pay a stability fee on what you borrow. Composable with the rest of Base DeFi.

Part II
Primitives
rUSD — the stable

rUSD is an ERC-20. Total supply equals the rUSD outstanding from CDPs plus rUSD held as PSM liabilities. The supply changes only via minting (CDP open / increase, or PSM USDC→rUSD swap) and burning (CDP repay, liquidation, PSM rUSD→USDC swap). There is no admin mint. There is no freeze list.

Peg defense: the PSM swaps USDC ⇄ rUSD at 1:1 (minus 0.10% fee). When rUSD trades above $1, arbitrageurs deposit USDC into the PSM, get rUSD at $1, sell on Aerodrome → price comes down. When rUSD trades below $1, they buy on Aerodrome cheap, redeem at PSM for USDC at par → price comes up. The PSM's reserves are the floor.

srUSD — staked rUSD

srUSD is an ERC-4626 vault. Deposit rUSD, receive srUSD shares. Share price (the assets-per-share ratio) starts at 1.0 and grows monotonically as the protocol distributes revenue into the vault. No claim step. No epoch. No lockup. Withdraw at any time at the current share price.

Distributions land via SavingsRateRouter.distribute() which streams revenue over a 7-day vesting window — this prevents share-price spikes that would let a sniper deposit a block before the spike and withdraw the block after.

ROOST — governance

ROOST is the protocol's governance token. Fixed supply of 1B, minted once at TGE. ROOST holders vote on risk parameters (LTV, liquidation threshold, fee rates), collateral whitelists, and treasury proposals. The protocol uses an ERC-6372 timestamp clock so L2 votes are reliable.

Distribution: 40% community (airdrop + 4-year emissions via MerkleRewards) · 25% liquidity (Aerodrome seed) · 20% treasury · 15% team (2-year linear vest from day one, no cliff). No private rounds. No public sale. Full details on the Token page.

sROOST — value accrual

sROOST is an ERC-4626 vault for ROOST. Like srUSD, the share price grows monotonically. The difference: where srUSD's growth comes from stability fees streamed in rUSD, sROOST's growth comes from rUSD revenue swapped to ROOST on the open market and deposited into the vault.

The mechanism is the BuybackKeeper — a permissionless contract anyone can call. It takes the rUSD share of treasury revenue, swaps it for ROOST on Aerodrome, and calls sROOST.distribute(). Once rUSD enters the keeper, it can only leave as a ROOST buyback. No admin sweep, no withdraw function.

PSM — peg stability

The PSM is the rUSD ⇄ USDC swap at par (minus 0.10% per direction). It does two jobs:

  • Hard peg floor. As long as the PSM has USDC reserves, anyone can redeem rUSD for USDC at par. That's the price floor.
  • Fee revenue. Every swap pays 0.10%. Fees flow to the savings router (80% srUSD / 20% treasury).

Self-funding reserves with a bootstrap. The PSM's USDC reserves grow without operator capital via the immutable PSMReplenisher, which receives 20% of every revenue dollar from SavingsRateRouter and routes it in two modes:

  • Bootstrap (reserves < $20k): 100% of the replenisher's inflow goes to the PSM (swapped to USDC on Aerodrome). Effective per-dollar: 80% srUSD / 20% PSM / 0% buybacks. Peg-defense gets priority until the floor is reached.
  • Steady state (reserves ≥ $20k, latched forever): 25% goes to the PSM, 75% to BuybackKeeper for ROOST buybacks. Effective per-dollar: 80% srUSD / 5% PSM / 15% buybacks.

Permissionless, fully automatic, no admin can divert funds elsewhere. The bootstrap latch flips once on first crossing of the floor and never reverses, so the steady-state buyback flow is permanent.

Reserves are visible on the PSM page.

BuybackKeeper — revenue → ROOST

The BuybackKeeper is the value-accrual engine for ROOST. Flow:

  • 20% of protocol revenue routes from SavingsRateRouter to the treasury, denominated in rUSD.
  • The keeper holds that rUSD until anyone calls poke().
  • On poke() the keeper swaps rUSD → ROOST on Aerodrome (bounded by slippage limits) and calls sROOST.distribute().
  • sROOST share price grows. Circulating supply shrinks under permanent buy pressure.

The keeper is immutable and permissionless. No admin function can withdraw rUSD without going through the buyback path. This is unique in the CDP-stablecoin market — Roost is the first protocol of its kind to wire revenue directly into a transparent, onchain token buyback loop.

Part III
Mechanics
How vaults work

Open a vault by depositing collateral (bCOIN / bIB01 / bCSPX). Mint rUSD up to the asset's max LTV. Pay a stability fee on what you mint, compounded per second into a rate accumulator (MakerDAO-style). Repay anytime. Withdraw collateral once debt is cleared.

Each collateral type ("ilk") has its own LTV, liquidation threshold, stability fee, and debt ceiling. Parameters live on the Markets page and are governance-controlled — risk is tuned per asset, not global.

Where the yield comes from

Sources of revenue (all denominated in rUSD):

  • Stability fees — per-second compounding interest on minted rUSD, per collateral.
  • PSM fees — 0.10% per direction on USDC ⇄ rUSD swaps.
  • Liquidation surplus — when an auction clears with collateral surplus, the surplus is treasury-routed.

All revenue passes through SavingsRateRouter which splits 80/20:

  • 80%srUSD.distribute() — lifts srUSD share price (vested over 7d).
  • 20%BuybackKeeper — converted to ROOST, deposited into sROOST.
Liquidations

If a vault's debt exceeds the liquidation threshold (per-collateral, e.g. 75% LTV for bCOIN), anyone can call kick():

  • Start price = oracle × (1 + 15%) bonus.
  • Decays linearly to 50% of start over 1 hour (Dutch auction).
  • Buyers pay rUSD; up to the full debt is burned; surplus collateral returns to the original vault owner.
  • The kicker earns 0.50% of cleared debt as a keeper reward.

If the auction closes with debt still outstanding (bad debt), the BadDebtSocializer burns rUSD from the srUSD vault, distributing the loss proportionally across stakers. This keeps the system solvent without an external backstop.

Live auctions are visible at /liquidations.

Risk parameters

Per-collateral parameters (current values; subject to governance):

AssetMax LTVLiq. thresholdStability fee
bIB01 · Treasuries85%92%1%
bCSPX · S&P 50075%82%2%
bCOIN · Coinbase65%75%3%
Part IV
AI & agents
Why AI surfaces are first-class

Roost treats agents as users, not afterthoughts. The same machine-readable surfaces that let Claude understand a vault let a human's frontend render it, a Cursor copilot generate code against it, and an autonomous bot transact on it. One source of truth, many transports.

MCP server

What. An MCP (Model Context Protocol) server exposes Roost as tools. 13 tools — get_vault, simulate_position, explain_liquidation, propose_repay, compare_strategies, etc. Any MCP client (Claude Desktop, Cursor, IDE plugins, custom agents) plugs in.

Why. AI assistants need structured access to live protocol state to be useful. REST APIs require humans to read docs; MCP advertises its own schema so an LLM can discover and use the tools without hand-holding. This is how Claude on roostprotocol.com explains a vault you've never seen.

How to use. Free tools are open. Premium tools (heavy simulation, historical scans) are gated by x402. Install via the manifest in the GitHub repo; see /api-docs for the tool catalog.

x402 — pay-per-call rails

What. x402 revives HTTP 402 Payment Required. A premium endpoint replies 402 with the price and payment address. The caller attaches a signed USDC receipt and retries. Server verifies onchain, unlocks content. End-to-end: 200ms on Base.

Why. Agents have no AmEx. They can't sign up for API keys. They can't fill out billing forms. x402 lets them pay for what they use, per request, without a human in the loop — the missing piece for autonomous tooling.

How to use. Premium MCP tools surface 402 automatically. Standalone REST endpoints are listed at /api-docs. Spec at x402.coinbase.com.

AgentKit action provider

What. @roost/agentkit is a drop-in action provider for Coinbase AgentKit. Open, deposit, mint, stake, repay — exposed as native actions any CDP agent can call.

Why. AgentKit is the de-facto SDK for Base agents. Shipping a first-class provider means any AgentKit dev uses Roost in three lines of code, with no manual ABI wiring.

How to use. npm i @roost/agentkit, register the provider, give the agent a CDP wallet. Source: GitHub ↗.

Claude in Chrome — vault-aware skill

What. A skill bundle that activates Claude's side-panel on roostprotocol.com and any Backed Finance page. The side-panel inherits full MCP access.

Why. Most users live in the browser. A vault-aware assistant where they already are removes a switch-context tax. Ask "is this vault safe?" and get a numerical answer, not a generic explanation.

How to use. Install Claude in Chrome (Anthropic extension), accept the skill manifest. Manifest source: GitHub ↗.

In-app Claude — risk assistant

What. A chat sidebar embedded on every page of roostprotocol.com. Reads your wallet, simulates positions, drafts signed-ready transactions.

Why. Most users don't read whitepapers. They want to ask "what happens if bCOIN drops 30%?" and get a clear answer with a recommendation. Risk literacy on-tap.

How to use. Open /ai.

NL Query — English → GraphQL

What. Type "all bCOIN vaults with HF < 1.5". Claude translates to a subgraph query, runs it, summarizes the result.

Why. The subgraph has the answer, but only if you know GraphQL. Translation unlocks every researcher who doesn't.

How to use. Open /ai/query.

Hosted agents

Four agents we operate. You authorize a bounded spend permission; they manage one job each without further signatures.

  • Sentinel — watches your health factor, repays partial debt as needed. Free / Basic / Pro tiers.
  • Compounder — sweeps idle rUSD into srUSD hourly. Skips dust.
  • Rebalancer — LLM-driven. Reads your multi-vault portfolio, brings it back to target weights, bounded by daily caps.
  • Meta-Agent — compares Roost to Sky, Spark, Liquity, Maker. Surfaces a migration proposal when another protocol's net APR is materially better. Read-only — you sign.

Each agent runs in a CDP MPC-custodied server wallet — there are no raw keys on disk. Permissions live in EIP-7715 Spend Permissions scoped to that agent's address. Deploy at /agents.

Admin risk AI

Every hour, Claude scans protocol state — near-liquidation vaults, oracle drift, unusual flows. Outputs a concise summary for protocol ops. Internal surface — not user-facing, but visible at /admin/risk-ai for transparency.

Part V
Stack & integrations
Base — the L2

What. Base is Coinbase's L2, EVM-equivalent, USDC-native.

Why. Base is where the user growth is. It has Coinbase distribution, the deepest USDC liquidity outside Ethereum L1, the lowest fees among credible L2s, and a credibly neutral sequencer roadmap. Building on Base means a user can connect any wallet — or optionally sign in with email (CDP provisions a Smart Wallet) — and deposit USDC without ever touching a centralized exchange.

Coinbase Developer Platform (CDP)

What. CDP bundles embedded wallets, sponsored gas (Paymaster), fiat onramp, AgentKit, MCP support, and MPC-custodied server wallets.

Why. CDP collapses six different vendor integrations into one. Users get an email-login Smart Wallet with no seed phrase. New users don't need ETH (gas is sponsored). Cards convert to USDC in one flow. Agent infra (AgentKit + server wallets) is first-party. Lower friction beats every other distribution lever.

How to use. The frontend wires CDP automatically — you'll see "Sign in with email" on every protected route.

Smart Wallet — Sub-Accounts, Batches, Spend Permissions, Basenames

Sub-Accounts (ERC-7710). Each vault gets its own Smart Wallet sub-account. Agent permissions are scoped to that one sub-account. Blast radius bounded — a compromised agent can't touch the rest of your funds.

EIP-5792 batch calls. Approve + deposit + mint in a single confirmation prompt. On EOAs we fall back to sequential txs automatically.

Spend Permissions (EIP-7715). Bounded delegated allowances — "Sentinel can spend up to 1,000 rUSD/day". Agents transact without re-signing each tx; you can revoke instantly.

Basenames. Every address renders as name.base.eth with ENS L1 fallback. Cached in localStorage. Identity layer on top of an otherwise opaque hex address.

Backed Finance — collateral

What. Backed Finance issues tokenized real-world assets — bCOIN, bIB01, bCSPX, more. Each token is 1:1 redeemable for the underlying security via Backed's KYC channel.

Why. Tokenized equities are the cleanest CDP collateral that exists today — liquid, transparent, ERC-20-native, no KYC required at the protocol level (KYC happens between the holder and Backed for primary issuance only). Users can mint stablecoins against their actual stock portfolio.

How to use. Buy bStocks on Backed or any DEX listing them; deposit into a Roost vault from /vaults.

Aerodrome — DEX liquidity

What. Aerodrome is Base's largest AMM (a ve(3,3) DEX forked from Velodrome).

Why. rUSD/USDC liquidity needs a venue with deep stable-asset pools and a functioning emissions program. Aerodrome has both. The TGE seeds an rUSD/USDC pool there; the ROOST buyback uses it.

How to use. Swap rUSD or ROOST on Aerodrome at app.aerodrome.finance.

Pyth Lazer — sub-second oracle

What. Pyth Lazer is a pull-style oracle that pushes prices in milliseconds.

Why. Tokenized stocks move with the underlying during NYSE hours. Chainlink's 30s heartbeat means liquidations can use stale prices — bad for users, bad for solvency. Lazer gives millisecond-fresh prices, so a liquidation reflects what the asset is actually worth.

How to use. Frontend reads use the same adapter. Source: PythLazerOracle.sol ↗.

MultiOracle — deviation guard

What. A wrapper that reads Chainlink and Pyth, requires both, reverts if they drift > 50bps, and enforces a sequencer-uptime check on every call. Source swap blocked by a 1-day delay.

Why. Single-oracle protocols die when their single oracle gets manipulated. Two independent sources, a tight band, and a delay on hot-swap.

LayerZero OFT — rUSD cross-chain

What. rUSD is a LayerZero OFT (Omnichain Fungible Token). Burn on source, mint on destination. Canonical supply lives on Base.

Why. Stablecoin liquidity fragments badly when each chain has its own bridge wrapper. OFT keeps supply unified — one rUSD across Base, ETH L1, Optimism, Arbitrum, with per-chain rate limits as a safety valve.

How to use. Bridge via the LayerZero stargate UI or any aggregator. Source: RoostUSDOFT.sol ↗.

Anthropic — Claude + MCP

What. Claude is the LLM behind the in-app risk assistant, NL Query, the rebalancer agent, and the admin risk AI. MCP is the protocol that wires it to live state.

Why. Anthropic's model + MCP let an LLM read live onchain data structurally instead of guessing from a stale knowledge cutoff. That's the difference between "stablecoins are usually safe" and "your vault's HF is 1.4, here's the repay tx".

OnchainKit — UI primitives

What. Coinbase's React component library — <Identity>, <Token>, <Transaction>, more.

Why. Partners and integrators get UI components that match the rest of the Base ecosystem out of the box, with sane defaults for tx confirmation, identity rendering, and token pickers.

Base Mini App + Farcaster Frames v2

What. Roost ships as a Mini App inside the Base mobile app and Warpcast. Frames v2 let users stake, claim, and check vaults from a Farcaster feed.

Why. Mini Apps remove the install + connect-wallet friction. Frames put composable transactions inside a social feed. Both convert reach into action without leaving the host app.

How to use. Look up "Roost" inside the Base app, or open the Frame from any of our Warpcast posts.

Part VI
Governance & security
Governance

ROOST holders coordinate via an ERC-6372 timestamp clock (not block numbers — block times on L2s can drift, breaking voting windows). sROOST stakers vote with their underlying ROOST balance.

Governance scope: risk parameters (LTV, liq threshold, stability fee, debt ceiling) per collateral; collateral whitelist; oracle hot-swap (1-day delay); treasury proposals. Out of scope: minting ROOST, freezing rUSD, withdrawing from the buyback keeper. Those are immutable.

Security model
  • Immutable contracts wherever feasible — no upgrade proxy on rUSD, srUSD, sROOST, or BuybackKeeper.
  • No admin mint / freeze. rUSD can only be minted by the engine or PSM; burned by repay, liquidation, or PSM redeem.
  • Bad debt socializer — if a liquidation closes with debt outstanding, srUSD stakers absorb the loss proportionally. Keeps solvency without an external backstop.
  • Oracle defenses — Pyth + Chainlink agreement check, >50bps deviation reverts, sequencer-uptime check, 1-day hot-swap delay.
  • BuybackKeeper has no admin withdraw — rUSD only leaves as ROOST buybacks.
  • Team vest is irrevocable — 2-year linear vest from day one, no cliff, no admin clawback.
  • 65/65 tests passing in the audit harness (solc-js + ethereumjs-vm). Public bug bounty published at TGE.
Open source

Everything is open source under AGPL. Frontend, contracts, MCP server, AgentKit provider, Chrome skill, hosted agent runners. GitHub: roost-protocol/roost-protocol ↗.

Part VII
Reference
FAQ
Is there a presale or VC round?

No. Distribution is fair-launch only — airdrop + Aerodrome liquidity seed. Team holdings are 15%, vested linearly over 2 years from day one, no cliff.

What chains is rUSD on?

Base is canonical. Bridgeable via LayerZero OFT to ETH L1, Optimism, Arbitrum with per-chain rate limits.

Do I need KYC?

No KYC at the protocol level. Backed Finance handles KYC for primary bStock issuance — the secondary market is permissionless.

What's the borrow APR?

Currently 1% for bIB01, 2% for bCSPX, 3% for bCOIN. Governance-controlled. See /markets for live values.

What's the srUSD APR?

Target 6%. Floats with usage. Share price is the source of truth — display APRs are derived.

Can my position be frozen?

No. There is no freeze function on rUSD or any vault. Liquidations are price-driven and permissionless.

Where does my collateral live?

Inside the protocol's vault contract — non-custodial, withdrawable any time debt is cleared.

Glossary
rUSDThe stablecoin Roost issues. Backed by tokenized equities + USDC reserves.
srUSDStaked rUSD. ERC-4626 vault where rUSD-holders earn protocol revenue via share-price growth.
ROOSTGovernance token. Fixed 1B supply.
sROOSTStaked ROOST. ERC-4626 vault that grows in ROOST terms via the BuybackKeeper.
CDPCollateralized Debt Position — lock collateral, mint debt.
PSMPeg Stability Module. Swaps USDC ⇄ rUSD at par (minus 0.10% fee).
LTVLoan-to-Value. Max ratio of debt to collateral when opening or growing.
Liquidation thresholdLTV at which anyone can liquidate. Higher than max LTV — gives a buffer.
Stability feePer-second compounding interest on minted rUSD, per collateral.
Bad debtrUSD outstanding without backing after a failed liquidation. Absorbed by srUSD stakers.
MCPModel Context Protocol — Anthropic standard for exposing tools to LLMs.
x402HTTP 402-based pay-per-call standard. Caller attaches a signed USDC receipt.
OFTOmnichain Fungible Token — LayerZero standard for canonical cross-chain ERC-20.
Spend PermissionEIP-7715 bounded delegated allowance — e.g. 'agent can spend N rUSD/day'.
Sub-AccountERC-7710 sub-account under a Smart Wallet — per-vault permission isolation.
ERC-6372Timestamp clock for governance — reliable on L2s where block numbers drift.