BTR Docs
- Overview — BTR is a decentralized exchange running a multi-asset AMM: signed marks, depth shaped from observed price density, shared inventory in each pool core.
- Manifesto — Why BTR exists: bring order-book market making (inventory, marks, spreads) to on-chain liquidity, so LPs stop funding arbitrage every time the price moves.
- Foundations — The research lineage behind the BTR AMM: market-making models, mark-priced AMMs and loss-versus-rebalancing, and the design choice each one led to.
- AIMM Overview — How the BTR AMM works: the Adaptive Inventory Market Maker's contracts, the pricing pipeline from mark to fill, inventory accounting and invariants.
- Inventory management — How BTR pools account assets and liabilities: coverage-driven inventory skew, the pool-level rate LPs settle at, and the convex coverage wall, as implemented.
- Liquidity shaping — How BTR shapes AMM depth: a clamped quartic I-spline stored per pool, integrated on chain and scaled by dispersion, so liquidity sits where price trades.
- Anchor path pricing — Each asset in a BTR pool anchors to one correlated parent, up to four levels deep. A swap follows the tree path between two assets, settled in a single call.
- AIMM spread and fee model — How BTR prices a swap's spread from volatility, inventory and mark age, charges one output-side fee at half the spread, and applies the coverage toll before it.
- Slippage & Price Impact — How a BTR quote goes from mark to amount received: the deterministic price impact term, the slippage that remains, and the protections against it.
- Toxic flow mitigation — How BTR budgets for adverse selection: each defense against toxic and informed flow, from staleness pricing to flow guards, what it costs and what it covers.
- Configuration parameters — Every BTR AMM parameter in one reference: its units, its formula, and the bounds the contracts enforce, from spreads to mark staleness.
- AIMM invariants — Every property BTR claims always holds, the contract code that enforces it and the failure mode if it broke: solvency, pricing bounds, accounting and access.
- Curve presets — How a BTR pool shapes its liquidity, every curve preset installed on chain with its numbers and charts, and which preset fits which leg.
- Pool Contract — Reference for the BTR Pool contract: swap, deposit, withdraw, donate and liability swap entrypoints, anchor-tree routing, custom errors and gas costs.
- Price feed reads — How BTR pools read prices: the chain's mark store and its lanes, the internal cash-collateral peg helper, and the signed push wire each mark arrives in.
- Admin Contract — Reference for the BTR Admin singleton: every governed pool operation with its payload, timelock tier, validation rules and the events it emits.
- Flash Loans — ERC-3156-style flash loans from BTR pools via the Flash singleton: the fee schedule, the liquidity floor a loan cannot breach and the borrower callback.
- Deployments — Where BTR is deployed and how: the chain table, launch configuration per chain, and links to the asset registry, pool composition and addresses.
- Contract Addresses — Every deployed BTR contract address per chain, generated from the deployment records and regenerated on every deploy, so integrations can pin them.
- Asset Registry — Every asset listed in a BTR pool, per network: token contract address, decimals and the price feed its mark is signed under, generated from the deploy records.
- Pool Composition — Why each BTR deployment is split into several pool cores, which assets sit in each core, and how wrapped token variants share a single price feed.
- Security Overview — How BTR is secured in depth: the adversaries it is designed against, the trust table for every role and contract, and where each layer of defense is specified.
- Access Control — Who can do what in BTR: every principal and role, halt authority, timelock tiers and the owner-gated operation classes, each traceable to the contracts.
- Deployer — How BTR contracts are deployed: per-chain deploy order, CREATE3 addresses known before the ceremony, and the ownership handover to the admin multisig.
- Admin — The BTR owner multisig: ownership handover, the parameter lane, fleet and UUPS upgrade paths, timelock mechanics and the emergency levers it holds.
- Risk Steward — Runbook for the BTR risk steward key: its bounded and one-way lanes, the exact clamp rules on each retune, what fails closed, and what to check before and after.
- Guardian — The BTR guardian key: who holds membership, the pause levers it controls, the arguments that decide what each call does, and what it is the last defense for.
- Mark Relayer — The BTR price-pushing role end to end: what the relay key can and cannot do, the k-of-n roster quorum, the mark store's per-lane guards, TTL and price bands, and the push wire.
- Treasury — The BTR treasury is a fee sink: an untrusted plain address that can claim accrued fee shares and nothing else. What it receives and what it cannot do.
- Guards — The BTR transaction-time guard layer: per-asset halt flags, the halt mask, and the five per-asset risk thresholds every swap and deposit is checked against.
- Flow Guards — Every transaction-time guard in BTR: reentrancy locks, the flash reserve, the JIT liquidity cooldown, the base parity halt and the mandatory price band.
- Guardian Routines — Operator runbook for the BTR guardian key: what to check before and after a pause lever lands, how to confirm it on chain, and when to escalate to the owner.
- Observability — What BTR emits on chain and off chain, which surface carries each signal, and the conditions that page an operator, from stale price feeds to coverage drops.
- Audits — BTR assurance model: audit methodology, published audit reports with third-party reports linked as they land, the bug bounty scope, and how to disclose a vulnerability.
- Internal Audit 2026-09 — Public report of the BTR internal audit, 2026-09-02 to 2026-09-27: funnel, scope, method and every published finding as a root-cause bundle against the launch code, with the residual risk.
- User Guides — How to trade and provide liquidity on BTR: what each action does on chain, what it costs, and every way it can fail and why, from quote to settlement.
- Swapping — How a BTR token swap works from form to chain: the quote, route ranking, the minimum-out slippage guard, batched approvals and one pool swap per leg.
- Liability swaps — Move a BTR liquidity position from one pool asset to another without withdrawing: swapLiability, the rate it converts at, the mark cap and the routes using it.
- Providing liquidity — Deposit a single asset into a BTR pool: the LP receipt token, its liquidity index, the pool rate every deposit and exit settles at, and what withdrawals cost.
- Pool legs — What a listed asset is inside a BTR pool, why every pool core has a base leg, what a liquidity provider holds against a leg, and how to read its live state.
- Faucets — How BTR testnet faucets hand out pool assets: mintable test twins versus official issuer tokens, registration, one claim per token per day, and reverts.
- MEV Protection — When a swap is exposed to front-running and sandwiching, which MEV-protected RPC endpoints exist per chain, and how to add one to a wallet.
- Developer Guides — Integrate BTR from contracts or off chain: swap, add liquidity, transfer liabilities, flash loans, deploy pools, hooks, the HTTP API and the TypeScript SDK.
- Basic Operations — Integrate BTR pools from Solidity: function signatures, a copy-paste interface, units, revert reasons and emitted events for swap, deposit and withdraw.
- Pool Deployment & Curation — Deploy and curate a BTR pool: the chain-wide ownership model and the curation surface for assets, marks, risk settings, liquidity curves and halts.
- Pool Hooks — Put idle BTR pool capital to work through YieldHook adapters: the callback surface, dual accounting ledger, liquidity curve and the cap on booked yield.
- Composability — Compose with BTR on chain: flash loans through the Flash singleton and swaps routed across several pools, with the constraints each integration must respect.
- Consuming Price Feeds — Read BTR prices from your own contract: getFeed, feed ids and decimals, and the staleness and band checks that a naive price read skips.
- API & SDK Reference — Reference for the BTR HTTP API and the @btr-protocol/sdk TypeScript package: endpoints, parameters, response shapes and SDK entrypoints for quotes and pools.
- Quotes & Routing — Get a BTR swap quote off chain and settle it on chain: best-path search, per-leg slippage limits, EIP-5792 batched calls, and execution through the Router.
- Cookbook — Working TypeScript, Python, Rust and Solidity snippets for common BTR tasks: swap, add liquidity, transfer an LP position, take a flash loan and deploy a pool.
- White Labeling — Run a branded pool on BTR: what a pool admin controls, such as listed assets, fees and liquidity curves, and what still routes through the shared protocol.
- Protocol Fee Collection — How a BTR pool's treasury claims its accrued fee shares, what the fee sink can and cannot do, and how the fee sink address is rotated when it has to change.
- Incentivization — The four on-chain levers that pay BTR liquidity providers: the swap fee split, direct donations to a pool, protocol-owned liquidity and yield from pool hooks.
- RPC and Transport Policy — How the keepers and the indexer talk to chains: ordered RPC failover with Multicall3 batching for reads, and paced eth_getLogs scans with a per-chain source in front for indexer backfill.
- Roadmap — What BTR builds next: designs specified against the deployed contracts but not yet shipped, what each one adds, what it reuses and what still has to be proven.
- Total Return Swaps — Planned leveraged exposure on BTR liability swaps: margin accounting, coverage as the utilization curve, skew-based funding and progressive deleveraging.
- Single-Asset Vaults — A planned vault per asset, allocating across every BTR pool that lists it, built as a Morpho Vaults V2 adapter: allocation signal, circularity rule, limits.
- Wrapper Vaults — Planned single tokens backed by a pool of competing wrappers, like btrUSD and btrETH: what the vault holds, how a share is priced, what the roster needs.
- Cookie Policy — Which cookies the BTR interface sets, what your browser's local storage holds and why, how long each item lasts, and how to clear or block them in your browser.
- Privacy Policy — What personal data BTR collects when you use the interface and services, why, the legal basis, how long it is kept, who processes it and your rights over it.
- Risk Disclaimer — The material risks of using BTR: smart contract, price feed, market, liquidity, impermanent loss and regulatory risk. Read before you swap or provide liquidity.
- Terms of Service — The terms that govern your use of the BTR interface and related services: eligibility, prohibited uses, your responsibilities, disclaimers and liability limits.
- Glossary — Definitions of the DeFi, TradFi and statistics terms used in the BTR docs: mark, coverage, inventory skew, LVR, spread, liability, pool leg, anchor path.