xpr-cloud-bot XPR Network

You keep your key. You keep your funds. We get one door.

Everything below moves when you move it. Drag the fences, spend the budget, walk a trade through to the moment the chain undoes it. The prices are read from XPR Network while you read.

What a vault is

A new account that belongs to you, with a small program on it. The program keeps your limits, checks the price itself, and has nowhere to send your money except the exchange and back.

What a vault looks likeYour tokens sit in a vault account you own. A small contract on that account holds your limits. You reach the owner-only actions; our bot reaches one action, trade, and nothing else. The contract reads the chain’s price feed and can only send tokens to the exchange and straight back in the same transaction. There is no action that sends tokens anywhere else.your vault accounttokens live herethe rules, running on your own accountowner onlyyour limits, pause, and the code itselftradethe one door our bot can knock onno action that sends tokens to a personyouthe vault’s ownerownour botholds one key, no moneymay callthe chain’s price feedseveral independent providersreadthe exchangethe only place tokens may go,out and straight back againEvery arrow here is a row on the chain. You can read all of them without us, and the prove-it panellinks straight to each one.
Every arrow here is a row on the chain. You can read all of them without us.

Trading bots ask for the wrong kind of trust

There are normally two deals on offer, and they end the same way when the operator is hacked.

Press it. That is the whole argument.
The usual deal

Hand over your key

The bot signs as you. It can place the trades you wanted — and it can also transfer everything you own to anywhere it likes.

total loss
The other usual deal

Hand over your funds

You deposit into the operator’s wallet or pool. What you hold afterwards is a promise, and the tokens are theirs to move.

total loss
What we do instead

Keep both, lend us one door

Your tokens stay in an account you own. The rules live in a small contract on that account, and our key reaches one action inside limits you set.

small, capped, visible

Your vault, one door for us

The contract that holds your rules lives on your own account. Here is every action on it, and what happens when you filter it down to the ones our key can open.

  • tradeplace one immediate-or-cancel order inside your fencesus
  • pausestop everything, with one signature from your own walletyou
  • resumeresume trading after a pause — only your wallet canyou
  • setmarketchange a band, a cap or a cooldownyou
  • settokenlist a token, set its keep flooryou
  • setglobalchange the daily budgetyou
  • setkeeperchange or revoke our permission entirelyyou
  • setpauserchange who can stop ityou
  • initone-time setup, at creationyou
  • delmarketstop trading a market entirelyyou
  • deltokenstop the vault trading a token (it can still hold it)you
  • tradesnapmid-trade: record balancesyou
  • settlemid-trade: check the real amounts and finishyou
  • tradelogwrites the trade into the log — a claim, not proofyou

There is no withdraw in that list, and no action anywhere on the contract that names a recipient. The only address the contract can send tokens to is the exchange, and the same transaction pulls them back.

The price fence

The contract reads the chain’s own price feed, checks it is fresh and backed by several providers, and draws a corridor around it. A sale must be priced above the floor and a purchase below the ceiling. Drag the sliders to see how the corridor moves — this is a simulator of the contract’s own arithmetic, not your vault. Your plan sets these two percentages when the vault is built, and you can change them from your vault page afterwards.

A buy looks unlikely to fill: the last trade on the exchange was 0.003920 and your ceiling is 0.002530. The bot will skip the tick rather than pay more.

Try the fencesreading the chain
Allowed, because it is stricter than your fence
Our bot asked to sell at no less than 0.002447. Your floor is 0.002433. It may only ask for more than your floor, never less — the one direction it is free to move is inward.
Where these two numbers come from
sellFloorRaw(pxBid, pxAsk, 100, 6) = 2433
buyCeilRaw (pxBid, pxAsk, 300, 6) = 2530
pxBid = 0.0024566 USD   (oracles::data feed 3, aggregate)
pxAsk = 1.0                          (XMD is pinned: its feed is still read and must say 1.0)

Both functions are imported from packages/shared, which is a bit-for-bit mirror of the contract’s own arithmetic. Bands are hard-capped at 10% in the code, so no setmarket — yours or ours — can widen them past that. Only replacing the vault’s code could, and only you can do that.

The size fences

