BETA — mainnet live (chain 482120); features are still being finished. Transparency →
Bitcoin Swap BETA Chain 482120
Developers · Reference

Contract reference

Functions, events and errors of the public contracts — generated from contracts.json.

Reference › Contract reference

This page is generated automatically from /developers/contracts.json — it covers only the public interface integrators need. Full source code (including the Owner's admin functions) is verified on the explorer; admin permissions are summarized in Trust model. Revert codes: Limits & error codes.

Compiler: Solidity 0.8.28, optimizer 200 runs (482120-side contracts). Bridge routers: @hyperlane-xyz/core 12.1.0.

USDw

Address 0x3b5BD179CA6Aab4DAF0f842829776843ABe6e727 · chain 482120 · 18 decimals

USDw — functions

function name() view returns (string)
function symbol() view returns (string)
function decimals() view returns (uint8)
function totalSupply() view returns (uint256)
function balanceOf(address) view returns (uint256)
function allowance(address,address) view returns (uint256)
function approve(address spender, uint256 amount) returns (bool)
function transfer(address to, uint256 amount) returns (bool)

USDw — events

event Transfer(address indexed from, address indexed to, uint256 value)

OracleAMM

Address 0xd953d53414a81eb6AC5a4edE73d13992181aF51E · chain 482120

BTCw <-> USDw at the oracle price +/- spreadBps (30 = 0.3%). maxTradeBtcw per order; stops when the oracle is older than maxAgeSec.

OracleAMM — functions

function quoteSellBtcw(uint256 btcwIn) view returns (uint256 usdOut)
function quoteBuyBtcw(uint256 usdIn) view returns (uint256 btcwOut)
function sellBtcw(uint256 minUsdOut) payable returns (uint256 usdOut)
function buyBtcw(uint256 usdIn, uint256 minBtcwOut) returns (uint256 btcwOut)
function midPrice() view returns (uint256 priceWad, uint256 updatedAt)
function spreadBps() view returns (uint256)
function maxTradeBtcw() view returns (uint256)
function btcwReserve() view returns (uint256)
function usdReserve() view returns (uint256)
function paused() view returns (bool)

OracleAMM — events

event Swap(address indexed trader, bool btcwIn, uint256 amountIn, uint256 amountOut, uint256 priceWad)

OracleTokenAMM_ETHw

Address 0xFd6d78A3b60175D37146793396A2FA7864039D54 · chain 482120

ETHw <-> USDw at the PriceHub price of ETHw +/- spreadBps (30 = 0.3%). maxTradeToken 300 ETHw per order; stops when the price is older than maxAgeSec (300). buyToken/sellToken can pay another recipient. Bridge destination for ETHw (deposit USDC/USD₮0 -> USDw -> ETHw).

OracleTokenAMM_ETHw — functions

function quoteBuyToken(uint256 usdIn) view returns (uint256 tokenOut)
function quoteSellToken(uint256 tokenIn) view returns (uint256 usdOut)
function buyToken(uint256 usdIn, uint256 minTokenOut, address to) returns (uint256 tokenOut)
function sellToken(uint256 tokenIn, uint256 minUsdOut, address to) returns (uint256 usdOut)
function midPrice() view returns (uint256 priceWad, uint256 updatedAt)
function token() view returns (address)
function usd() view returns (address)
function hub() view returns (address)
function tokenReserve() view returns (uint256)
function usdReserve() view returns (uint256)
function spreadBps() view returns (uint256)
function maxAgeSec() view returns (uint256)
function maxTradeToken() view returns (uint256)
function paused() view returns (bool)

OracleTokenAMM_ETHw — events

event Swap(address indexed trader, address indexed to, bool tokenIn, uint256 amountIn, uint256 amountOut, uint256 priceWad)

OracleTokenAMM_ETHw — errors

error ContractPaused()
error ZeroAmount()
error ZeroAddress()
error StalePrice(uint256 updatedAt)
error InvalidOraclePrice()
error ExceedsMaxTrade(uint256 cap, uint256 amount)
error InsufficientLiquidity(uint256 available, uint256 required)
error SlippageExceeded(uint256 amountOut, uint256 minAmountOut)

SwapRouter

Address 0x397E607eA05eF7909f84540077F3a716778031E4 · chain 482120

Ownerless router: chains up to MAX_HOPS (4) hops across venue 0 ClpPools, venue 1 OracleAMM (BTCw <-> USDw), venue 2 token AMMs (ETHw kho) in one transaction. BTCw in: send msg.value = amountIn; token in: approve the router (it only pulls from msg.sender). quote() does not check caps, reserves or pause.

SwapRouter — functions

function swap(address tokenIn, uint256 amountIn, (uint8 venue, address tokenOut)[] hops, uint256 minOut, address to, uint256 deadline) payable returns (uint256 amountOut)
function quote(address tokenIn, uint256 amountIn, (uint8 venue, address tokenOut)[] hops) view returns (uint256 amountOut)
function tokenAmmCount() view returns (uint256)
function tokenAmmAt(uint256 index) view returns (address amm, address token)
function clp() view returns (address)
function oracleAmm() view returns (address)
function usdw() view returns (address)
function NATIVE() view returns (address)
function MAX_HOPS() view returns (uint256)

SwapRouter — events

event Routed(address indexed sender, address indexed tokenIn, address indexed tokenOut, uint256 amountIn, uint256 amountOut, address to, uint256 hops)

SwapRouter — errors

error Expired(uint256 deadline)
error InvalidRecipient()
error InvalidPath()
error UnknownVenue(uint8 venue)
error UnsupportedHop(uint8 venue, address tokenIn, address tokenOut)
error ValueMismatch(uint256 sent, uint256 expected)
error SlippageExceeded(uint256 amountOut, uint256 minAmountOut)
error ZeroAmount()
error ZeroAddress()
error UnexpectedSender()
error NativeTransferFailed()

ClpPools

Address 0x557aDc3d900c471F3907cdDA3a9F5377d6F9E7e0 · chain 482120

322 continuous-liquidity pools (USDw, 100 crypto trackers, 201 US stock and 20 US ETF trackers), every pool paired with native BTCw (THORChain-style CLP). Fee floor minFeeBps (5).

ClpPools — functions

function swapBtcwForAsset(address token, uint256 minOut, address to) payable returns (uint256)
function swapAssetForBtcw(address token, uint256 amountIn, uint256 minOut, address to) returns (uint256)
function swapAssetForAsset(address tokenIn, address tokenOut, uint256 amountIn, uint256 minOut, address to) returns (uint256)
function quoteBtcwForAsset(address token, uint256 btcwIn) view returns (uint256 out, uint256 fee)
function quoteAssetForBtcw(address token, uint256 amountIn) view returns (uint256 out, uint256 fee)
function priceInBtcw(address token) view returns (uint256)
function poolCount() view returns (uint256)
function poolTokenAt(uint256 index) view returns (address)
function pools(address token) view returns (uint256 btcwDepth, uint256 assetDepth, uint256 totalUnits, bool exists, bool enabled)
function minFeeBps() view returns (uint256)
function paused() view returns (bool)

ClpPools — events

event Swap(address indexed trader, address indexed token, bool btcwIn, uint256 amountIn, uint256 amountOut, uint256 fee, address to)

UsdClpPools

Address 0x78aCB6Ec7aF4cc83BF9E698706de79c08D61C13f · chain 482120

R-61: a second, parallel set of 321 continuous-liquidity pools, every pool paired with USDw (ERC-20, approve first; no msg.value). Same tokens as ClpPools, separate contract and liquidity; tell the two apart by contract address, not by token. Fee floor minFeeBps (5). removeLiquidity works even while paused.

UsdClpPools — functions

function usd() view returns (address)
function swapUsdForAsset(address token, uint256 amountIn, uint256 minOut, address to) returns (uint256)
function swapAssetForUsd(address token, uint256 amountIn, uint256 minOut, address to) returns (uint256)
function swapAssetForAsset(address tokenIn, address tokenOut, uint256 amountIn, uint256 minOut, address to) returns (uint256)
function quoteUsdForAsset(address token, uint256 usdIn) view returns (uint256 out, uint256 fee)
function quoteAssetForUsd(address token, uint256 amountIn) view returns (uint256 out, uint256 fee)
function quoteAssetForAsset(address tokenIn, address tokenOut, uint256 amountIn) view returns (uint256 out)
function priceInUsd(address token) view returns (uint256)
function addLiquidity(address token, uint256 usdAmount, uint256 assetAmount) returns (uint256 units)
function removeLiquidity(address token, uint256 units, uint256 minUsd, uint256 minAsset) returns (uint256 usdOut, uint256 assetOut)
function unitsOf(address token, address provider) view returns (uint256)
function poolCount() view returns (uint256)
function poolTokenAt(uint256 index) view returns (address)
function poolDepths(address[] tokens) view returns (uint256[] usdDepths, uint256[] asset)
function pools(address token) view returns (uint256 usdDepth, uint256 assetDepth, uint256 totalUnits, bool exists, bool enabled)
function minFeeBps() view returns (uint256)
function paused() view returns (bool)

UsdClpPools — events

event Swap(address indexed trader, address indexed token, bool usdIn, uint256 amountIn, uint256 amountOut, uint256 fee, address to)
event LiquidityAdded(address indexed token, address indexed provider, uint256 usdAmount, uint256 asset, uint256 units)
event LiquidityRemoved(address indexed token, address indexed provider, uint256 usdAmount, uint256 asset, uint256 units)

UsdRebalancer

Address 0xF9DAD09811755b8cf4863ed880AdD6F92358623D · chain 482120

R-61: keeps the UsdClpPools pools near the PriceHub USD price by trading from its own inventory (it mints nothing). Acts when a pool deviates by more than thresholdBps (30), closing stepPct (90%) of the gap, at most maxTradeUsd (43,000,000 USDw) per trade; skips prices older than maxAgeSec (300 s). Only keepers can call it. Its volume is counted as treasury volume.

UsdRebalancer — functions

function pools() view returns (address)
function hub() view returns (address)
function usd() view returns (address)
function thresholdBps() view returns (uint256)
function stepPct() view returns (uint256)
function maxTradeUsd() view returns (uint256)
function maxAgeSec() view returns (uint256)
function paused() view returns (bool)

UsdRebalancer — events

event Rebalanced(address indexed token, bool sold, uint256 amountIn, uint256 amountOut, int256 devBps)

BtcwPriceFeed

Address 0x6E0687A5D5a5b98CC5fb05c4d8d742fBD75ba96c · chain 482120 · 8 decimals

BTC/USD, Chainlink AggregatorV3Interface. Internal oracle (median of external sources).

BtcwPriceFeed — functions

function latestRoundData() view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)
function latestAnswer() view returns (int256)
function decimals() view returns (uint8)

