Resting orders
Buy or sell passively — and earn fees while waiting.
A resting order is an LP position. There is no openPassive opcode in the pool, no order book,
and no keeper: the router labels a capped position, and everything else is machinery that already
exists.
| what the UI calls it | what it is |
|---|---|
| resting buy | a capped position minted above spot — quote-only on entry, converting to base as price falls to the floor |
| resting sell | a dormant position minted below completion — base-only on entry, converting to quote as price rises |
| edit my order | update |
| take my fill without closing | claim |
| partially filled | a position mid-band |
Because it is a position, it can be resized, repriced or edited in place rather than cancelled and re-entered — and it earns fees the entire time it is resting.
Why the cap is what completes them
The pool has one reachable single-asset boundary and one asymptote:
| state | where | reachable? |
|---|---|---|
| 100% base | at the floor , where | yes |
| 100% quote | as , since | no — an asymptote. Only a cap makes it real |
That asymmetry cuts differently for entry than for completion:
| entry (mint with the asset you hold) | completion (reach 100% of the other asset) | |
|---|---|---|
| buy — hold quote, want base | needs the cap: a quote-only mint exists only at | free — completes at 100% base on the floor |
| sell — hold base, want quote | free — a base-only dormant mint | needs the cap: 100% quote only at |
Each direction is half-free without a cap, which is why neither is a clean product without it.
What each side costs without a cap
A sell never finishes. Because , the position retains of base value at every price. Base share after a -fold rise above the trigger is :
| rise from trigger | base still held |
|---|---|
| 2× | 59.1% |
| 10× | 30.3% |
| 100× | 17.8% |
Even a 100× move leaves ~18% in base — a gradual seller you close manually, not a limit order that fills.
A buy is mostly an immediate market buy. Laddering $10,000 of quote down to a floor needs of base up front, bought at spot:
| floor | base needed | share of capital bought immediately | |
|---|---|---|---|
| −10% | 0.105 | $94,912 | 90.5% |
| −25% | 0.288 | $34,761 | 77.7% |
| −50% | 0.693 | $14,427 | 59.1% |
| −75% | 1.386 | $7,213 | 41.9% |
A "passive buy" that front-loads 40–90% as a market order is not a passive buy.
With the cap adopted, both directions complete cleanly and entry is single-asset in each.
Placing one
// resting buy: quote-only entry, cap above spot, floor at the price you want to buy at
router.mintBlended(key, targetFloor, cap, L, 0, maxQuoteIn, recipient, deadline);
// resting sell: base-only entry, floor above spot (dormant)
router.mintBlended(key, targetFloor, cap, L, maxBaseIn, 0, recipient, deadline);
// edit in place — new price, new size, or both
router.update(key, fromId, shares, toFloor, toCap, newL, maxBaseIn, maxQuoteIn, recipient, deadline);
router.move(key, fromId, shares, toFloor, toCap, deadline); // reprice, size pinnedDormant and capped-out mints are exempt from the mint fee — they earn nothing yet, so there is nothing to price. Edits pay only on the net increase in earning exposure, so repricing an unfilled order is free.
Two products at the token layer, not three
| product | what you hold |
|---|---|
| floored — "LP above , keep the upside" | one ERC-6909 id. is an asymptote, so the position is never fully converted and never needs re-entry. The primitive |
| floored / capped — "LP from to " | one ERC-6909 id, the (floor, cap) pair fused indivisibly. Not two tokens: the decomposition contains a short leg, so splitting the id would let a holder sell the long and keep the short |
Both claim, transfer, edit and compose through identical machinery. The choice between them is the choice of whether the position should ever finish.
A holder can of course own both at once — they are ordinary fungible tokens, and a partial cap is exactly that combination. But that is a consequence of holding tokens, not a third product.
What it earns
The same as any other position: over the interval it was active. A resting order is not a favour to the pool that gets paid in fills — it is liquidity, and it is paid as liquidity. See Liquidity provider for what the numbers mean.