The prime broker
Mandate and its checks
Eleven checks, in the contract's order. The first failure stops the trade.
Local chain Built and tested on a local chain. Not deployed to a public network, not audited.
The checks
| # | Check | Reason code |
|---|---|---|
| 01 | The agent's key is inside its expiry | KeyExpired |
| 02 | The mandate is running (no loss-limit halt) | Halted |
| 03 | Both tokens are on the owner's list | NotAllowed |
| 04 | The amount is above zero | ZeroAmount |
| 05 | The mandate holds the amount | Balance |
| 06 | Chainlink returns a price | BadPrice |
| 07 | The price is fresh enough | Stale |
| 08 | Trading in the token is not paused | Paused |
| 09 | No unacknowledged split or corporate action | CorporateAction |
| 10 | The trade fits the per-trade cap | TooBig |
| 11 | The day's total stays under the daily cap | DayLimit |
After the checks
The swap must deliver at least the Chainlink price minus the slippage limit. If it would deliver less, the whole transaction reverts and no bond is lost.
Who can withdraw
Only the mandate's owner, and only to itself. For an agent vault the owner is the vault.