PriceHub

Address 0xE87FDdCC0b668564a20B23F3bE1EE108C805ecb4 · chain 482120 · 18 decimals

USD reference price of the 321 tracker tokens: 100 crypto, 201 US stocks, 20 US ETFs (internal oracle).

PriceHub — functions

function latestRoundData(address asset) view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)
function prices(address[] assets) view returns (int256[] answers, uint256[] updatedAts)
function decimals() view returns (uint8)

WBTCw

Address 0xA7182E25e635108AD401E3be78f1c2A4593B8831 · chain 482120 · 18 decimals

Wrapped BTCw (ERC-20, WETH9-style). Minted only when the BTCw vault 0x10Ecc6EF494D0Ec1A1446a30026951b0923F3606 releases native BTCw against WBTC locked on Arbitrum One (deposit() reverts for every other sender); withdraw(wad) unwraps 1:1 to native BTCw at any time. No owner, no pause, no fees. Supply <= WBTC locked in 0x9A37C4a711b23Ae3508E0Dbd8d994ae98c92A86A (Arbitrum). Deployed by the Owner wallet 0xB17b...d952 on 3 Oct 2026 (R-54).

WBTCw — functions

function acceptBeneficiary()
function allowance(address owner, address spender) view returns (uint256)
function approve(address spender, uint256 amount) returns (bool)
function balanceOf(address account) view returns (uint256)
function beneficiary() view returns (address)
function decimals() view returns (uint8)
function decreaseAllowance(address spender, uint256 subtractedValue) returns (bool)
function deposit() payable
function increaseAllowance(address spender, uint256 addedValue) returns (bool)
function name() view returns (string)
function pendingBeneficiary() view returns (address)
function proposeBeneficiary(address proposed)
function symbol() view returns (string)
function totalSupply() view returns (uint256)
function transfer(address to, uint256 amount) returns (bool)
function transferFrom(address from, address to, uint256 amount) returns (bool)
function vault() view returns (address)
function withdraw(uint256 wad)

