SacredDocs

Contracts and code

Two systems appear in these docs, and only one exists.

ProposedExisting
WhatMarginVault, SIFT ledger and capacity controller, CashFinanceVaultTerm-mode vault, desk, price reader, funds, token side
WhereArc, not deployedArbitrum One, Monad testnet
EconomicsEverything in these docsThe first design's dials, listed below
StatusSpecified, not builtVerified 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.

ContractAddress
Token (SacredTokenDummy, SRD)0x65660a41C634cDD8246c3a6f9816d35D2a29df21
Minter0xdc36Cb2E3be465aC31D06745283cD3420BB52F03
Pool hook (TaxHook)0xcE431e351252ba84aFDAFa556887e20524FA2dCD
Liquidity manager0x42E3735DF423fD006E10A3d97B9C83438d828193
Liquidity reserve0xe8d09aB2342b1DfA7BE38b3Af5929D55D054C7b3
Staking fund (StakedBackstopFund)0x29E61dB6f53b4bCA6B9F838b3452c9054d8A446c
Fee splitter0xCBf479Cd35325d69236c26400ec06B764A38a98a
Reserve sale0x158181DCC72FEF6870AA6460b14f826A3A4bA6e5
Address registry0x92c9ce1a970E1CEc443018FB121A3b5015138a96
Time-lock0xe408f23305cAc5719880597D36a811854A01d0c9

BTC desk and its vault (WBTC, 3x max)

ContractAddress
Vault0xbbB8891463EB7ac9DF3d81947491A733a1C3a916
Desk0x527ca589937A35504A5535fa1A89a0C8d42c667b
Oracle0xd49Be92294e17db719625766142655346c60543D

ETH desk and its vault (WETH, 2x max)

ContractAddress
Vault0x87e1D4Bc94c932124E856963dE1a7Dc0E3E5Ed37
Desk0x054738143B3126D943f97b4572bcDa155A9Af71d
Oracle0xB3D58e5F9D1C862CE88641C52DC43c2693C5f61F

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

ContractAddress
Token (SacredTokenDummy, SRD)0x65660a41C634cDD8246c3a6f9816d35D2a29df21
Minter0xdc36Cb2E3be465aC31D06745283cD3420BB52F03
Pool hook (TaxHook)0x9278DF35400c9868eCa463f53c2D60525279ADCD
Liquidity manager0x42E3735DF423fD006E10A3d97B9C83438d828193
Liquidity reserve0xe8d09aB2342b1DfA7BE38b3Af5929D55D054C7b3
Staking fund (StakedBackstopFund)0x29E61dB6f53b4bCA6B9F838b3452c9054d8A446c
Fee splitter0xCBf479Cd35325d69236c26400ec06B764A38a98a
Reserve sale0x158181DCC72FEF6870AA6460b14f826A3A4bA6e5
Address registry0x92c9ce1a970E1CEc443018FB121A3b5015138a96
Time-lock0xe408f23305cAc5719880597D36a811854A01d0c9

BTC bucket (test WBTC, 3x max)

ContractAddress
Vault0xf4623B09196469b02e287EA34B2e87DC6F948019
Desk0x8A324a2925A50a0212532df28C972fD211068529
Oracle0x4a23B639aaaD509FdB52533C054621C259a510d9

ETH bucket (test WETH, 2x max)

ContractAddress
Vault0x38a0772EE7f7EcA7cbc181814Abc0a187895722f
Desk0x08c0F0699Ef17A44a6Ded158EdcA8F68338A312C
Oracle0x1d8ebCf436EF2EB9286574CFEF559e86f1a36Db2

Test stand-ins