A price band alone is not a budget: a good price, asked for often enough, still empties a vault. A cap on each trade and a cap on the day are what close that, and both live in the contract’s own storage rather than in our configuration. These two, the price limits above, and your keep floors are all yours to change from your vault page, one signature each.

Click the hour blocks to spend.
Twenty-four hourly slots$64 of $100

$36 is left in this 24-hour window. The next trade would be at most $25 — the smaller of your per-trade cap and what the budget has room for.

What a keep floor adds on top

The budget is measured in dollars. A keep floor is measured in tokens: the contract refuses any trade that would leave you holding less than the floor of the token being spent. That is what stops a leaked key draining your position into one asset over a few days.

It is also how the one-way plans are enforced, rather than by good behaviour. Saver only ever buys XPR, so its XPR floor is a billion — more than any vault could hold — and a sale of XPR is refused outright. Cash Out is the mirror, with a billion-XMD floor, so it can never buy. Its XPR floor is zero on purpose: its whole job is to sell XPR down to nothing. Each plan’s floors are shown before you pay, and you can raise them at any time.

One trade, start to finish

All of it is a single transaction. Step through it, then break it on purpose and watch the chain undo every part.

Our bot calls trade

1 / 6

It names the next nonce, the market, the side, an amount, and its own limit price. That is the entire surface it has.

What this is on the chain
trade(nonce, market_id, side, amount, limit) — authorised by vault@keeper

The worst day, in dollars

Assume our servers are already breached and the thief is patient and clever. They clear the book, rest their own orders exactly at your band edge, and trade against themselves with our key. This is what that costs you.

$5.00a day, measured against the chain’s price feed
$14.50a day, measured against where the exchange is actually trading

$500 × 1% = $5.00. That is the number the chain can prove, because the contract bounds the price against the feed. The second figure adds the 1.9% gap between the feed and the exchange, which the chain cannot prove and we will not pretend it can. The thief also burns about $0.50 in exchange fees getting there.

Two more things this number leaves out

The window edge. The budget is a 24-slot hourly ring, so the honest statement is “no more than your budget in any rolling 23 hours”. Across a window edge roughly twice the budget can move in about 24 hours. Over D days undetected, the ceiling is (D+1) × budget × band.

Direction, not just value. A thief can convert everything above your keep floors into one asset at band-edge prices. The direct loss is still bounded by the band, but the exposure you end up holding is not the one you chose. Keep floors on both tokens are what bound that, and converting a position of V takes at least V / budget days.

Computed by worstCasePerDayMicro(budget, band) in packages/shared, the mirror of the contract’s own maths.

How a vault gets built for you

You sign two transfers. We build the vault. The last action of the build removes us from it, and you can read that off the chain.

Its owner is your wallet account from the first moment, and only your wallet. Born with the right owner, so there is no owner change for us to sign — the step most setups get wrong does not exist here.

This really happened on mainnet on 18 September 2026, on xcbdtfkhuzkb, one of our own vaults: 72f028…1049 (opens the block explorer in a new tab)

Who ends up holding what

You
  • Your wallet owns the vault. Nobody else is an owner, including us.
  • You can take money out, pause, and resume with one signature each, whether or not our servers are running.
  • Only you can update its code. When we publish a new version, you decide whether to install it.
Us
  • Our bot’s key: can trade inside your limits. Nothing else.
  • The key that built the vault: nothing. It was removed in the last action of the build.
  • No recovery key, no backup of yours, no way to change who owns it.
Keep your wallet safe
Because we hold nothing, we cannot recover a vault for you. The vault belongs to your wallet account, so recovering your WebAuth account the usual way keeps the vault with it. Losing the account for good loses the vault too, just like everything else in that wallet.

How you leave

Take your money out

One signature from your wallet sends it straight from your vault to your wallet. No request comes to us, and there is no exit fee the contract could enforce even if we wanted one. It works whether or not we are still in business.

Or just revoke our door

As the owner, your wallet can remove our bot’s permission entirely and leave the vault sitting there with your tokens in it, still yours, still pausable, simply no longer trading.

Or stop it for now

One signature from your wallet pauses everything, immediately, without going through any server of ours. Resuming takes one signature from you, the owner.