WBTCw — events

event Approval(address indexed owner, address indexed spender, uint256 value)
event BeneficiaryChanged(address indexed previous, address indexed current)
event BeneficiaryProposed(address indexed current, address indexed proposed)
event Deposit(address indexed dst, uint256 wad)
event Transfer(address indexed from, address indexed to, uint256 value)
event Withdrawal(address indexed src, uint256 wad)

WBTCw — errors

error NotBeneficiary(address sender)
error NotPendingBeneficiary(address sender)
error NotVault(address sender)
error TransferFailed()

USDCe

Address 0x7b56B7B06B8e586064787E7FfE466Ab6B78C31C7 · chain 482120 · 6 decimals

Bridged USDC (Bitcoin Swap), symbol USDC.e: Hyperlane synthetic token of the dedicated core (R-52). Minted 1:1 when USDC is locked in the Arbitrum router 0x1e458688336872Eb744Ccb588C7775480675b2A6, burned on withdrawal. Sealed: fixed ISM, counterpart enrolled once, no fees; allowlist on (Owner wallet only) at 3 Oct 2026. Deployed 3 Oct 2026.

USDCe — functions

function PACKAGE_VERSION() view returns (string)
function allowance(address owner, address spender) view returns (uint256)
function allowlistEnabled() view returns (bool)
function approve(address spender, uint256 amount) returns (bool)
function balanceOf(address account) view returns (uint256)
function configSealed() view returns (bool)
function decimals() view returns (uint8)
function decreaseAllowance(address spender, uint256 subtractedValue) returns (bool)
function destinationGas(uint32 destinationDomain) view returns (uint256 gasLimit)
function domains() view returns (uint32[])
function enrollRemoteRouter(uint32 _domain, bytes32 _router)
function enrollRemoteRouters(uint32[] _domains, bytes32[] _addresses)
function feeHook() view returns (address)
function feeRecipient() pure returns (address)
function feeToken() view returns (address)
function fixedIsm() view returns (address)
function handle(uint32 _origin, bytes32 _sender, bytes _message) payable
function hook() view returns (address)
function increaseAllowance(address spender, uint256 addedValue) returns (bool)
function initialize(uint256 _totalSupply, string _name, string _symbol, address _hook, address _interchainSecurityModule, address _owner)
function interchainSecurityModule() view returns (address)
function isAllowed(address) view returns (bool)
function localDomain() view returns (uint32)
function mailbox() view returns (address)
function name() view returns (string)
function owner() view returns (address)
function paused() view returns (bool)
function quoteGasPayment(uint32 _destinationDomain) view returns (uint256)
function quoteTransferRemote(uint32 _destination, bytes32 _recipient, uint256 _amount) view returns ((address token, uint256 amount)[] quotes)
function renounceOwnership()
function routers(uint32 _domain) view returns (bytes32)
function scaleDenominator() view returns (uint256)
function scaleNumerator() view returns (uint256)
function setAllowed(address[] accounts, bool allowed_)
function setAllowlistEnabled(bool enabled)
function setDestinationGas(uint32 domain, uint256 gas)
function setDestinationGas((uint32 domain, uint256 gas)[] gasConfigs)
function setFeeHook(address _feeHook)
function setFeeRecipient(address recipient)
function setHook(address hook_)
function setInterchainSecurityModule(address _module)
function setPaused(bool paused_)
function symbol() view returns (string)
function token() view returns (address)
function totalSupply() view returns (uint256)
function transfer(address to, uint256 amount) returns (bool)
function transferFrom(address from, address to, uint256 amount) returns (bool)
function transferOwnership(address newOwner)
function transferRemote(uint32 _destination, bytes32 _recipient, uint256 _amount) payable returns (bytes32 messageId)
function unenrollRemoteRouter(uint32) pure
function unenrollRemoteRouters(uint32[]) pure

