Skip to content

The contracts

The contracts on Ethereum are the protocol. The whitepaper calls it “a non-custodial dApp whose contracts rely on the Ethereum protocol alone, with no oracles and no governance”, and nothing in them can be upgraded. This page says what each contract holds, what can still change after deployment, and what a reader can check on the chain without trusting anyone.

Five contracts make up the protocol. The factory creates a Coffer for a validator at an address known before the creation, and the account that calls it becomes the Coffer’s owner, the validator. Each Coffer is a light copy of one shared implementation and holds one validator’s terms, balance and bonds. The bond NFT is one contract for every bond of every Coffer, and it registers the Coffers the factory created. The redemption escrow holds the maturity value of the bonds a validator settled, until the holder claims it. The fee curve sets the protocol fee by the time since its own deployment and pools the fees for the recipient. The factory deploys the last three and the implementation itself, once, when it is deployed. The marketplace is a sixth contract and a separate system, “not part of the Coffer protocol contracts” in the whitepaper’s words, which needs the bond NFT and WETH and reads a bond’s value from its Coffer. See How a bond works, How trading works, and the addresses on Networks and addresses.

The system contracts and the consensus layer

Section titled “The system contracts and the consensus layer”

A Coffer drives three contracts that the Ethereum protocol itself provides, the deposit contract, the withdrawal request contract and the consolidation request contract. Through them it tops up a validator, requests withdrawals and exits, and converts credentials, and Coffer runs only on chains where the last two exist. What ties a Coffer to a validator is the validator’s withdrawal credentials on the consensus layer. The contracts verify neither that link nor the validator’s balance behind the issue size, the holder checks both before buying, see Before you buy.

The contracts do not read the consensus layer. In the whitepaper’s words, “some parameters relevant to evaluating a bond are computed and presented off-chain rather than read on-chain”. The app presents them and the arithmetic that relates them, so a holder judges a bond from its components and not from one summary number.

After deployment, little can change. The code of every contract is fixed. The protocol’s administrator, the owner of the fee curve, can change one thing, the address that receives the protocol fees, while the fee amounts and their schedule are code. Anyone can send the pooled fees to that address, and the call never pays the caller. A validator owns their Coffer and changes its terms, while bonds are outstanding, only in the holders’ favour, see Terms and what can change. The marketplace’s owner chooses the recipient of the marketplace fees and sweeps them, and the rate is a constant. There is no pause switch anywhere. A default is a state of the code, declared by anyone the moment a matured bond cannot be paid, see Default. The contracts’ source is published on GitHub under a licence the Terms describe, see What is Coffer.

On the chain, with a block explorer or a node of your own, and without the app:

  • A Coffer’s terms, its balance, its outstanding bonds and whether it is in default, and every transaction and event that touched it.
  • A bond’s holder, its maturity value and its remaining value, on the bond NFT and its Coffer.
  • The marketplace’s nonces for a wallet and a bond, whether a holder approved the marketplace, and a bidder’s WETH balance and allowance.
  • On the consensus layer, the validator’s balance, its status and its withdrawal credentials, the link between the validator and its Coffer that the contracts do not verify.

The statuses, the coverage band and the other words the app shows are computed off chain from these facts, see Statuses. What moves funds is a transaction from a wallet, and the checks before one are on Before you buy and Risks.

Ethereum runs the contracts, and after deployment nobody can change them, beyond the fee recipients and each validator’s own terms. The wallet is run by its maker and sends transactions through its own connection to the network. The Terms say who runs the server and the app and what is published, and the Privacy Notice names the providers that handle data along the way.