A stop-loss that proves it fired.
Approve a token, set a trigger. An unprivileged keeper watches, arms for two blocks, re-checks, then sells for USDC through Uniswap V4. If the fee does not cover the gas, the fill reverts and nobody is paid.
Gas on Arc is USDC. Cost and proceeds are the same unit, so the contract enforces profitability itself — no oracle, no trust in the keeper's arithmetic.
One order, start to finish
Four states, no othersSet
You approve the token and write a trigger price. The app shows the tick it compiles to and the price that tick converts back to, before you sign. A decimals error is visible, not fatal.
Watch
Nothing is custodied and nothing is locked. A keeper — anyone, unprivileged — calls checkOrders each block. If the pool cannot be read, the order says so rather than pretending.
Arm
Price crosses. The order arms and waits two blocks — about a second on Arc — then re-checks. A wick that recovers disarms it. The counter is literal: two blocks, mined.
armed, then re-checked at fill
Fill
The swap executes and the contract checks itself: keeper fee against gas, both in USDC. Short by a cent and the whole transaction reverts. This one cleared.
0xe6b6…48af ↗It refused this one
The more useful of the twoThat order was too small to be worth filling, so it was not filled. The keeper caught it in simulation and spent nothing. Had it been submitted anyway, the contract would have reverted. A system that only ever succeeds tells you nothing about its safety.
0x93bc…0d09 ↗What can go wrong
Read before signingUnaudited
The contracts have not been audited. You are approving a token to code read by its author and a handful of others. Testnet first is not a formality.
Fills need a keeper
Nothing fires on its own. Anyone may run a keeper and nobody can steal with one, but if none is running your order sits unfilled. The app shows whether one has reported recently.
Thin pools slip
A stop on a pool that cannot absorb the sale is worthless. Pools qualify only if a real simulated sell succeeds at the size offered — one candidate with 4.5e24 of nominal liquidity failed that test and was excluded.
Mainnet is capped
maxOrderValueUsdc and maxTotalValueUsdc are enforced on-chain and read live in the app. Testnet is the sandbox; mainnet is deliberately small while this is young.
Everything here is on-chain
Arc testnet · chain 5042002Measured gas, in USDC
Measured on a mainnet fork and on testnet under arc-foundry. Public figures for Arc execution costs disagree with each other; the method is in the repository.
Set one on testnet.
Free tokens, real contracts, the same code path as mainnet — with the caps read live from the chain.