USDCe — events

event AllowedSet(address indexed account, bool allowed)
event AllowlistEnabledSet(bool enabled)
event Approval(address indexed owner, address indexed spender, uint256 value)
event FeeHookSet(address feeHook)
event FeeRecipientSet(address feeRecipient)
event GasSet(uint32 domain, uint256 gas)
event HookSet(address _hook)
event Initialized(uint8 version)
event IsmSet(address _ism)
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
event PausedSet(bool paused)
event ReceivedTransferRemote(uint32 indexed origin, bytes32 indexed recipient, uint256 amountOrId)
event SentTransferRemote(uint32 indexed destination, bytes32 indexed recipient, uint256 amountOrId)
event Transfer(address indexed from, address indexed to, uint256 value)

USDCe — errors

error FeeHookDisabled()
error HookLocked()
error NotAllowed(address account)
error Paused()
error RoutingLocked()

UniswapV2Factory

Address 0x453F946CB371a2039137453BAafFb83FF4ccf9f7 · chain 482120

Official Uniswap V2 factory bytecode (@uniswap/v2-core 1.0.1), feeToSetter = Owner wallet, feeTo unset. Pair init code hash 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f. Deployed 3 Oct 2026 (R-54).

UniswapV2Factory — functions

function allPairs(uint256) view returns (address)
function allPairsLength() view returns (uint256)
function createPair(address tokenA, address tokenB) returns (address pair)
function feeTo() view returns (address)
function feeToSetter() view returns (address)
function getPair(address, address) view returns (address)
function setFeeTo(address _feeTo)
function setFeeToSetter(address _feeToSetter)

