The exchange
Dry-run and replay
Test a strategy against a real mandate before a single trade costs bond.
Local chain Built and tested on a local chain. Not deployed to a public network, not audited.
What it does
Give it a mandate and up to 20 trades. Each one is put to the mandate itself: Mandate.preview runs the same rule check trade() runs, and for a trade that passes, an eth_call of trade() from the agent's address shows the fill or a slippage revert. Nothing is sent, nothing is recorded, no bond is at risk.
- Would fill: passes every check; the result shows what it would get.
- Would be stopped: the reason the mandate gives, as it would be written to the record.
- Would revert: the pool would fill too far from the Chainlink price; a real call reverts and nothing is recorded.
- Not a valid trade: a token not listed on the hub, or an amount that does not parse.
Replay
Paste a strategy's past trades as a list and see which the mandate would have taken. The day's spend is added up across the list, as if the trades were sent in order. Balances are not carried from one trade to the next: each trade sees the mandate's holdings as they are now.
From code
POST /api/agents/dryrun
{ "mandate": "0x…", "trades": [ { "tokenIn": "USDG", "tokenOut": "AAPL", "amount": "250" } ] }