Contracts
Every Decayless contract, what it does, who calls it, and where it is deployed on the testnet.
How a chain is deployed
Each chain runs one engine, made of Vault, Auctions, Oracle and SystemControl, deployed together in one stream of transactions. Each contract is deployed against the predicted addresses of the others and the script checks every link, so there is no initializer and no setter to rewire them. Their code and the links between them never change. During the beta the keys can change the fees and the unbond notice, pause entries and bring the end date forward, within the bounds the Security page sets out.
A bug that needs new code is fixed by winding the engine down, so that everyone redeems, and deploying a new engine beside it. Around the engine sit DCL on Ethereum, the art registry on every chain, and the periphery (Router, Lens and StateLens), which holds nothing between transactions and has no admin.
What each contract does
| Contract | What it does | Who calls it |
|---|---|---|
Router | Runs long, close, deposit, withdraw, bid and createMarket, each in one transaction, with native ETH, permits, and entry from any token through Uniswap. multicall runs several in one transaction. | Traders and liquidity providers, through the app. A bonded deposit through it goes only to the account that sends it. |
Vault | Holds the reserve of every market on its chain and runs the engine. Leverage tokens and LP tokens are issued and redeemed here, and LP tokens are its ERC-1155 balances. | The Router. Liquidity providers directly to bond, request an unbond and unbond, and to approve the Router. |
| Leverage tokens | One ERC-20 per tier of each market, such as WETH-USDC-2X. | Whoever holds them, in any wallet or on any exchange. |
Oracle | Gives the price, a 30-minute time-weighted average from the pair's most liquid Uniswap v3 pool on the same chain. | The Vault. |
Auctions | Holds the auctioned half of each fee, sells it for DCL, pays liquidity providers their share of each winning bid and burns the rest. | Anyone starts an auction. Bidders, directly or through the Router. Liquidity providers claim directly (claim, claimMany). |
SystemControl | Holds the levers of the keys (pause, changes of the fees and the unbond notice, ossification and shutdown) within the bounds on the Security page. | The owner key, and the guardian for the pause alone. Anyone executes a matured request. |
DCL | The protocol token, an ERC-20 with permit and burn, minted once at genesis on Ethereum and with no owner. | Its holders. |
Lens, StateLens | Read-only views that compute quotes with the engine's own libraries and give the headroom after a trade and the state the app shows. | The app. |
PoolMath | The engine's pricing library, linked into Vault. | The Vault. |
Burn sink, Burner | On Robinhood Chain the sink collects the DCL to be burned and bridges it to its Burner on Ethereum, which burns it. | Anyone. |
Hub | The art registry, where liquidity providers wrap the DCL they earned into pieces of a collection. | Auctions, when a liquidity provider claims into a piece. Creators, which means only the Safe until creation is opened. Anyone, to record the freeze. |
Testnet deployments
The testnet at testnet.decayless.fi runs on these contracts. Their source is not yet verified on the explorers.
Sepolia
| Contract | Address |
|---|---|
Vault | 0x126d76638e81584138a3537722ADEf480A930376 |
Auctions | 0xFe0eFf879A48fe31676078639c9c717Ce01845AB |
Oracle | 0x31BdF76a0072FED7713ce94EB720b4Ad4cE29A89 |
SystemControl | 0x2dA90B43cC3ed260aAe38Db2Ad4c6f76E28065b5 |
PoolMath | 0xae4d19D3719CC96fFf6B2B9c670BA55Fa87f0b9d |
DCL | 0x8329235f45C9A8fafc34a41153aD91e70b15406b |
Burnerburns what Robinhood Chain testnet sends | 0x730B4433a4a0623A86221C3BFE88CC83cF595949 |
Router | 0x648f307d99de401DdD8E5A0F2538e6091c6F33B0 |
Lens | 0xa2dd936eD56CEbd66EafAc63759c8F328a94E838 |
StateLens | 0x6BF7151B09992A26290FA137b2c68512E97414B0 |
Hub | 0x02f7f42F302c7D1E025dbfaecBC8B961B78fE14c |
Robinhood Chain testnet
Source
The source is published and verified on each explorer when the contracts are deployed to mainnet. Until then, investors can ask the team for read access to the repositories.