UniswapV2Factory — events

event PairCreated(address indexed token0, address indexed token1, address pair, uint256)

UniswapV2Router02

Address 0x436997135b9332B2dFa1B20e6B24f0987778a246 · chain 482120

Official Uniswap V2 Router02 bytecode (@uniswap/v2-periphery 1.1.0-beta.0). WETH() = WBTCw, so the *ETH functions wrap/unwrap WBTCw <-> native BTCw (wrapping needs the vault, so swapExactETHForTokens reverts; swapExactTokensForETH unwraps and works). Deployed 3 Oct 2026 (R-54).

UniswapV2Router02 — functions

function WETH() view returns (address)
function addLiquidity(address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns (uint256 amountA, uint256 amountB, uint256 liquidity)
function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity)
function factory() view returns (address)
function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut) pure returns (uint256 amountIn)
function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut) pure returns (uint256 amountOut)
function getAmountsIn(uint256 amountOut, address[] path) view returns (uint256[] amounts)
function getAmountsOut(uint256 amountIn, address[] path) view returns (uint256[] amounts)
function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) pure returns (uint256 amountB)
function removeLiquidity(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline) returns (uint256 amountA, uint256 amountB)
function removeLiquidityETH(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns (uint256 amountToken, uint256 amountETH)
function removeLiquidityETHSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) returns (uint256 amountETH)
function removeLiquidityETHWithPermit(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns (uint256 amountToken, uint256 amountETH)
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns (uint256 amountETH)
function removeLiquidityWithPermit(address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) returns (uint256 amountA, uint256 amountB)
function swapETHForExactTokens(uint256 amountOut, address[] path, address to, uint256 deadline) payable returns (uint256[] amounts)
function swapExactETHForTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable returns (uint256[] amounts)
function swapExactETHForTokensSupportingFeeOnTransferTokens(uint256 amountOutMin, address[] path, address to, uint256 deadline) payable
function swapExactTokensForETH(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns (uint256[] amounts)
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline)
function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline) returns (uint256[] amounts)
function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] path, address to, uint256 deadline)
function swapTokensForExactETH(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns (uint256[] amounts)
function swapTokensForExactTokens(uint256 amountOut, uint256 amountInMax, address[] path, address to, uint256 deadline) returns (uint256[] amounts)

UniswapV2Pair_WBTCw_USDCe

Address 0xED2967B738d98B3e4D3e6780A08Dc161A55EF304 · chain 482120

WBTCw / USDC.e pair (token0 = USDC.e, token1 = WBTCw), 0.30% fee. Created 3 Oct 2026 at the Chainlink BTC/USD price; a peg keeper (0xe20dA14F7A9715Ba685048292e53C05c097E766D) swaps its own inventory when the pool drifts more than 0.5% from Chainlink. Price = reserveUSDCe * 1e20 / reserveWBTCw (USD per BTC, 8 decimals). LP tokens are held by the Owner wallet, unlocked. UI: https://app.btcw.tech/pool/

UniswapV2Pair_WBTCw_USDCe — functions

function DOMAIN_SEPARATOR() view returns (bytes32)
function MINIMUM_LIQUIDITY() view returns (uint256)
function PERMIT_TYPEHASH() view returns (bytes32)
function allowance(address, address) view returns (uint256)
function approve(address spender, uint256 value) returns (bool)
function balanceOf(address) view returns (uint256)
function burn(address to) returns (uint256 amount0, uint256 amount1)
function decimals() view returns (uint8)
function factory() view returns (address)
function getReserves() view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast)
function initialize(address _token0, address _token1)
function kLast() view returns (uint256)
function mint(address to) returns (uint256 liquidity)
function name() view returns (string)
function nonces(address) view returns (uint256)
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
function price0CumulativeLast() view returns (uint256)
function price1CumulativeLast() view returns (uint256)
function skim(address to)
function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes data)
function symbol() view returns (string)
function sync()
function token0() view returns (address)
function token1() view returns (address)
function totalSupply() view returns (uint256)
function transfer(address to, uint256 value) returns (bool)
function transferFrom(address from, address to, uint256 value) returns (bool)

