The cap
The cap is one number: the most a trade may cost, as a percentage of the trade, measured against the arrival price.
What it covers
Everything between the arrival price and what you end up with: the pool’s LP fee and price impact, the venue’s protocol and creator fees, the network fee, any tip you set, and Landed’s own fee.
How it is held
The cap is enforced inside the trade’s own transaction, by the landed program.
Reads the pool and records the arrival price, your balances, the side and the cap.
Runs on the venue. A tip, if you set one, is paid here.
Reads your balances again, holds the cap, takes the fee from the room left and emits the fill.
close measures the cost from balances it read itself. A fill that fits goes through. A fill that would cost more than the cap before Landed’s fee makes close fail, and the whole transaction reverts.
Over the cap
When a fill would have gone over, the order panel says “Not filled: over cap” with the cost the fill would have had. Nothing was traded; the network fee was paid. One press retries at a cap that fits, or at the same cap.
Choosing a cap
Presets are 2%, 3%, 5%, and any value from 0.1% to 50% can be typed. The bill tells you before you sign when the expected cost is already over your cap, and offers the cap that would fit.