Contracts and code
Two systems appear in these docs, and only one exists.
| Proposed | Existing | |
|---|---|---|
| What | MarginVault, SIFT ledger and capacity controller, CashFinanceVault | Term-mode vault, desk, price reader, funds, token side |
| Where | Arc, not deployed | Arbitrum One, Monad testnet |
| Economics | Everything in these docs | The first design's dials, listed below |
| Status | Specified, not built | Verified on block explorers. Not audited |
The proposed engine is pending implementation. It has no addresses, no tests and no audit. The controls in Architecture are requirements, not code. The inspected contracts/src/Desk.sol is a term-mode implementation and not this system. No test count below applies to it.
The rest of this page documents the existing deployment.
Existing addresses
Arbitrum One
Token side, from the earlier design. It plays no part in the current product, and the token is a placeholder that is not on offer.
| Contract | Address |
|---|---|
Token (SacredTokenDummy, SRD) | 0x65660a41C634cDD8246c3a6f9816d35D2a29df21 |
| Minter | 0xdc36Cb2E3be465aC31D06745283cD3420BB52F03 |
Pool hook (TaxHook) | 0xcE431e351252ba84aFDAFa556887e20524FA2dCD |
| Liquidity manager | 0x42E3735DF423fD006E10A3d97B9C83438d828193 |
| Liquidity reserve | 0xe8d09aB2342b1DfA7BE38b3Af5929D55D054C7b3 |
Staking fund (StakedBackstopFund) | 0x29E61dB6f53b4bCA6B9F838b3452c9054d8A446c |
| Fee splitter | 0xCBf479Cd35325d69236c26400ec06B764A38a98a |
| Reserve sale | 0x158181DCC72FEF6870AA6460b14f826A3A4bA6e5 |
| Address registry | 0x92c9ce1a970E1CEc443018FB121A3b5015138a96 |
| Time-lock | 0xe408f23305cAc5719880597D36a811854A01d0c9 |
BTC desk and its vault (WBTC, 3x max)
| Contract | Address |
|---|---|
| Vault | 0xbbB8891463EB7ac9DF3d81947491A733a1C3a916 |
| Desk | 0x527ca589937A35504A5535fa1A89a0C8d42c667b |
| Oracle | 0xd49Be92294e17db719625766142655346c60543D |
ETH desk and its vault (WETH, 2x max)
| Contract | Address |
|---|---|
| Vault | 0x87e1D4Bc94c932124E856963dE1a7Dc0E3E5Ed37 |
| Desk | 0x054738143B3126D943f97b4572bcDa155A9Af71d |
| Oracle | 0xB3D58e5F9D1C862CE88641C52DC43c2693C5f61F |
Monad testnet
Monad testnet (chain 10143): the same contracts, deployed by script/DeployMonadTestnet.s.sol on 2026-10-14 and verified on MonadScan. Every SCR-side contract but the pool hook sits at the same address as on Arbitrum One. The testnet has no native USDC, WBTC or WETH, no Chainlink feeds and no Uniswap v3, so the desks trade against test stand-ins: tokens anyone can mint, price feeds anyone can set (seeded at BTC $83,180 and ETH $2,499 from Chainlink on Arbitrum One), and a router that swaps at the set price. The oracles accept a year-old price, since the feeds only move when someone sets them. The SCR pool runs on the Monad-maintained Uniswap v4 PoolManager. Testnet prices are not a reference.
Token side, from the earlier design
| Contract | Address |
|---|---|
Token (SacredTokenDummy, SRD) | 0x65660a41C634cDD8246c3a6f9816d35D2a29df21 |
| Minter | 0xdc36Cb2E3be465aC31D06745283cD3420BB52F03 |
Pool hook (TaxHook) | 0x9278DF35400c9868eCa463f53c2D60525279ADCD |
| Liquidity manager | 0x42E3735DF423fD006E10A3d97B9C83438d828193 |
| Liquidity reserve | 0xe8d09aB2342b1DfA7BE38b3Af5929D55D054C7b3 |
Staking fund (StakedBackstopFund) | 0x29E61dB6f53b4bCA6B9F838b3452c9054d8A446c |
| Fee splitter | 0xCBf479Cd35325d69236c26400ec06B764A38a98a |
| Reserve sale | 0x158181DCC72FEF6870AA6460b14f826A3A4bA6e5 |
| Address registry | 0x92c9ce1a970E1CEc443018FB121A3b5015138a96 |
| Time-lock | 0xe408f23305cAc5719880597D36a811854A01d0c9 |
BTC bucket (test WBTC, 3x max)
| Contract | Address |
|---|---|
| Vault | 0xf4623B09196469b02e287EA34B2e87DC6F948019 |
| Desk | 0x8A324a2925A50a0212532df28C972fD211068529 |
| Oracle | 0x4a23B639aaaD509FdB52533C054621C259a510d9 |
ETH bucket (test WETH, 2x max)
| Contract | Address |
|---|---|
| Vault | 0x38a0772EE7f7EcA7cbc181814Abc0a187895722f |
| Desk | 0x08c0F0699Ef17A44a6Ded158EdcA8F68338A312C |
| Oracle | 0x1d8ebCf436EF2EB9286574CFEF559e86f1a36Db2 |
Test stand-ins
| Contract | Address |
|---|---|
| USDC (open mint, 6 decimals) | 0xdBEeb5EFf47054F3fF29aF08fb0D3E8EdE80E191 |
| WBTC (open mint, 8 decimals) | 0x3D3EfDa1eC1Cc36C66606b945594bc38d7b45C03 |
| WETH (open mint, 18 decimals) | 0x9046D6eA476a4ce6A0A6Da6b2087739833e69F13 |
| BTC / USD feed | 0x0eAEe278AB79933A587efF9f99FF19926200C2D0 |
| ETH / USD feed | 0x1Dc53908efe3346F6a5a87aB1aC4C0C477D28fA7 |
| BTC swap router | 0x4BEe51748Dff0466B08bC292E3CbE30893Af2639 |
| ETH swap router | 0x8F03D8e00248AC02657e6b21d8934d9340bcAb6c |
Uniswap v4 PoolManager (Monad-maintained) | 0x451D64ab3b650040d2aE1886602b97ed6eDc643d |
Live on-chain state
Read from the chain through Alchemy at 2026-11-16 00:39 UTC, and again at most once a minute. The coin price is what each desk's oracle reports: Chainlink on Arbitrum One, the set test feed on Monad testnet.
| Arbitrum One, block 524,604,411 | Coin price | In the vault | Lent out | Cap | Open positions | Next cut-off |
|---|---|---|---|---|---|---|
| BTC bucket | $64,924.03 | 0.00 USDC | 0.00 USDC | 10,000.00 USDC | 0 | 11 Oct 2026, 15:49 UTC, due now |
| ETH bucket | $1,815.07 | 0.00 USDC | 0.00 USDC | 10,000.00 USDC | 0 | 11 Oct 2026, 15:49 UTC, due now |
| Monad testnet, block 80,083,854 | Coin price | In the vault | Lent out | Cap | Open positions | Next cut-off |
|---|---|---|---|---|---|---|
| BTC bucket | $83,180.00 | 0.00 USDC | 0.00 USDC | 10,000.00 USDC | 0 | 20 Oct 2026, 23:43 UTC, due now |
| ETH bucket | $2,499.00 | 0.00 USDC | 0.00 USDC | 10,000.00 USDC | 0 | 20 Oct 2026, 23:43 UTC, due now |
The deployed version pairs a vault with each desk, so two vaults exist.
Ownership is an OpenZeppelin TimelockController with a 2-day delay that only a multisig can propose to and execute from. A guardian can pause new positions and new deposits, and cannot unpause. Exits are never pausable by anyone.
The rules the existing code keeps, and where each is tested
| Rule | How | Test |
|---|---|---|
| The vault owns the asset before it sells it | open lends the full cost and swaps before it records the sale or takes the down payment | test_open_recordsTheDesignExample |
| A balance never increases | No function adds to financed or markup, or subtracts from repaid | invariant_aBalanceNeverIncreases |
| The vault never receives more than the settlement amount | _payVault pays settlementAmount on close and pay off, min(net, balance) on settlement | invariant_vaultNeverReceivesMoreThanTheBalance |
| The trader never owes more than the pledged asset | settle never pulls from the trader; a short sale closes the debt | invariant_settlementNeverChargesTheTrader |
| Only the trader can sell before the due date | settle reverts until the due date; there is no other sale path | test_noOneCanSellBeforeDueExceptTheTrader |
| A pledged asset leaves only to its owner or the market | payOff and _swap are the only asset transfers | invariant_deskHoldsOnlyPledgesAndOwedSurpluses |
| Exits cannot be paused | Only open and requestDeposit check the pause flag | test_deposit_pausedByGuardian_withdrawalsStillWork |
| Shares cannot be transferred | transfer, transferFrom and approve always revert | test_shares_cannotBeTransferredOrApproved |
| Every USDC is counted exactly once | Four counters; the vault never reads its own balance, so donations cannot move the share price | invariant_vaultIsFullyBacked |
| The admin cannot leave coded limits or touch live positions | Bounds in every setter; position terms are stored at opening | test_admin_cannotExceedHardLimits |
Deployed dials
The values the existing code carries. Current design parameters are on the product pages and in frontend/lib/params.js.
| Dial | Deployed |
|---|---|
| Base rate | 10% a year |
| Surcharge above 2x | 1% a year |
| Leverage ceiling | BTC 3x, ETH 2x |
| Term | 7 or 14 days |
| Position size | 100,000 USDC |
| Minimum down payment | 100 USDC |
| Profit share | 30% of each winning position, to the fund |
| Markup split | 100% to depositors |
| Cut-off period | 7 days |
| Utilisation cap | 85% |
| Stablecoins accepted | USDC |
Tests of the existing code
| Suite | What it covers | Result |
|---|---|---|
Desk.t.sol, Vault.t.sol | Every function, every revert, the worked examples, a fuzzed full lifecycle (1,000 runs) | 68 passed |
Invariant.t.sol | Nine system invariants under random deposits, withdrawals, cut-offs, positions, prices and time (64 × 120) | 9 passed |
TaxHook.t.sol, SacredSystem.t.sol | The pool fee for all swap shapes; the whole SCR side wired to the real vault on a real Uniswap v4 PoolManager | 184 passed |
ArbitrumFork.t.sol | Both deploy scripts; a 3x BTC position on the real Uniswap v3 pool at the real Chainlink price; a shortfall sale on the real PoolManager | 5 passed |
Halmos check_* | Eight arithmetic properties for all inputs in stated ranges | 2 proved, 6 timed out |
server/tests | Keeper, points, indexer, API, one end-to-end run against anvil | 18 passed |
frontend/lib, frontend/e2e | Arithmetic to the unit; four browser flows with a real keeper and API | 24 passed |
Not done: no audit; no full formal verification of the stateful contracts; the fork test covers the WBTC desk only; MetaMask itself was not driven.
Run it
anvil # 1
cd contracts && forge script script/DeployLocal.s.sol --rpc-url http://127.0.0.1:8545 --broadcast
cd .. && python3 export_abi.py
cd server && KEEPER_KEY=<anvil key> .venv/bin/python -m destiny.keeper # 2
cd server && .venv/bin/uvicorn --factory destiny.api:app_from_env # 3
cd frontend && npm run dev # 4
The local deployment is the whole system with mocks for USDC, WBTC, the feed and the spot market, and a real PoolManager. The deployer holds 1,000,000 USDC and the genesis SCR, and must deposit 5% into the vault before anyone else can. Tests: forge test in contracts/ (libraries cloned per the README), pytest in server/, npm test && npm run test:e2e in frontend/.