UniswapV2Pair_WBTCw_USDCe — events

event Approval(address indexed owner, address indexed spender, uint256 value)
event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to)
event Mint(address indexed sender, uint256 amount0, uint256 amount1)
event Swap(address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to)
event Sync(uint112 reserve0, uint112 reserve1)
event Transfer(address indexed from, address indexed to, uint256 value)

SimpleEarn

Address 0x353ffb50779e3A4d96CFaBA62810f0292fE41b7c · chain 482120

R-62 flexible Earn: deposit native BTCw, USDw or ETHw and withdraw at any time. Rewards are paid in USDw from a budget funded in advance by the treasury (the contract mints nothing); a keeper calls claimFor to push rewards to depositors. Rate per market: rewardRateWad. Owner 0xB17bdA8F14EEb9fd67B34810A2e1E82A737Ad952; API: /api/v2/earn.

SimpleEarn — functions

function assetCount() view returns (uint256)
function assetAt(uint256 i) view returns (address)
function markets(address) view returns (bool exists, bool enabled, uint256 principal, uint256 rewardReserve, uint256 rewardRateWad, uint256 periodFinish, uint256 lastUpdate, uint256 rewardPerTokenStored, uint256 undistributed)
function balanceOf(address, address) view returns (uint256)
function earned(address asset, address user) view returns (uint256)
function rewardRateWad(address asset) view returns (uint256)
function totalUsdReserve() view returns (uint256)
function paused() view returns (bool)
function usd() view returns (address)
function deposit(address asset, uint256 amount) payable
function withdraw(address asset, uint256 amount)
function claim(address asset)
function exit(address asset)

SimpleEarn — events

event Deposited(address indexed asset, address indexed user, uint256 amount)
event Withdrawn(address indexed asset, address indexed user, uint256 amount)
event RewardPaid(address indexed asset, address indexed user, uint256 usdAmount, address indexed by)

SimpleEarn — errors

error ContractPaused()
error MarketDisabled(address asset)
error UnknownMarket(address asset)
error InsufficientBalance(uint256 owned, uint256 requested)
error UseDepositFunction()

FixedEarn

Address 0x0a3fD8b35593fB4f82Da4C110C356745Dd7CDce2 · chain 482120

R-62 fixed-term Earn: deposit for one of the terms listed by termsOf (between MIN_TERM 1 day and MAX_TERM 4 years); principal and USDw interest are returned at maturity (redeemMatured by a keeper, or redeem by the holder). Interest comes from rewardPool, funded in advance by the treasury. Rates come from aprBpsOf; a rate setter may change them within [minSetterAprBps, maxSetterAprBps] and not below assetFloorBps. Owner 0xB17bdA8F14EEb9fd67B34810A2e1E82A737Ad952.

FixedEarn — functions

function MIN_TERM() view returns (uint256)
function MAX_TERM() view returns (uint256)
function assetCount() view returns (uint256)
function assetAt(uint256 i) view returns (address)
function markets(address) view returns (bool exists, bool enabled, uint8 decimals, uint256 principal)
function termsOf(address asset) view returns (uint256[] terms, uint256[] aprs)
function aprBpsOf(address, uint256) view returns (uint256)
function assetFloorBps(address) view returns (uint256)
function previewInterest(address asset, uint256 amount, uint256 term) view returns (uint256)
function positionCount() view returns (uint256)
function positionsOf(address user) view returns (uint256[])
function position(uint256 id) view returns ((address owner, address asset, uint128 principal, uint128 interest, uint64 start, uint64 maturity, uint32 aprBps, bool closed, uint256 priceWad))
function rewardPool() view returns (uint256)
function escrowed() view returns (uint256)
function paused() view returns (bool)
function deposit(address asset, uint256 amount, uint256 term) payable returns (uint256 id)
function redeem(uint256 id) returns (uint256 interestPaid)

FixedEarn — events

event Deposited(uint256 indexed id, address indexed asset, address indexed user, uint256 principal, uint256 interestUsd, uint256 term, uint256 aprBps, uint256 maturity, uint256 priceWad)
event Redeemed(uint256 indexed id, address indexed asset, address indexed user, uint256 principal, uint256 interestUsdPaid, bool early, address by)

FixedEarn — errors

error ContractPaused()
error MarketDisabled(address asset)
error InvalidTerm(uint256 term)
error InsufficientRewardPool(uint256 available, uint256 required)
error NotPositionOwner(uint256 id)
error AmountTooLarge()

