Concepts
Bonds and windows
What stands behind an answer, for how long, and where a lost bond goes.
Every answer on Laplace has SOL locked behind it for a set time. The amount is the model's bond. The time is the model's window. Both are chosen by the model's publisher at registration and never change for that model.
The bond
A model carries bond_lamports: the SOL locked behind each answer to it. Every bond, an operator's or a challenger's, sits in one vault account of the program (seeds ["vault"]).
An operator's bond has two balances:
| Balance | Meaning |
|---|---|
bond_free | Deposited and not behind any answer. answer draws on it. It can be withdrawn. |
bond_locked | Behind answers whose receipts are not final yet. |
What moves a bond:
| Instruction | Movement |
|---|---|
deposit_bond | SOL from the operator's wallet into the vault. bond_free rises by the amount. |
answer | The model's bond moves from bond_free to bond_locked. Fails with InsufficientFreeBond when the free balance is smaller than the model's bond. |
challenge | The challenger sends a bond equal to the model's from their wallet into the vault. |
finalize | The bond behind the answer unlocks: back to bond_free when the answerer is an operator, to the wallet when the answerer is a challenger. |
prove_step, claim_timeout | The losing side's bond leaves the vault: one part to the winner's wallet, the rest to the protocol's fee recipient. |
An operator answering n receipts at once needs n times the model's bond free. The number of further answers an operator can post is its free bond divided by the model's bond, rounded down.
The window
A model carries window_secs. When an answer is posted, the receipt's window_ends_at is set to that moment plus the window. Until then anyone can challenge. After it, with no dispute open, anyone can send finalize.
| Event | Effect on the window |
|---|---|
answer | Starts. |
challenge | Pauses. The time left is stored on the receipt as window_remaining. |
| The challenger loses | Resumes with the time it had left. |
| The defender loses | The challenger's answer stands and a fresh, full window starts. |
finalize | Requires the window to have ended. Earlier it fails with WindowOpen. |
A challenge after the window fails with WindowClosed. Windows read Clock.unix_timestamp, so they are measured in wall-clock seconds.
A lost bond
The side that loses a dispute, by a proven step or by missing a turn, loses its whole bond for that receipt in the same instruction that settles the dispute:
slash_winner_bpsof it, in basis points, goes to the winner's wallet, rounded down.- The rest goes to
Config.fee_recipient, the protocol's fee recipient.
Both payments are SOL sent to a wallet. An operator that wins a dispute receives its part in its wallet, not in its bond balance.
The winner's own bond is untouched. A winning challenger's bond stays locked behind their answer, which now stands on the receipt, until that receipt is final. A winning defender's bond stays locked behind the answer it defended.
The current split is the slash_winner_bps field of the Config account, and GET /v1/network returns it as protocol.slashWinnerBps.
Withdrawing
Free bond leaves through two instructions and a cooldown:
request_withdrawwith an amount marks that much free bond for withdrawal and sets the time it becomes available: now pluswithdraw_cooldown_secsfromConfig.withdraw_bondpays the marked amount from the vault to the operator's wallet once the cooldown has passed and the amount is still free.
An operator has one withdrawal request at a time: a new request_withdraw replaces the amount and restarts the cooldown. The marked amount stays in bond_free until it is paid, so answers can still draw on it.
withdraw_bond before the cooldown fails with WithdrawNotReady, with nothing requested it fails with NoWithdrawal, and a request or withdrawal larger than the free bond fails with InsufficientFreeBond. Locked bond cannot be withdrawn; it becomes free when its receipt is finalized.
Choosing a bond and a window
These are the publisher's two decisions, made once in register_model.
The bond is the price of a wrong answer. An operator that posts a wrong output loses the bond once a watcher runs the model and challenges, so the bond is set above what a wrong answer to this model could be worth to the operator who gives it. A judge that resolves markets carries a bond sized to the markets it resolves.
The window is the time a watcher has to run the model and send one transaction. It is set from how long a run of the model takes on a watcher's machine, with room for the watcher to notice the receipt. The chain adds little: a challenge is one transaction.
Publish a model covers setting both. The models on the network lists the bond and window of each registered model.