ContractAddress
USDC (open mint, 6 decimals)0xdBEeb5EFf47054F3fF29aF08fb0D3E8EdE80E191
WBTC (open mint, 8 decimals)0x3D3EfDa1eC1Cc36C66606b945594bc38d7b45C03
WETH (open mint, 18 decimals)0x9046D6eA476a4ce6A0A6Da6b2087739833e69F13
BTC / USD feed0x0eAEe278AB79933A587efF9f99FF19926200C2D0
ETH / USD feed0x1Dc53908efe3346F6a5a87aB1aC4C0C477D28fA7
BTC swap router0x4BEe51748Dff0466B08bC292E3CbE30893Af2639
ETH swap router0x8F03D8e00248AC02657e6b21d8934d9340bcAb6c
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,411Coin priceIn the vaultLent outCapOpen positionsNext cut-off
BTC bucket$64,924.030.00 USDC0.00 USDC10,000.00 USDC011 Oct 2026, 15:49 UTC, due now
ETH bucket$1,815.070.00 USDC0.00 USDC10,000.00 USDC011 Oct 2026, 15:49 UTC, due now
Monad testnet, block 80,083,854Coin priceIn the vaultLent outCapOpen positionsNext cut-off
BTC bucket$83,180.000.00 USDC0.00 USDC10,000.00 USDC020 Oct 2026, 23:43 UTC, due now
ETH bucket$2,499.000.00 USDC0.00 USDC10,000.00 USDC020 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

RuleHowTest
The vault owns the asset before it sells itopen lends the full cost and swaps before it records the sale or takes the down paymenttest_open_recordsTheDesignExample
A balance never increasesNo function adds to financed or markup, or subtracts from repaidinvariant_aBalanceNeverIncreases
The vault never receives more than the settlement amount_payVault pays settlementAmount on close and pay off, min(net, balance) on settlementinvariant_vaultNeverReceivesMoreThanTheBalance
The trader never owes more than the pledged assetsettle never pulls from the trader; a short sale closes the debtinvariant_settlementNeverChargesTheTrader
Only the trader can sell before the due datesettle reverts until the due date; there is no other sale pathtest_noOneCanSellBeforeDueExceptTheTrader
A pledged asset leaves only to its owner or the marketpayOff and _swap are the only asset transfersinvariant_deskHoldsOnlyPledgesAndOwedSurpluses
Exits cannot be pausedOnly open and requestDeposit check the pause flagtest_deposit_pausedByGuardian_withdrawalsStillWork
Shares cannot be transferredtransfer, transferFrom and approve always reverttest_shares_cannotBeTransferredOrApproved
Every USDC is counted exactly onceFour counters; the vault never reads its own balance, so donations cannot move the share priceinvariant_vaultIsFullyBacked
The admin cannot leave coded limits or touch live positionsBounds in every setter; position terms are stored at openingtest_admin_cannotExceedHardLimits

Deployed dials

The values the existing code carries. Current design parameters are on the product pages and in frontend/lib/params.js.

DialDeployed
Base rate10% a year
Surcharge above 2x1% a year
Leverage ceilingBTC 3x, ETH 2x
Term7 or 14 days
Position size100,000 USDC
Minimum down payment100 USDC
Profit share30% of each winning position, to the fund
Markup split100% to depositors
Cut-off period7 days
Utilisation cap85%
Stablecoins acceptedUSDC

Tests of the existing code

SuiteWhat it coversResult
Desk.t.sol, Vault.t.solEvery function, every revert, the worked examples, a fuzzed full lifecycle (1,000 runs)68 passed
Invariant.t.solNine system invariants under random deposits, withdrawals, cut-offs, positions, prices and time (64 × 120)9 passed
TaxHook.t.sol, SacredSystem.t.solThe pool fee for all swap shapes; the whole SCR side wired to the real vault on a real Uniswap v4 PoolManager184 passed
ArbitrumFork.t.solBoth deploy scripts; a 3x BTC position on the real Uniswap v3 pool at the real Chainlink price; a shortfall sale on the real PoolManager5 passed
Halmos check_*Eight arithmetic properties for all inputs in stated ranges2 proved, 6 timed out
server/testsKeeper, points, indexer, API, one end-to-end run against anvil18 passed
frontend/lib, frontend/e2eArithmetic to the unit; four browser flows with a real keeper and API24 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/.

Sacred is pre-launch. No Shariah board has reviewed it, nothing is audited, and every number is a proposal, a model or a backtest result, not a promise. These pages are not an offer to sell anything.