StakedBTCw

Address 0xa4794DB9f26f489db1a6d8Cf6FC2Ab3106B1027e · chain 482120 · 18 decimals

R-62 stBTCw: stake native BTCw and receive the ERC-20 receipt stBTCw 1:1. Rewards in USDw stream from rewardReserve (funded in advance; nothing is minted). unstake starts a cooldown of cooldownSec (0 s at 04/10/2026), then claimUnstaked returns BTCw. Owner 0xB17bdA8F14EEb9fd67B34810A2e1E82A737Ad952.

StakedBTCw — functions

function name() view returns (string)
function symbol() view returns (string)
function decimals() view returns (uint8)
function totalSupply() view returns (uint256)
function balanceOf(address account) view returns (uint256)
function earned(address user) view returns (uint256)
function rewardRateWad() view returns (uint256)
function currentRewardRateWad() view returns (uint256)
function periodFinish() view returns (uint256)
function rewardReserve() view returns (uint256)
function cooldownSec() view returns (uint256)
function pendingOf(address) view returns (uint256 assets, uint64 releaseAt)
function paused() view returns (bool)
function stake() payable
function unstake(uint256 amount) returns (uint64 releaseAt)
function claimUnstaked() returns (uint256 amount)
function claim()

StakedBTCw — events

event Staked(address indexed user, uint256 amount)
event Unstaked(address indexed user, uint256 amount, uint64 releaseAt)
event UnstakeClaimed(address indexed user, uint256 amount)
event RewardPaid(address indexed user, uint256 usdAmount, address indexed by)

StakedBTCw — errors

error ContractPaused()

EarnPriceSource

Address 0xfC2A0eD1702150FcAC47Ade06D22e47A34009c9c · chain 482120

USD prices used by the Earn contracts to value deposits: BTCw from OracleAMM, trackers from PriceHub, USDw = 1 (18 decimals). freshPriceUsd reverts with StalePrice when the price is older than maxAgeSec (3,600 s at 04/10/2026). Owner 0xB17bdA8F14EEb9fd67B34810A2e1E82A737Ad952.

EarnPriceSource — functions

function priceUsd(address asset) view returns (uint256 priceWad, uint256 updatedAt)
function freshPriceUsd(address asset) view returns (uint256 priceWad)
function maxAgeSec() view returns (uint256)
function amm() view returns (address)
function hub() view returns (address)
function usd() view returns (address)

EarnPriceSource — errors

error NoPrice(address asset)
error StalePrice(address asset, uint256 updatedAt, uint256 maxAgeSec)

TokenFactory

Address 0xa4860BdfaE9B2881B1B593aFFC8740d926eCC1d1 · chain 482120

Creates the 321 price-tracker tokens as EIP-1167 clones of the TrackerToken implementation. List them with tokenCount / tokenAt / tokenRange, or look one up with tokenBySymbol; isFactoryToken tells whether an address is one of them. Owner 0x4aFd0A931176103d704Ff0d696614d4E10d74A4a.

TokenFactory — functions

function tokenCount() view returns (uint256)
function tokenAt(uint256 index) view returns (address)
function tokenRange(uint256 start, uint256 count) view returns (address[] out)
function tokenBySymbol(bytes32) view returns (address)
function isFactoryToken(address) view returns (bool)
function implementation() view returns (address)
function defaultMinter() view returns (address)

TokenFactory — events

event TokenCreated(address indexed token, string name, string symbol, uint256 mintCap, uint256 index)

OracleRebalancer

Address 0x6c811003D301769575e9A8661B9197FAf2A32e69 · chain 482120

Keeps the ClpPools tracker pools near the PriceHub price. Acts when a pool deviates by more than thresholdBps (30), closing stepPct (90%) of the gap, at most maxTradeBtcw (500 BTCw) per trade and dailyMintCapBtcw (160,000 BTCw-equivalent) of new tracker tokens per day; skips prices older than maxAgeSec (300 s). Only keepers can call it (openToAll = false). Its volume is counted as treasury volume. Owner 0x4aFd0A931176103d704Ff0d696614d4E10d74A4a.

OracleRebalancer — functions

function thresholdBps() view returns (uint256)
function stepPct() view returns (uint256)
function maxTradeBtcw() view returns (uint256)
function dailyMintCapBtcw() view returns (uint256)
function mintedTodayBtcw() view returns (uint256)
function maxAgeSec() view returns (uint256)
function preview(address token) view returns (uint8 side, uint256 amountIn, uint256 toMint, int256 devBps)
function isKeeper(address) view returns (bool)
function openToAll() view returns (bool)
function paused() view returns (bool)

OracleRebalancer — events

event Rebalanced(address indexed token, bool sold, uint256 amountIn, uint256 amountOut, uint256 minted, int256 devBps)
event Skipped(address indexed token, uint8 reason)

Multicall3

Address 0xA0093EA76633A983364cb2582959870eaffDdea0 · chain 482120

Multicall3 (same init code and runtime as the canonical mds1 Multicall3), deployed from the Owner wallet at a NON-standard address (R-52). Libraries that hard-code 0xcA11bde05977b3631167028862bE2a173976CA11 must be pointed at this address.

Multicall3 — functions

function aggregate3((address target, bool allowFailure, bytes callData)[] calls) payable returns ((bool success, bytes returnData)[] returnData)
function tryAggregate(bool requireSuccess, (address target, bytes callData)[] calls) payable returns ((bool success, bytes returnData)[] returnData)
function getBlockNumber() view returns (uint256 blockNumber)
function getCurrentBlockTimestamp() view returns (uint256 timestamp)
function getEthBalance(address addr) view returns (uint256 balance)

StakedTokenFactory

Address 0xA4FEe82a4d689896734fb867f5DD4F39adeAF4Ed · chain 482120

Staking for ERC-20 tokens (R-62c): one StakedToken contract (stXXX) per token, created by this factory. Stake = approve the stXXX contract, then stake(amount); you receive stXXX 1:1 (transferable ERC-20, same decimals as the token). USDw rewards are streamed to every holder from a reserve the treasury funded first (nothing minted), settled on each transfer and pushable by anyone with claimFor. Unstake returns the same tokens (cooldownSec = 0). Owner 0xB17bdA8F14EEb9fd67B34810A2e1E82A737Ad952 keeps only pause, cooldown (while paused), fund / reclaim of the unstreamed USDw and sweep of unbooked tokens; it cannot touch staked tokens. Deployed 5 Oct 2026. stakes = token -> stXXX contract; stakeAbi = ABI of every stXXX.

StakedTokenFactory — functions

function admin() view returns (address)
function all() view returns (address[],address[])
function assetCount() view returns (uint256)
function deploy(address[],uint256) returns (address[])
function stakeOf(address) view returns (address)
function stakeOwner() view returns (address)
function usd() view returns (address)

StakedTokenFactory — events

event StakeDeployed(address indexed,address indexed,string)

StakedTokenFactory — errors

error AlreadyDeployed(address)
error NotAdmin()
error ZeroAddress()

Bridge router (GuardedCollateralRouter)

USDC: Arbitrum 0x10B5757aC9a40E3467846e35749ae30b00ef0182 ⇄ 482120 0x10EDFF80C17A39940a4dc724b9c24fE9D2E8Fd9b
USD₮0: Arbitrum 0x984fDC24D1A2Be538C7290487d0fc212635D98A5 ⇄ 482120 0xD6d8452FdCC26B155BEc4fc878635c05CaC95FB1

Arbitrum USDC / USD₮0 (6 decimals) are locked in the Arbitrum router; the 482120 router releases USDw (18 decimals) from its reserve, and back. Amount leaving an end is bounded by what is locked there. On 482120 amounts must be a multiple of granularity (1e12). No interchain gas payment: call transferRemote with msg.value = 0. Recipient is bytes32, address LEFT-padded with zeros. Delivery usually 10-30 s. Read allowlistEnabled(): when true only allowlisted wallets can send.

Bridge router (GuardedCollateralRouter) — functions

function transferRemote(uint32 destination, bytes32 recipient, uint256 amount) payable returns (bytes32 messageId)
function wrappedToken() view returns (address)
function granularity() view returns (uint256)
function allowlistEnabled() view returns (bool)
function isAllowed(address) view returns (bool)
function paused() view returns (bool)
function routers(uint32 domain) view returns (bytes32)
function mailbox() view returns (address)

Bridge router (GuardedCollateralRouter) — events

event SentTransferRemote(uint32 indexed destination, bytes32 indexed recipient, uint256 amountOrId)
event ReceivedTransferRemote(uint32 indexed origin, bytes32 indexed recipient, uint256 amountOrId)

Bridge router (GuardedCollateralRouter) — errors

error NotAllowed(address account)
error Paused()
error BadGranularity(uint256 amount, uint256 granularity)