> ## Documentation Index
> Fetch the complete documentation index at: https://docs.defiloops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# The catalogue

> Every operation this build can execute, dumped from the source.

Every operation this build can execute, generated from `adapter.Catalog()` at
`465d7e1-dirty` — **58 adapters**. It is not a summary of the catalogue; it *is*
the catalogue, dumped. If an operation is not on this page, no pipeline can name
it, because [Adapters](/adapters) has no escape hatch to an unregistered call.

Copy the **ref** exactly, version included. An unversioned reference is refused —
see [Adapters](/adapters) for why.

## All of them, at a glance

| ref                              | chains                   | produces                  | settles |
| -------------------------------- | ------------------------ | ------------------------- | ------- |
| `aavev4.borrow@v1.1`             | ethereum                 | an amount                 | —       |
| `aavev4.repay@v1.1`              | ethereum                 | —                         | —       |
| `aavev4.supply@v1.1`             | ethereum                 | —                         | —       |
| `aavev4.withdraw@v1.1`           | ethereum                 | an amount                 | —       |
| `bridge.cctp@v1.1`               | ethereum, base, arbitrum | an amount                 | yes     |
| `bridge.fake_across@v1.1`        | ethereum, base, arbitrum | an amount                 | yes     |
| `cow.presign@v1.0`               | ethereum, base, arbitrum | —                         | —       |
| `deposit.pull@v1.1`              | ethereum, base, arbitrum | an amount                 | —       |
| `lend.borrow@v1.1`               | ethereum, base, arbitrum | an amount                 | —       |
| `lend.repay@v1.1`                | ethereum, base, arbitrum | —                         | —       |
| `lend.supply@v1.1`               | ethereum, base, arbitrum | —                         | —       |
| `lend.withdraw@v1.1`             | ethereum, base, arbitrum | an amount                 | —       |
| `loan.close@v1.1`                | ethereum, base, arbitrum | an amount                 | —       |
| `loan.shift@v1.1`                | ethereum, base, arbitrum | an amount                 | —       |
| `morpho.borrow@v1.1`             | ethereum, base, arbitrum | an amount                 | —       |
| `morpho.repay@v1.1`              | ethereum, base, arbitrum | —                         | —       |
| `morpho.supply@v1.1`             | ethereum, base, arbitrum | —                         | —       |
| `morpho.withdraw@v1.1`           | ethereum, base, arbitrum | an amount                 | —       |
| `property.buy@v1.0`              | base                     | —                         | —       |
| `property.sell@v1.0`             | base                     | an amount                 | —       |
| `rent.claim_own@v1.0`            | base                     | a lock NFT id             | —       |
| `rent.claim_position@v1.0`       | base                     | an amount                 | —       |
| `rent.harvest_delegated@v1.0`    | base                     | —                         | —       |
| `rent.redeem@v1.0`               | base                     | an amount                 | —       |
| `revert.add_from_aave@v1.0`      | ethereum, base, arbitrum | —                         | —       |
| `revert.add_leverage@v1.0`       | ethereum, base, arbitrum | —                         | —       |
| `revert.add_liquidity@v1.0`      | ethereum, base, arbitrum | —                         | —       |
| `revert.borrow@v1.0`             | ethereum, base, arbitrum | an amount                 | —       |
| `revert.close_levered@v1.0`      | ethereum, base, arbitrum | an amount                 | —       |
| `revert.collect_fees@v1.0`       | ethereum, base, arbitrum | an amount                 | —       |
| `revert.create_borrow@v1.0`      | ethereum, base, arbitrum | an amount                 | —       |
| `revert.exit_to_aave@v1.0`       | ethereum, base, arbitrum | —                         | —       |
| `revert.exit_to_aave_long@v1.0`  | ethereum, base, arbitrum | —                         | —       |
| `revert.exit_to_aave_one@v1.0`   | ethereum, base, arbitrum | —                         | —       |
| `revert.exit_to_aave_short@v1.0` | ethereum, base, arbitrum | —                         | —       |
| `revert.mint_create_borrow@v1.0` | ethereum, base, arbitrum | an amount                 | —       |
| `revert.move_from_aave@v1.0`     | ethereum, base, arbitrum | a uniswap position NFT id | —       |
| `revert.open_levered@v1.0`       | ethereum, base, arbitrum | a uniswap position NFT id | —       |
| `revert.rebalance@v1.0`          | ethereum, base, arbitrum | a uniswap position NFT id | —       |
| `revert.remove@v1.0`             | ethereum, base, arbitrum | a uniswap position NFT id | —       |
| `revert.remove_liquidity@v1.0`   | ethereum, base, arbitrum | —                         | —       |
| `revert.repay@v1.0`              | ethereum, base, arbitrum | —                         | —       |
| `revert.repay_withdraw@v1.0`     | ethereum, base, arbitrum | an amount                 | —       |
| `revert.reposition@v1.0`         | ethereum, base, arbitrum | a uniswap position NFT id | —       |
| `revert.split@v2.0`              | ethereum, base, arbitrum | a uniswap position NFT id | —       |
| `swap.router@v1.1`               | base, arbitrum, ethereum | an amount                 | —       |
| `transfer.erc20@v1.1`            | ethereum, base, arbitrum | —                         | —       |
| `transfer.native@v1.1`           | ethereum, base, arbitrum | —                         | —       |
| `uni.close_at_tick@v1.0`         | ethereum, base, arbitrum | an amount                 | —       |
| `uni.collect@v1.0`               | ethereum, base, arbitrum | an amount                 | —       |
| `uni.decrease@v1.0`              | ethereum, base, arbitrum | an amount                 | —       |
| `uni.increase@v1.0`              | ethereum, base, arbitrum | —                         | —       |
| `uni.mint@v1.0`                  | ethereum, base, arbitrum | a uniswap position NFT id | —       |
| `uni.mint_single@v1.0`           | ethereum, base, arbitrum | a uniswap position NFT id | —       |
| `uni.rebalance@v1.0`             | ethereum, base, arbitrum | a uniswap position NFT id | —       |
| `uni.reposition@v1.0`            | ethereum, base, arbitrum | a uniswap position NFT id | —       |
| `uni.split@v2.0`                 | ethereum, base, arbitrum | a uniswap position NFT id | —       |
| `uni.withdraw@v1.0`              | ethereum, base, arbitrum | an amount                 | —       |

## 0xequity property shares

### `property.buy@v1.0`

Buy 0xequity property tokens. The venue prices the trade from its own oracle, so the amount is a TOKEN COUNT and what a plan bounds is the currency side.

* **Chains** base
* **Its own amount is** a share count
* **Asset** comes from the `currency` parameter
* **Produces** nothing a later step may refer to

| parameter   | kind     | required | meaning                                                                                                                                                                                                                                                                        |
| ----------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `property`  | property | yes      | The share register's SYMBOL, never an address — "WXRWA1" is the only one this build curates. Write it the same way in a buy, a sell and every rent step: either case is accepted and the compiler gives each contract the spelling it keys on.                                 |
| `currency`  | asset    | yes      | The token the trade settles in — "USDC" on Base, which is what the venue prices in. max\_spend and min\_receive are in ITS raw units: USDC has 6 decimals, so "500000000" is 500.00.                                                                                           |
| `max_spend` | amount   | yes      | The MOST currency this buy may part with, in `currency`'s raw base units — USDC has 6 decimals, so "999900000" is 999.90 USDC, which is 99 shares at 10.10 each. Amount beside it is a COUNT OF WHOLE SHARES, not money; writing the same number in both is the usual mistake. |

### `property.sell@v1.0`

Sell 0xequity property tokens. Requires the ACCOUNT to hold them, which it does only once enrolled — the router pulls from msg.sender.

* **Chains** base
* **Its own amount is** a share count
* **Asset** comes from the `currency` parameter
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter     | kind     | required | meaning                                                                                                                                                                                                                                                                                         |
| ------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `property`    | property | yes      | The share register's SYMBOL, never an address — "WXRWA1" is the only one this build curates. Write it the same way in a buy, a sell and every rent step: either case is accepted and the compiler gives each contract the spelling it keys on.                                                  |
| `currency`    | asset    | yes      | The token the trade settles in — "USDC" on Base, which is what the venue prices in. max\_spend and min\_receive are in ITS raw units: USDC has 6 decimals, so "500000000" is 500.00.                                                                                                            |
| `min_receive` | amount   | yes      | The LEAST currency this sell must bring in, in `currency`'s raw base units — USDC has 6 decimals, so "500000000" is 500.00 USDC. The venue prices the trade from its own oracle, so this is the only bound between the signed intent and whatever that oracle says; zero is refused at signing. |

## Aave v3 — supply, borrow, repay, withdraw

### `lend.borrow@v1.1`

Borrow against supplied collateral.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter     | kind  | required | meaning                                                                                                                                                                                                                                        |
| ------------- | ----- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `asset`       | asset | yes      | The token this step acts on at Aave v3, by symbol on this step's chain — "USDC". Aave v3 is one pool per chain, so there is no market to name; an asset this build confines to another venue is refused naming the venue that has it.          |
| `max_ltv_bps` | bps   | yes      | Loan-to-value ceiling the position may reach AFTER this step, in basis points: "5000" is 50%, 0 is refused. Leave headroom — aim at half with "6000", because collateral bought by an earlier step arrives worth slightly less than was spent. |

### `lend.repay@v1.1`

Repay borrowed principal to Aave. Repays an EXACT amount: interest accrues every block, so "all" is a number nobody signed.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Produces** nothing a later step may refer to

| parameter | kind  | required | meaning                                                                                                                                                                                                                               |
| --------- | ----- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `asset`   | asset | yes      | The token this step acts on at Aave v3, by symbol on this step's chain — "USDC". Aave v3 is one pool per chain, so there is no market to name; an asset this build confines to another venue is refused naming the venue that has it. |

### `lend.supply@v1.1`

Supply an asset as collateral.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Produces** nothing a later step may refer to

| parameter | kind  | required | meaning                                                                                                                                                                                                                               |
| --------- | ----- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `asset`   | asset | yes      | The token this step acts on at Aave v3, by symbol on this step's chain — "USDC". Aave v3 is one pool per chain, so there is no market to name; an asset this build confines to another venue is refused naming the venue that has it. |

### `lend.withdraw@v1.1`

Take supplied collateral back out of Aave. Carries a loan-to-value cap because removing collateral raises the ratio on whatever debt remains.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter     | kind  | required | meaning                                                                                                                                                                                                                                        |
| ------------- | ----- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `asset`       | asset | yes      | The token this step acts on at Aave v3, by symbol on this step's chain — "USDC". Aave v3 is one pool per chain, so there is no market to name; an asset this build confines to another venue is refused naming the venue that has it.          |
| `max_ltv_bps` | bps   | yes      | Loan-to-value ceiling the position may reach AFTER this step, in basis points: "5000" is 50%, 0 is refused. Leave headroom — aim at half with "6000", because collateral bought by an earlier step arrives worth slightly less than was spent. |

## Aave v4 — supply, borrow, repay, withdraw

### `aavev4.borrow@v1.1`

Borrow from an Aave v4 spoke. The collateral backing it must have been enabled — aavev4.supply does that as part of its step.

* **Chains** ethereum
* **Its own amount is** an amount
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter     | kind   | required | meaning                                                                                                                                                                                                                                               |
| ------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `asset`       | asset  | yes      | The token, by symbol, and the SPOKE named in `market` must list it: "main" holds WETH, wstETH, WBTC, USDC and USDT; "gold" holds native XAUt, USDC and USDT. An unlisted asset is refused rather than defaulted, because reserve 0 is a real reserve. |
| `market`      | market | yes      | The Aave v4 SPOKE, not a Morpho market: "main" (WETH, wstETH, WBTC, USDC, USDT) or "gold" (native XAUt, USDC, USDT). Each spoke counts only collateral supplied to ITSELF, so name the one your collateral is in.                                     |
| `max_ltv_bps` | bps    | yes      | Loan-to-value ceiling the position may reach AFTER this step, in basis points: "5000" is 50%, 0 is refused. Leave headroom — aim at half with "6000", because collateral bought by an earlier step arrives worth slightly less than was spent.        |

### `aavev4.repay@v1.1`

Repay borrowed principal to an Aave v4 spoke.

* **Chains** ethereum
* **Its own amount is** an amount
* **Produces** nothing a later step may refer to

| parameter | kind   | required | meaning                                                                                                                                                                                                                                               |
| --------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `asset`   | asset  | yes      | The token, by symbol, and the SPOKE named in `market` must list it: "main" holds WETH, wstETH, WBTC, USDC and USDT; "gold" holds native XAUt, USDC and USDT. An unlisted asset is refused rather than defaulted, because reserve 0 is a real reserve. |
| `market`  | market | yes      | The Aave v4 SPOKE, not a Morpho market: "main" (WETH, wstETH, WBTC, USDC, USDT) or "gold" (native XAUt, USDC, USDT). Each spoke counts only collateral supplied to ITSELF, so name the one your collateral is in.                                     |

### `aavev4.supply@v1.1`

Supply collateral into an Aave v4 spoke. THREE calls: approve, supply, and setUsingAsCollateral — v4 treats a supply as a deposit until it is explicitly marked as collateral. The Gold Spoke holds NATIVE XAUt, which no other venue here does.

* **Chains** ethereum
* **Its own amount is** an amount
* **Produces** nothing a later step may refer to

| parameter | kind   | required | meaning                                                                                                                                                                                                                                               |
| --------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `asset`   | asset  | yes      | The token, by symbol, and the SPOKE named in `market` must list it: "main" holds WETH, wstETH, WBTC, USDC and USDT; "gold" holds native XAUt, USDC and USDT. An unlisted asset is refused rather than defaulted, because reserve 0 is a real reserve. |
| `market`  | market | yes      | The Aave v4 SPOKE, not a Morpho market: "main" (WETH, wstETH, WBTC, USDC, USDT) or "gold" (native XAUt, USDC, USDT). Each spoke counts only collateral supplied to ITSELF, so name the one your collateral is in.                                     |

### `aavev4.withdraw@v1.1`

Withdraw collateral from an Aave v4 spoke.

* **Chains** ethereum
* **Its own amount is** an amount
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter     | kind   | required | meaning                                                                                                                                                                                                                                               |
| ------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `asset`       | asset  | yes      | The token, by symbol, and the SPOKE named in `market` must list it: "main" holds WETH, wstETH, WBTC, USDC and USDT; "gold" holds native XAUt, USDC and USDT. An unlisted asset is refused rather than defaulted, because reserve 0 is a real reserve. |
| `market`      | market | yes      | The Aave v4 SPOKE, not a Morpho market: "main" (WETH, wstETH, WBTC, USDC, USDT) or "gold" (native XAUt, USDC, USDT). Each spoke counts only collateral supplied to ITSELF, so name the one your collateral is in.                                     |
| `max_ltv_bps` | bps    | yes      | Loan-to-value ceiling the position may reach AFTER this step, in basis points: "5000" is 50%, 0 is refused. Leave headroom — aim at half with "6000", because collateral bought by an earlier step arrives worth slightly less than was spent.        |

## Crossing chains

### `bridge.cctp@v1.1`

Move USDC to another chain. Settles OUT OF BAND: roughly fifteen minutes, and the destination step must not start before the source step is final. What lands is LESS than what was sent.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Asset** fixed at USDC — the plan does not name one
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`
* **Settles out of band** — completion waits on something outside the transaction

| parameter     | kind    | required | meaning                                                                                                                                                                                                                            |
| ------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `destination` | chain   | yes      | The chain the value LANDS on, lowercase and exactly: "ethereum", "base" or "arbitrum". It must differ from the step's own Chain, and the far-side step spends \{"Symbolic": "\<this step>.output"} because less arrives than left. |
| `to`          | account | yes      | WHERE the crossing is paid out on the DESTINATION chain, as a named role and never an address: "owner\_account" (the operating address, which is what a later step on that chain spends from) or "owner\_wallet".                  |

### `bridge.fake_across@v1.1`

Move an asset to another chain through the fork-only bridge. Behaves like the real ones where it matters: the deposit is FINAL before anything arrives, arrival is out of band and minutes later, the filler pays from inventory and can run out, and what lands is LESS than what was sent.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`
* **Settles out of band** — completion waits on something outside the transaction

| parameter     | kind    | required | meaning                                                                                                                                                                                                                            |
| ------------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `asset`       | asset   | yes      | The token to send across, by SYMBOL on THIS chain — "USDC". It must also exist on `destination`: bridging to a chain that does not carry it locks the value here with nothing that can pay it out there.                           |
| `destination` | chain   | yes      | The chain the value LANDS on, lowercase and exactly: "ethereum", "base" or "arbitrum". It must differ from the step's own Chain, and the far-side step spends \{"Symbolic": "\<this step>.output"} because less arrives than left. |
| `to`          | account | yes      | WHERE the crossing is paid out on the DESTINATION chain, as a named role and never an address: "owner\_account" (the operating address, which is what a later step on that chain spends from) or "owner\_wallet".                  |

## Exchanging one asset for another

### `cow.presign@v1.0`

Place a CoW Protocol LIMIT ORDER by on-chain pre-signature — no signature is handed out. Sells `sell` for at least `buy_min` of `buy`, delivered to the ACCOUNT, and settles OUT OF BAND when a solver fills it or expires at `valid_to`. Nothing lands if it does not fill; what lands is at least `buy_min`. The receiver cannot be redirected — the adapter rebuilds the order hash forcing it to the account.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Asset** comes from the `sell` parameter
* **Produces** nothing a later step may refer to

| parameter  | kind     | required | meaning                                                                                                                                                                                                                                                                                                   |
| ---------- | -------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sell`     | asset    | yes      | The token the resting order SELLS, by symbol on this step's chain — "cbBTC", never an address — and the unit the step's own Amount is in: cbBTC has 8 decimals, so "100000000" is 1 cbBTC. One resting order per sell token at a time; a second step selling the same token on the same chain is refused. |
| `buy`      | asset    | yes      | The token the order BUYS, by symbol on the same chain as `sell` — "USDC" — and the unit `buy_min` is written in: USDC has 6 decimals, so "81000000000" is 81,000.00. It arrives out of band whenever a solver fills, so no later step can spend it.                                                       |
| `buy_min`  | amount   | yes      | The floor: the least of `buy` the order will accept for the whole `sell`. This is the limit price, signed and enforced.                                                                                                                                                                                   |
| `valid_to` | deadline | yes      | Unix seconds at which the resting order expires. A resting order outlives the intent's own submission deadline, so it is stated separately.                                                                                                                                                               |
| `partial`  | flag     | no       | Accept a SHORT FILL. Default false (fill-or-kill). True is what a resting order wants, but nothing downstream can spend a partial fill.                                                                                                                                                                   |

### `swap.router@v1.1`

Swap through the first-party aggregating router. The route is computed off-chain and is therefore UNTRUSTED: the protection is the minimum output, not inspection of the route.

* **Chains** base, arbitrum, ethereum
* **Its own amount is** an amount
* **Asset** comes from the `asset_in` parameter
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter        | kind   | required | meaning                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ---------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `asset_in`       | asset  | yes      | The token being SPENT, by symbol on this step's chain — the step's own Amount is a raw quantity of it: with "USDC", Amount "1000000000" is 1,000 USDC.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `asset_out`      | asset  | yes      | The token being BOUGHT, by symbol on the SAME chain — a swap never crosses chains, so both sides resolve against this step's chain. "cbBTC". min\_out is in its raw units, and so is the LEFT half of limit\_price: the rate reads "\<asset\_out units>/\<asset\_in units>".                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `max_slippage`   | bps    | no       | Price tolerance for the sale this step makes, in basis points: "100" is 1%. It never reaches the chain — it is handed to the quoter and what gets signed is the minimum output it produces, so it is a tolerance around the market AT COMPILE TIME; a plan that waits on a trigger wants limit\_price instead.  REQUIRED ONLY WHEN NO PRICE IS STATED. The floor has to come from somewhere: either you name it (limit\_price, min\_out) or it is derived from a quote at this tolerance. With a price stated this is IGNORED — measured identical floors at 1, 100 and 500 — and it used to be demanded anyway, so every plan that named its own price also had to supply a number that could not matter. The layer below refuses the pair outright: with a limit the floor IS the caller's rate, and a tolerance would be a second and conflicting guarantee.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `partial`        | flag   | no       | Accept a SHORT FILL. Default false, which is fill-or-kill: an order for \$1m that can only fill 40% reverts and moves nothing. True takes the 40% and leaves the rest, which is what a resting order wants — but a later step spending "what the swap produced" then refers to a smaller number than the plan assumed, so only say true when the rest of the plan can absorb it.  IT SETTLES THE SIZE AT COMPILE. With a stated price the book is asked what that price reaches and the step is signed for THAT, floor recomputed to match — because a floor cannot be scaled once it is signed, and the router enforces it as a hard minimum. Before that, a plan run directly was signed for the whole offer and any short fill reverted on its own floor. A price nothing fills is refused: a plan runs now, and an order is what waits.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `limit_price`    | price  | no       | ONLY WHEN SOMEBODY NAMED A PRICE. The default for a swap is max\_slippage alone, which derives the floor from a quote that already has the venue's fee taken out; a floor nobody asked for is a way to fail. Also note a stated floor is the WHOLE floor -- max\_slippage is not consulted beside one. THE PRICE, as a rate: "\<asset\_out units>/\<asset\_in units>". "1245477/1000000000" means 1000 USDC must buy at least 0.01245477 cbBTC — cbBTC has EIGHT decimals, so 1245477 raw is a hundredth of a coin, not one and a quarter. The floor for whatever size actually runs is worked out from it, and it is the field to reach for: min\_out below says the same thing in a form that only holds for one size.  IT DOES NOT MAKE THE TRADE WAIT. This is a FLOOR on a step that runs as soon as the plan does: if the price is not there, the step FAILS -- it does not rest and try again later, and the run stops. A plan runs now, and an order is what waits.  So "sell at 5000 or better, leave it resting until it fills" is NOT this field on its own. Two things wait, and one of them is needed as well:   - place\_order -- a TRIGGER on a saved plan. It holds no signature, compiles fresh each time it fires, and can rest for days without going stale. Point it at a swap.router plan that carries this field. This is the usual answer.   - cow\.presign -- an off-chain CoW order that rests on their book. Setting limit\_price and saving the plan is a plan that tries once and stops, which is a different and riskier thing from what was asked for. |
| `min_out`        | amount | no       | ONLY WHEN SOMEBODY PINNED AN EXACT AMOUNT. The default for a swap is max\_slippage alone; a floor nobody asked for is a way to fail rather than a protection. The same floor as an ABSOLUTE amount in asset\_out's raw units. Only meaningful beside a fixed size — change the amount and this becomes a different price — so prefer limit\_price unless the size is pinned. Setting both is refused rather than resolved. Leave both out and the floor comes from the quote at execution time, which is a tolerance around whatever the market happens to be then, not a price anybody chose.  A STATED FLOOR IS THE WHOLE FLOOR. max\_slippage is NOT consulted beside min\_out or limit\_price — the number you write is the number the router must clear, and nothing widens it. Writing both does not give you a tolerance around your floor; the tolerance is ignored.  So do not set min\_out to the whole quoted output. The venue keeps its own fee out of what it pays — the first-party router takes 10 bps — so a floor equal to the quote cannot be met by construction. Leave room, or give max\_slippage ALONE and let the floor be derived from a quote that already accounts for it.                                                                                                                                                                                                                                                                                                                                                                                |
| `max_cost_bps`   | bps    | no       | Trade at most what the BOOK TAKES within this cost bound, in basis points. The router's sizing ladder is asked how large a trade fills at or better than the bound, and the offer is capped there.  A DIFFERENT QUESTION FROM max\_impact\_bps, though both are bps. This asks how big a trade fits before a size is chosen; that one caps what a size already chosen does to the pool. They may be given together — one bounds the size the book will take, the other bounds its footprint — and neither is a price: limit\_price is what to accept, these are how much to offer.  It can only make the trade SMALLER, so a plan cannot use it to spend more than it asked for. Omit it for no bound; zero is refused, being a request for the largest trade that costs nothing, which is none.  IT CANNOT BE COMBINED WITH min\_out. That is an absolute amount and means what its author meant beside the size they wrote; a bound that changes the size would leave it meaning something nobody chose. Use limit\_price, which is a rate and holds at any size.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `max_impact_bps` | bps    | no       | A ceiling on the PRICE IMPACT this trade may cause, in basis points: "5" is 0.05%. The offer is shrunk until the impact fits, so a size the pool cannot absorb becomes a smaller trade rather than a worse price.  A DIFFERENT QUESTION FROM limit\_price, and independent of it. A limit is a price and the pool stops when its marginal rate reaches it; this is about the trade's own footprint. Either may be given alone. Given both, the router reports which one bound.  It is also different from max\_slippage, which is a tolerance around the quote and protects the trip to the chain. This bounds what the trade does TO the market, which is what matters for a size big enough to move it — and for a resting order that will take repeated bites out of the same pool.  Omit it for no cap. Zero is refused rather than read as "no cap": it would ask for a trade that moves the pool not at all, which nothing fills.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

## Morpho Blue — curated markets only

### `morpho.borrow@v1.1`

Borrow the loan asset of a curated Morpho market.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter     | kind   | required | meaning                                                                                                                                                                                                                                        |
| ------------- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `asset`       | asset  | yes      | The named market's LOAN token, by symbol: `wsteth-usdc` borrows and repays "USDC", not "wstETH". The collateral side is the other adapter's parameter.                                                                                         |
| `market`      | market | yes      | The curated Morpho market, by NAME and never an id, spelled "\<collateral>-\<loan>" in lowercase: "wsteth-usdc". The set differs per chain — list\_capabilities prints the ones legal on this step's chain.                                    |
| `max_ltv_bps` | bps    | yes      | Loan-to-value ceiling the position may reach AFTER this step, in basis points: "5000" is 50%, 0 is refused. Leave headroom — aim at half with "6000", because collateral bought by an earlier step arrives worth slightly less than was spent. |

### `morpho.repay@v1.1`

Repay borrowed principal to a curated Morpho market.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Produces** nothing a later step may refer to

| parameter | kind   | required | meaning                                                                                                                                                                                                     |
| --------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `asset`   | asset  | yes      | The named market's LOAN token, by symbol: `wsteth-usdc` borrows and repays "USDC", not "wstETH". The collateral side is the other adapter's parameter.                                                      |
| `market`  | market | yes      | The curated Morpho market, by NAME and never an id, spelled "\<collateral>-\<loan>" in lowercase: "wsteth-usdc". The set differs per chain — list\_capabilities prints the ones legal on this step's chain. |

### `morpho.supply@v1.1`

Put up the COLLATERAL of a curated Morpho market. `asset` must be that market's collateral token — wsteth-usdc takes wstETH, not USDC — and a market is named \<collateral>-\<loan>. It earns NO YIELD: collateral in Morpho backs a borrow and accrues nothing. Lending the loan token to earn the supply rate is a different call this system does not make, so a Morpho supply APY is not something a plan can take.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Produces** nothing a later step may refer to

| parameter | kind   | required | meaning                                                                                                                                                                                                                               |
| --------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `asset`   | asset  | yes      | The named market's COLLATERAL token, by symbol: `wsteth-usdc` takes "wstETH", not "USDC". Naming the loan side is refused — Morpho moves whatever the market says its collateral is, so the plan would mean something it did not say. |
| `market`  | market | yes      | The curated Morpho market, by NAME and never an id, spelled "\<collateral>-\<loan>" in lowercase: "wsteth-usdc". The set differs per chain — list\_capabilities prints the ones legal on this step's chain.                           |

### `morpho.withdraw@v1.1`

Withdraw collateral from a curated Morpho market.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter     | kind   | required | meaning                                                                                                                                                                                                                                        |
| ------------- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `asset`       | asset  | yes      | The named market's COLLATERAL token, by symbol: `wsteth-usdc` takes "wstETH", not "USDC". Naming the loan side is refused — Morpho moves whatever the market says its collateral is, so the plan would mean something it did not say.          |
| `market`      | market | yes      | The curated Morpho market, by NAME and never an id, spelled "\<collateral>-\<loan>" in lowercase: "wsteth-usdc". The set differs per chain — list\_capabilities prints the ones legal on this step's chain.                                    |
| `max_ltv_bps` | bps    | yes      | Loan-to-value ceiling the position may reach AFTER this step, in basis points: "5000" is 50%, 0 is refused. Leave headroom — aim at half with "6000", because collateral bought by an earlier step arrives worth slightly less than was spent. |

## Moving value into the account

### `deposit.pull@v1.1`

Draw tokens the OWNER has approved into the account. The source is the owner's own wallet and is read from the account, so there is nothing to point it at; the amount is bounded by the allowance they granted and by this adapter's cap. Use it as the FIRST step when the account is empty and the owner's wallet is not.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter | kind  | required | meaning                                                                                                                                                                                                                                       |
| --------- | ----- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `asset`   | asset | yes      | The token, by SYMBOL and never an address, resolved on THIS step's chain: "USDC", "WETH", "cbBTC" on Base, "WBTC" on Ethereum and Arbitrum. Case does not matter, and "ETH" resolves to WETH — native ETH moves only through transfer.native. |

## Moving value out of the account

### `transfer.erc20@v1.1`

Move an ERC-20 token.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Produces** nothing a later step may refer to

| parameter | kind    | required | meaning                                                                                                                                                                                                                                       |
| --------- | ------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `asset`   | asset   | yes      | The token, by SYMBOL and never an address, resolved on THIS step's chain: "USDC", "WETH", "cbBTC" on Base, "WBTC" on Ethereum and Arbitrum. Case does not matter, and "ETH" resolves to WETH — native ETH moves only through transfer.native. |
| `to`      | account | yes      | WHERE it lands, as a named ROLE and never an address: "owner\_account" (the operating address every plan spends from) or "owner\_wallet" (the owner's own EOA). Those two, lowercase, and nothing else.                                       |

### `transfer.native@v1.1`

Move the chain's native token by transaction value.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Asset** fixed at ETH — the plan does not name one
* **Produces** nothing a later step may refer to

| parameter | kind    | required | meaning                                                                                                                                                                                                 |
| --------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `to`      | account | yes      | WHERE it lands, as a named ROLE and never an address: "owner\_account" (the operating address every plan spends from) or "owner\_wallet" (the owner's own EOA). Those two, lowercase, and nothing else. |

## Rent income

### `rent.claim_own@v1.0`

Collect rent on property the ACCOUNT itself holds. Needs the account enrolled on 0xequity and holding property; otherwise it harvests nothing and succeeds. Mints a lock NFT rather than paying out.

* **Chains** base
* **Its own amount is** all of whatever is there
* **Asset** fixed at USDC — the plan does not name one
* **Produces** a lock NFT id, referable as `{"Symbolic": "<step>.output"}`

| parameter  | kind     | required | meaning                                                                                                                                                                                                                                        |
| ---------- | -------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `property` | property | yes      | The share register's SYMBOL, never an address — "WXRWA1" is the only one this build curates. Write it the same way in a buy, a sell and every rent step: either case is accepted and the compiler gives each contract the spelling it keys on. |

### `rent.claim_position@v1.0`

Collect this account's share of a rent position's harvested rent, paid in USDC and spendable by a later step exactly as rent.redeem's output is. The amount is the POSITION token id, not a quantity — the same shape as rent.redeem's lock NFT id. The recipient is not chosen here: the forwarder pays whoever the position's owner nominated, and the adapter refuses a position that pays neither this account nor its owner.

* **Chains** base
* **Its own amount is** a rent position id
* **Asset** fixed at USDC — the plan does not name one
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

Takes no parameters.

### `rent.harvest_delegated@v1.0`

Drive 0xequity's rent automation for the OWNER's holding, when the owner delegated through RentDelegatee and created rent positions. Harvests, redeems and splits across those positions. DELIVERS THIS ACCOUNT NOTHING — the rent lands in the owner's positions and the un-delegated remainder in the owner's wallet — so nothing may spend its output. Pair it with rent.claim\_position, which collects this account's share. Needs the owner's one global delegatee slot pointed at RentDelegatee, which the run checks before it commits.

* **Chains** base
* **Its own amount is** all of whatever is there
* **Asset** fixed at USDC — the plan does not name one
* **Produces** nothing a later step may refer to

| parameter  | kind     | required | meaning                                                                                                                                                                                                                                        |
| ---------- | -------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `property` | property | yes      | The share register's SYMBOL, never an address — "WXRWA1" is the only one this build curates. Write it the same way in a buy, a sell and every rent step: either case is accepted and the compiler gives each contract the spelling it keys on. |

### `rent.redeem@v1.0`

TURN A RENT LOCK INTO MONEY. Redeems a matured lock NFT and delivers USDC to this account -- NOT a rent token, and nothing needs selling afterwards. A later step may spend the output directly: `&#123;"Symbolic": "&lt;this step>.output"}` with asset USDC is how rent repays a loan. The amount is the lock NFT id, not a quantity -- rent.claim\_own mints one rather than paying out, and this is what turns it into tokens.

* **Chains** base
* **Its own amount is** a lock NFT id
* **Asset** fixed at USDC — the plan does not name one
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

Takes no parameters.

## Revert Lend — borrowing against a position

### `revert.add_from_aave@v1.0`

Pull Aave collateral into an existing Revert Uni NFT inside a Morpho flash.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** nothing a later step may refer to

| parameter | kind  | required | meaning                                                                                                                   |
| --------- | ----- | -------- | ------------------------------------------------------------------------------------------------------------------------- |
| `token0`  | asset | yes      | token0 of the existing NFT, by SYMBOL: "WETH". Extra collateral is withdrawn from Aave and added as liquidity.            |
| `asset`   | asset | yes      | The flash-loaned ASSET, by SYMBOL: "USDC". Clears Revert so the NFT can take more liquidity, then the borrow is restored. |

### `revert.add_leverage@v1.0`

Increase leverage on a Revert Uni position by adding the flash-loaned asset as liquidity.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** nothing a later step may refer to

| parameter | kind  | required | meaning                                                                                                             |
| --------- | ----- | -------- | ------------------------------------------------------------------------------------------------------------------- |
| `token0`  | asset | yes      | token0 of the existing position, by SYMBOL: "WETH". token1 is the flash-loaned side being added as extra liquidity. |
| `asset`   | asset | yes      | The flash-loaned ASSET, by SYMBOL: "USDC". Part of it is added as liquidity; the rest is re-borrowed from Revert.   |

### `revert.add_liquidity@v1.0`

Increase liquidity on a Revert-levered Uni NFT inside a Morpho flash.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** nothing a later step may refer to

| parameter | kind  | required | meaning                                                                                                         |
| --------- | ----- | -------- | --------------------------------------------------------------------------------------------------------------- |
| `token0`  | asset | yes      | token0 being added, by SYMBOL: "WETH". Cap is charged on both sides of the pair before the NPM increase.        |
| `asset`   | asset | yes      | The flash-loaned ASSET, by SYMBOL: "USDC". Used to repay Revert, add liquidity, then re-borrow to repay Morpho. |

### `revert.borrow@v1.0`

Borrow more USDC against an existing Revert position. Proceeds land on the account.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** fixed at USDC — the plan does not name one
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter       | kind   | required | meaning                                                                                                                                                                                          |
| --------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `borrow_amount` | amount | yes      | How much of `asset` to borrow, in that token's raw units. Required: this step's Amount is the position id, so nothing else says a size, and a borrow of zero is a transaction that does nothing. |
| `asset`         | asset  | yes      | The vault's borrow ASSET, by SYMBOL: "USDC". The NFT must already live in the vault; the adapter checks owner after create.                                                                      |

### `revert.close_levered@v1.0`

Close a Revert-levered Uni position: repay, burn LP, keep proceeds on the account.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter | kind  | required | meaning                                                                                                                                 |
| --------- | ----- | -------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `token0`  | asset | yes      | token0 of the position being closed, by SYMBOL: "WETH". After the burn the published amount is the measured token delta on the account. |
| `asset`   | asset | yes      | The flash-loaned ASSET, by SYMBOL: "USDC". Clears the Revert borrow so the NFT can leave the vault.                                     |

### `revert.collect_fees@v1.0`

Collect Uni fees on a Revert-levered position, paid for by a Morpho flash loan.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter | kind  | required | meaning                                                                                                                                   |
| --------- | ----- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `token0`  | asset | yes      | token0 of the levered position, by SYMBOL: "WETH". Fees collect to the account; the Revert borrow is restored before the flash is repaid. |
| `asset`   | asset | yes      | The flash-loaned ASSET, by SYMBOL: "USDC". Size is the step amount; Morpho lends it to the adapter, not the account.                      |

### `revert.create_borrow@v1.0`

Move a Uni V3 NFT into the Revert vault and borrow USDC onto the Kernel account.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** fixed at USDC — the plan does not name one
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter       | kind   | required | meaning                                                                                                                                                                                                                                                               |
| --------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `borrow_amount` | amount | no       | How much of `asset` to BORROW once the NFT is in the vault, in that token's raw units. This step's Amount is the position id, so it cannot carry a size. Omit it, or zero, to deposit the position without borrowing against it -- the adapter returns early on zero. |
| `asset`         | asset  | yes      | The vault's borrow ASSET, by SYMBOL: "USDC" on Arbitrum. The NFT must already sit on the account; tokensReceiver is forced to the account.                                                                                                                            |

### `revert.exit_to_aave@v1.0`

Move a Revert-levered Uni position onto Aave v3: repay vault, burn LP, supply both, borrow the flash.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** nothing a later step may refer to

| parameter     | kind  | required | meaning                                                                                                                              |
| ------------- | ----- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `token0`      | asset | yes      | token0 of the LP being supplied to Aave, by SYMBOL: "WETH". Both sides of the pair become Aave collateral on the Kernel account.     |
| `asset`       | asset | yes      | The flash-loaned ASSET, by SYMBOL: "USDC". After the move it is the Aave debt that repays Morpho.                                    |
| `max_ltv_bps` | bps   | yes      | Loan-to-value ceiling AFTER the Aave borrow, in basis points: "5000" is 50%. Zero is refused as MissingLtvCap rather than defaulted. |

### `revert.exit_to_aave_long@v1.0`

Close a Revert Uni position into an Aave LONG: supply both tokens, borrow USDC, sell WETH if needed.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** nothing a later step may refer to

| parameter     | kind   | required | meaning                                                                                                                                      |
| ------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `token0`      | asset  | yes      | token0 of the LP being closed, by SYMBOL: "WETH". After the burn both tokens are supplied to Aave on the Kernel account.                     |
| `token1`      | asset  | yes      | token1 of the LP being closed, by SYMBOL: "USDC". Becomes Aave collateral alongside token0.                                                  |
| `min_out`     | amount | yes      | Signed floor on the inner Uniswap sale, in the buy-token's base units. Zero is refused as NoFloor; the facet's 0.25% constant is not ported. |
| `max_ltv_bps` | bps    | yes      | Loan-to-value ceiling AFTER the Aave borrow, in basis points: "5000" is 50%. Zero is refused rather than defaulted.                          |

### `revert.exit_to_aave_one@v1.0`

Close a Revert Uni position into Aave with a single collateral, swapping the other side first.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** nothing a later step may refer to

| parameter     | kind   | required | meaning                                                                                                                                 |
| ------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `token0`      | asset  | yes      | token0 of the LP being closed, by SYMBOL: "WETH". sell\_token0 decides which side is swapped into the other before the Aave supply.     |
| `token1`      | asset  | yes      | token1 of the LP being closed, by SYMBOL: "USDC". The unsold side is the single Aave collateral.                                        |
| `min_out`     | amount | yes      | Signed floor on the inner swap, in the buy-token's base units. Zero is refused as NoFloor rather than using the facet's 0.25% constant. |
| `max_ltv_bps` | bps    | yes      | Loan-to-value ceiling AFTER any Aave borrow, in basis points: "5000" is 50%. Zero is refused as MissingLtvCap.                          |
| `sell_token0` | flag   | yes      | Whether to sell token0 (true) or token1 (false) into the other side before supplying Aave. Written "true" or "false", not 1/0.          |

### `revert.exit_to_aave_short@v1.0`

Close a Revert Uni position into an Aave SHORT: supply USDC, borrow WETH, sell WETH for USDC.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** nothing a later step may refer to

| parameter     | kind   | required | meaning                                                                                                                             |
| ------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `token0`      | asset  | yes      | token0 of the LP being closed, by SYMBOL: "WETH". Sold through the aggregation router at the signed min\_out after the Aave borrow. |
| `token1`      | asset  | yes      | token1 of the LP being closed, by SYMBOL: "USDC". Supplied to Aave as the short's collateral.                                       |
| `min_out`     | amount | yes      | Signed floor on the WETH→USDC sale, in USDC base units. Zero is refused as NoFloor; a fill below it reverts the whole close.        |
| `max_ltv_bps` | bps    | yes      | Loan-to-value ceiling AFTER the Aave borrow, in basis points: "5000" is 50%. Checked against getUserAccountData.                    |

### `revert.mint_create_borrow@v1.0`

Mint a Uni V3 NFT, deposit it into Revert, and borrow USDC in one intent.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Asset** comes from the `token0` parameter
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter    | kind      | required | meaning                                                                                                                                                                                                                                                                                                          |
| ------------ | --------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `token0`     | asset     | yes      | The pair's token0, by SYMBOL: "WETH". The minted NFT is deposited into Revert and USDC is borrowed onto the same Kernel account.                                                                                                                                                                                 |
| `token1`     | asset     | yes      | The pair's token1, by SYMBOL: "USDC". Together with token0 and fee it names the Uniswap pool the NFT is minted against.                                                                                                                                                                                          |
| `fee`        | fee\_tier | yes      | Uniswap V3 fee TIER, in the pool's own millionths and NOT basis points. Only known tiers are 100 (0.01%), 200, 300, 400 (base only), 500 (0.05%), 3000 (0.30%) and 10000 (1.00%, 100bps). A 5bps pool is "500" here, never "5" — the short reading names a pool that does not exist and reverts with no message. |
| `tick_lower` | tick      | yes      | Lower bound of the LP range as a Uniswap V3 tick. Example "-887220". Spacing rules are the NPM's, not this adapter's.                                                                                                                                                                                            |
| `tick_upper` | tick      | yes      | Upper bound of the LP range as a Uniswap V3 tick. Example "887220". Must sit above tick\_lower.                                                                                                                                                                                                                  |
| `asset`      | asset     | yes      | The vault's borrow ASSET, by SYMBOL: "USDC". Borrowed onto the account after create; a different symbol is a different vault market.                                                                                                                                                                             |

### `revert.move_from_aave@v1.0`

Move Aave collateral into a Revert-levered Uni NFT, funded by a Morpho flash.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Asset** comes from the `token0` parameter
* **Produces** a uniswap position NFT id, referable as `{"Symbolic": "<step>.output"}`

| parameter    | kind      | required | meaning                                                                                                                                                                                                                                                                                                          |
| ------------ | --------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `token0`     | asset     | yes      | token0 withdrawn from Aave to mint the NFT, by SYMBOL: "WETH". The new NFT is deposited into Revert before the flash is repaid.                                                                                                                                                                                  |
| `token1`     | asset     | yes      | token1 withdrawn from Aave, by SYMBOL: "USDC". Together with token0 it is the Uniswap pair minted against.                                                                                                                                                                                                       |
| `fee`        | fee\_tier | yes      | Uniswap V3 fee TIER, in the pool's own millionths and NOT basis points. Only known tiers are 100 (0.01%), 200, 300, 400 (base only), 500 (0.05%), 3000 (0.30%) and 10000 (1.00%, 100bps). A 5bps pool is "500" here, never "5" — the short reading names a pool that does not exist and reverts with no message. |
| `tick_lower` | tick      | yes      | Lower bound of the minted LP range as a Uniswap V3 tick. Example "-887220".                                                                                                                                                                                                                                      |
| `tick_upper` | tick      | yes      | Upper bound of the minted LP range as a Uniswap V3 tick. Example "887220".                                                                                                                                                                                                                                       |
| `asset`      | asset     | yes      | The flash-loaned ASSET, by SYMBOL: "USDC". Repays Aave so collateral can be withdrawn, then becomes the Revert borrow.                                                                                                                                                                                           |

### `revert.open_levered@v1.0`

Mint a Uni V3 NFT and open a Revert borrow against it, funded by a Morpho flash.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Asset** comes from the `token0` parameter
* **Produces** a uniswap position NFT id, referable as `{"Symbolic": "<step>.output"}`

| parameter    | kind      | required | meaning                                                                                                                                                                                                                                                                                                          |
| ------------ | --------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `token0`     | asset     | yes      | The pair's token0, by SYMBOL: "WETH". The NFT is minted to the account then deposited into Revert in the same flash.                                                                                                                                                                                             |
| `token1`     | asset     | yes      | The pair's token1, by SYMBOL: "USDC". Together with token0 and fee it names the Uniswap pool.                                                                                                                                                                                                                    |
| `fee`        | fee\_tier | yes      | Uniswap V3 fee TIER, in the pool's own millionths and NOT basis points. Only known tiers are 100 (0.01%), 200, 300, 400 (base only), 500 (0.05%), 3000 (0.30%) and 10000 (1.00%, 100bps). A 5bps pool is "500" here, never "5" — the short reading names a pool that does not exist and reverts with no message. |
| `tick_lower` | tick      | yes      | Lower bound of the LP range as a Uniswap V3 tick. Example "-887220".                                                                                                                                                                                                                                             |
| `tick_upper` | tick      | yes      | Upper bound of the LP range as a Uniswap V3 tick. Example "887220".                                                                                                                                                                                                                                              |
| `asset`      | asset     | yes      | The flash-loaned ASSET, by SYMBOL: "USDC". Becomes the Revert borrow that is repaid to Morpho at the end of the callback.                                                                                                                                                                                        |

### `revert.rebalance@v1.0`

Rebalance a Revert-levered Uni position to signed ticks inside a Morpho flash.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** a uniswap position NFT id, referable as `{"Symbolic": "<step>.output"}`

| parameter    | kind  | required | meaning                                                                                                                                |
| ------------ | ----- | -------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `token0`     | asset | yes      | token0 of the position being rebuilt, by SYMBOL: "WETH". The replacement NFT is minted to the account then deposited back into Revert. |
| `asset`      | asset | yes      | The flash-loaned ASSET, by SYMBOL: "USDC". Pays the Revert repay so the old NFT can be burned.                                         |
| `tick_lower` | tick  | yes      | Lower bound of the NEW range as a Uniswap V3 tick. Example "-2000". Must be a spacing multiple.                                        |
| `tick_upper` | tick  | yes      | Upper bound of the NEW range as a Uniswap V3 tick. Example "2000". Must sit above tick\_lower.                                         |

### `revert.remove@v1.0`

Return a Uni V3 NFT from the Revert vault to the Kernel account.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** a uniswap position NFT id, referable as `{"Symbolic": "<step>.output"}`

| parameter | kind  | required | meaning                                                                                                                             |
| --------- | ----- | -------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `token0`  | asset | yes      | token0 of the NFT being returned, by SYMBOL: "WETH". The vault's tokensReceiver is forced to the account; nobody else can be named. |

### `revert.remove_liquidity@v1.0`

Decrease a Revert-levered Uni position inside a Morpho flash.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** nothing a later step may refer to

| parameter | kind  | required | meaning                                                                                                                        |
| --------- | ----- | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `token0`  | asset | yes      | token0 of the position being reduced, by SYMBOL: "WETH". bps names how much liquidity comes off; proceeds stay on the account. |
| `asset`   | asset | yes      | The flash-loaned ASSET, by SYMBOL: "USDC". Restores the Revert borrow after the decrease so Morpho can be repaid.              |
| `bps`     | bps   | yes      | Share of liquidity to remove, in basis points: "5000" is half. Zero is treated as the whole position on chain.                 |

### `revert.repay@v1.0`

Repay a Revert USDC borrow. Cap is charged on USDC; leftover is refunded like Aave repay.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** fixed at USDC — the plan does not name one
* **Produces** nothing a later step may refer to

| parameter      | kind   | required | meaning                                                                                                                                  |
| -------------- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `repay_amount` | amount | yes      | How much of `asset` to repay, in that token's raw units. Required for the same reason a borrow needs one: the Amount is the position id. |
| `asset`        | asset  | yes      | The vault's borrow ASSET being repaid, by SYMBOL: "USDC". The adapter refunds any amount the vault did not pull.                         |

### `revert.repay_withdraw@v1.0`

Repay Revert, remove the NFT, and burn the LP onto the Kernel account.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter      | kind   | required | meaning                                                                                                                                                                                                         |
| -------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `repay_amount` | amount | no       | How much of `asset` to repay before taking the NFT back, in raw units. Zero withdraws without repaying, which the adapter allows explicitly (`if (a.amount > 0) _repay(...)`) for a position that owes nothing. |
| `token0`       | asset  | yes      | token0 of the LP being unwound, by SYMBOL: "WETH". After repay and remove the NPM burns liquidity onto the account.                                                                                             |
| `asset`        | asset  | yes      | The vault's borrow ASSET being repaid, by SYMBOL: "USDC". Cap is charged here; leftover repay is refunded.                                                                                                      |

### `revert.reposition@v1.0`

Reposition a Revert-levered Uni NFT to new ticks; same flash path as rebalance.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** a uniswap position NFT id, referable as `{"Symbolic": "<step>.output"}`

| parameter    | kind  | required | meaning                                                                                                  |
| ------------ | ----- | -------- | -------------------------------------------------------------------------------------------------------- |
| `token0`     | asset | yes      | token0 of the position being moved, by SYMBOL: "WETH". New ticks are signed the same way as a rebalance. |
| `asset`      | asset | yes      | The flash-loaned ASSET, by SYMBOL: "USDC". Pays Revert so the old NFT can be burned and replaced.        |
| `tick_lower` | tick  | yes      | Lower bound of the NEW range as a Uniswap V3 tick. Example "-2000".                                      |
| `tick_upper` | tick  | yes      | Upper bound of the NEW range as a Uniswap V3 tick. Example "2000".                                       |

### `revert.split@v2.0`

Split a Revert-levered Uni NFT into two new levered NFTs inside a flash, meeting at the tick you name. MAJOR BUMP FROM v1 for the same reason as uni.split: v1 always cut at the geometric midpoint, so an odd-span range could not be split at all.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** a uniswap position NFT id, referable as `{"Symbolic": "<step>.output"}`

| parameter | kind  | required | meaning                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| --------- | ----- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `token0`  | asset | yes      | token0 of the position being split, by SYMBOL: "WETH". Both children are created in the vault; the bus publishes the first token id.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `asset`   | asset | yes      | The flash-loaned ASSET, by SYMBOL: "USDC". Each child re-borrows after mint so the flash can be repaid.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `tick`    | tick  | yes      | WHERE THE TWO CHILDREN MEET, as a Uniswap V3 tick. It must be a multiple of the pool's spacing -- 1 at the 100 tier, 4/6/8 at base's 200/300/400, 10 at 500, 60 at 3000, 200 at 10000 -- and lie STRICTLY between the position's own tickLower and tickUpper.  THIS USED TO BE THE GEOMETRIC MIDPOINT AND NOTHING ELSE, which is why a range spanning an ODD number of spacings could not be split at all: the halves met between two ticks and the position manager refused it from inside the pool with EMPTY returndata. Naming the tick is what makes those positions splittable -- the two children are then unequal, which is the point.  get\_uni\_positions prints the valid choices beside every position. Take one from there rather than computing it: the midpoint is only one of them and is not always legal. |

## Uniswap V3 positions

### `uni.close_at_tick@v1.0`

Fully decrease a Uni V3 position if the current tick is inside a signed window.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter       | kind  | required | meaning                                                                                                                                   |
| --------------- | ----- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `token0`        | asset | yes      | token0 of the position being closed, by SYMBOL: "WETH". Proceeds land on the Kernel account after collect.                                |
| `tick`          | tick  | yes      | Centre of the allowed window as a Uniswap V3 tick. Example "0" for a range around the current price. Close reverts if spot is outside it. |
| `tick_slippage` | tick  | yes      | Half-width of the allowed window in ticks. Example "60". Current tick must sit in \[tick - tick\_slippage, tick + tick\_slippage].        |

### `uni.collect@v1.0`

Collect fees from a Uni V3 NFT onto the Kernel account.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter | kind  | required | meaning                                                                                                                                |
| --------- | ----- | -------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `token0`  | asset | yes      | token0 of the position whose fees are collected, by SYMBOL: "WETH". The other token stays in the account; the bus publishes one asset. |

### `uni.decrease@v1.0`

Remove a fraction of a Uni V3 position's liquidity. Proceeds land on the account.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter | kind  | required | meaning                                                                                                                              |
| --------- | ----- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `token0`  | asset | yes      | token0 of the position being reduced, by SYMBOL: "WETH". Names which asset the published bus amount is denominated in after collect. |
| `bps`     | bps   | yes      | Share of liquidity to remove, in basis points: "10000" is the whole position, "5000" is half. Zero is treated as 10000 on chain.     |

### `uni.increase@v1.0`

Add liquidity to an existing Uni V3 NFT the account already owns.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** nothing a later step may refer to

| parameter | kind   | required | meaning                                                                                                                                                                                          |
| --------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `token0`  | asset  | yes      | token0 of the existing position, by SYMBOL: "WETH". Used to charge the cap; a wrong symbol still spends the NFT's actual pair at the NPM.                                                        |
| `amount0` | amount | no       | How much of token0 to add, in that token's raw units. Required here in a way it is not on a mint: this step's Amount is the position's NFT ID, so there is nothing else to carry a token amount. |
| `amount1` | amount | no       | How much of token1 to add, in that token's raw units. At least one of amount0 and amount1 must be non-zero, or the step adds nothing.                                                            |

### `uni.mint@v1.0`

Mint a Uniswap V3 LP NFT. The recipient is the Kernel account, never a signed field. token0 and token1 are symbols; ticks are the position's range.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Asset** comes from the `token0` parameter
* **Produces** a uniswap position NFT id, referable as `{"Symbolic": "<step>.output"}`

| parameter    | kind      | required | meaning                                                                                                                                                                                                                                                                                                          |
| ------------ | --------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `token0`     | asset     | yes      | The pair's token0, by SYMBOL on this step's chain: "WETH" or "USDC". Never an address. Must sort below token1 the way Uniswap orders the pair.                                                                                                                                                                   |
| `token1`     | asset     | yes      | The pair's token1, by SYMBOL on this step's chain, never an address. Together with token0 it names the pool; a mismatched pair reverts at the NPM.                                                                                                                                                               |
| `fee`        | fee\_tier | yes      | Uniswap V3 fee TIER, in the pool's own millionths and NOT basis points. Only known tiers are 100 (0.01%), 200, 300, 400 (base only), 500 (0.05%), 3000 (0.30%) and 10000 (1.00%, 100bps). A 5bps pool is "500" here, never "5" — the short reading names a pool that does not exist and reverts with no message. |
| `tick_lower` | tick      | yes      | Lower bound of the LP range as a Uniswap V3 tick (int24). Example "-887220". Must be a multiple of the pool's tick spacing or mint reverts.                                                                                                                                                                      |
| `tick_upper` | tick      | yes      | Upper bound of the LP range as a Uniswap V3 tick (int24). Example "887220". Must sit above tick\_lower and on a spacing multiple.                                                                                                                                                                                |
| `amount1`    | amount    | no       | How much of token1 to put in, in that token's raw units. The step's Amount is token0's side; this is the other. Omit it for a one-sided mint — a range entirely above or below the current price takes one token only, and Uniswap will refuse the pair that does not fit.                                       |

### `uni.mint_single@v1.0`

Mint a Uni V3 LP from ONE token. Ticks are computed on-chain from the current tick; one of amount0/amount1 must be zero.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Asset** comes from the `token0` parameter
* **Produces** a uniswap position NFT id, referable as `{"Symbolic": "<step>.output"}`

| parameter | kind      | required | meaning                                                                                                                                                                                                                                                                                                          |
| --------- | --------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `token0`  | asset     | yes      | The pair's token0, by SYMBOL on this step's chain: "WETH" or "USDC". Never an address. The other side of the pair is token1.                                                                                                                                                                                     |
| `token1`  | asset     | yes      | The pair's token1, by SYMBOL on this step's chain, never an address. One of the two amounts is zero so this is a single-sided mint.                                                                                                                                                                              |
| `fee`     | fee\_tier | yes      | Uniswap V3 fee TIER, in the pool's own millionths and NOT basis points. Only known tiers are 100 (0.01%), 200, 300, 400 (base only), 500 (0.05%), 3000 (0.30%) and 10000 (1.00%, 100bps). A 5bps pool is "500" here, never "5" — the short reading names a pool that does not exist and reverts with no message. |

### `uni.rebalance@v1.0`

Burn a Uni V3 NFT and mint a new one with signed ticks. Leftover tokens stay on the account.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** a uniswap position NFT id, referable as `{"Symbolic": "<step>.output"}`

| parameter    | kind  | required | meaning                                                                                                                               |
| ------------ | ----- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `token0`     | asset | yes      | token0 of the position being rebuilt, by SYMBOL: "WETH". The new NFT is minted to the same Kernel account with the signed tick range. |
| `tick_lower` | tick  | yes      | Lower bound of the NEW range as a Uniswap V3 tick. Example "-2000". Must be a spacing multiple or the replacement mint reverts.       |
| `tick_upper` | tick  | yes      | Upper bound of the NEW range as a Uniswap V3 tick. Example "2000". Must sit above tick\_lower.                                        |

### `uni.reposition@v1.0`

Move a Uni V3 position to a one-spacing range around the current tick.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** a uniswap position NFT id, referable as `{"Symbolic": "<step>.output"}`

| parameter | kind  | required | meaning                                                                                                                      |
| --------- | ----- | -------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `token0`  | asset | yes      | token0 of the position being moved, by SYMBOL: "WETH". Ticks are computed on-chain from the pool's current tick, not signed. |

### `uni.split@v2.0`

Split one Uni V3 NFT into two new NFTs on the account, meeting at the tick you name. MAJOR BUMP FROM v1: `tick` is required and there is no default. v1 always cut at the geometric midpoint, so a range spanning an ODD number of spacings could not be split at all -- the midpoint landed between two ticks and the position manager refused it with EMPTY RETURNDATA and nothing to read. A position left by uni.reposition is one spacing wide and can never be split, because no tick lies strictly inside it.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** a uniswap position NFT id, referable as `{"Symbolic": "<step>.output"}`

| parameter | kind  | required | meaning                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| --------- | ----- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `token0`  | asset | yes      | token0 of the position being split, by SYMBOL: "WETH". Both child NFTs are minted to the Kernel account; the bus publishes the first token id.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `tick`    | tick  | yes      | WHERE THE TWO CHILDREN MEET, as a Uniswap V3 tick. It must be a multiple of the pool's spacing -- 1 at the 100 tier, 4/6/8 at base's 200/300/400, 10 at 500, 60 at 3000, 200 at 10000 -- and lie STRICTLY between the position's own tickLower and tickUpper.  THIS USED TO BE THE GEOMETRIC MIDPOINT AND NOTHING ELSE, which is why a range spanning an ODD number of spacings could not be split at all: the halves met between two ticks and the position manager refused it from inside the pool with EMPTY returndata. Naming the tick is what makes those positions splittable -- the two children are then unequal, which is the point.  get\_uni\_positions prints the valid choices beside every position. Take one from there rather than computing it: the midpoint is only one of them and is not always legal. |

### `uni.withdraw@v1.0`

Burn a Uni V3 position fully and optionally swap the proceeds through the aggregation router at a signed minOut.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** a uniswap position NFT id
* **Asset** comes from the `token0` parameter
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter | kind   | required | meaning                                                                                                                                                                                                                                                              |
| --------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `token0`  | asset  | yes      | token0 of the position being withdrawn, by SYMBOL: "WETH". After the burn the optional swap sells into the other side of the pair.                                                                                                                                   |
| `token1`  | asset  | no       | What the proceeds are SOLD INTO, by SYMBOL: "USDC". Required whenever min\_out is non-zero -- the burn frees both sides of the pair and the swap needs a destination. Omit it only for a withdraw that keeps both tokens, which is what a min\_out of zero asks for. |
| `min_out` | amount | yes      | Signed floor on the optional swap, in the output token's base units. Zero skips the swap rather than defaulting a slippage; a swap with no floor is refused as NoFloor.                                                                                              |

## Whole-loan moves across lenders and directions

### `loan.close@v1.1`

CLOSE IT AND TAKE THE MONEY OUT. Ends the position: clear the debt with borrowed money, sell the collateral, repay the loan, keep the difference. THIS IS HOW AN ORDER FILLS WHEN THE ASSET TO SELL IS COLLATERAL — max\_slippage is the floor on that sale, so a triggered close with a floor IS a limit order on locked collateral. Set flash\_market when the debt asset cannot itself be flash-borrowed. Partial: repay and sell less than all of it.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Asset** comes from the `collateral` parameter
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter       | kind                                    | required | meaning                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| --------------- | --------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `market`        | market                                  | yes      | The position being closed, by curated MORPHO market name — "wsteth-usdc" — even when `lender` is aave\_v3: the name is what supplies the token pair either way, so a close cannot reach a token nobody curated.                                                                                                                                                                                                                                                                                                                                                      |
| `flash_market`  | market                                  | no       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `lender`        | choice — `morpho`, `aave_v3`, `aave_v4` | no       | WHICH PROTOCOL HOLDS THE POSITION being closed. Defaults to morpho, which is what every plan written before this meant. Separate from where the flash loan comes from: that is always Morpho, because Morpho lends flash for nothing and Aave charges a premium, and there is no reason the two must be the same protocol. The market name still supplies the token pair either way — an Aave close reuses the curated Morpho market's two tokens, so a plan still cannot reach a token nobody approved. Not available on loan.shift, which is Morpho-only on chain. |
| `collateral`    | asset                                   | yes      | The position's COLLATERAL token, by symbol — what leaves the account, and what a shift or a close SELLS: `wsteth-usdc` takes "wstETH". The debt asset is never named; it comes from the market.                                                                                                                                                                                                                                                                                                                                                                      |
| `repay_amount`  | amount                                  | yes      | Debt to clear, in the raw base units of the market's LOAN asset — cbbtc-usdc borrows USDC at 6 decimals, so "30100000000" is 30,100 USDC. It also sizes the flash loan and must not be 0; with repay\_all "true" it is only a ceiling on the flash, because the exact debt is then repaid by shares.                                                                                                                                                                                                                                                                 |
| `repay_all`     | flag                                    | no       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `entry_min_out` | amount                                  | no       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `max_slippage`  | bps                                     | yes      | Price tolerance for the sale this step makes, in basis points: "100" is 1%. It never reaches the chain — it is handed to the quoter and what gets signed is the minimum output it produces, so it is a tolerance around the market AT COMPILE TIME; a plan that waits on a trigger wants limit\_price instead.                                                                                                                                                                                                                                                       |
| `limit_price`   | price                                   | no       | THE PRICE the collateral must fetch, as a rate: "\<settlement units>/\<collateral units>". The floor for whatever amount of collateral actually moves is worked out from it, which is how a triggered close becomes a limit order on locked collateral. Prefer this to min\_out below, which pins the same price to one size.                                                                                                                                                                                                                                        |
| `min_out`       | amount                                  | no       | The same floor as an ABSOLUTE amount in raw units. Only meaningful beside a fixed collateral amount; setting it and limit\_price together is refused rather than resolved. Omit both and the floor comes from the quote at execution time.                                                                                                                                                                                                                                                                                                                           |

### `loan.shift@v1.1`

MOVE A LEVERAGED POSITION. Sells the collateral held and buys the destination market's, keeping the loan -- or sells NOTHING when both ends take the SAME collateral token, which is how a position changes protocol without changing its pair. BOTH ENDS ARE NAMED BY CURATED MARKET, so it reaches only pairs that are listed. Moves a leveraged position from one market to another in ONE transaction, paid for by a flash loan the account never holds. Set mode to what the position should BE — neutral means the same asset is lent and borrowed, short means a true reversal — and it is refused if the destination market disagrees. Set repay\_all to clear the debt EXACTLY: a fixed amount leaves the interest accrued since planning, and dust debt blocks the withdraw. Amount is the COLLATERAL to move, because that is what leaves the account.

* **Chains** ethereum, base, arbitrum
* **Its own amount is** an amount
* **Asset** comes from the `collateral` parameter
* **Produces** an amount, referable as `{"Symbolic": "<step>.output"}`

| parameter       | kind                                    | required | meaning                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| --------------- | --------------------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `from_market`   | market                                  | yes      | The position being LEFT, by curated Morpho market name — lowercase, exact, and resolved per chain: "cbbtc-usdc" on Base. It supplies the pair, so `repay_amount` is in this market's LOAN token's raw units (USDC, 6 decimals — "30100000000" is 30,100.00), and the name stays a Morpho one even when `from_lender` is aave\_v3.                                                                                                                                 |
| `to_market`     | market                                  | yes      | Where the position is GOING, by curated Morpho market name on the same chain — "weth-usdc" on Base. Its COLLATERAL is what the sale buys (WETH, 18 decimals) and its LOAN token is what the shift delivers, so `borrow_amount` is in that token's raw units.                                                                                                                                                                                                      |
| `from_lender`   | choice — `morpho`, `aave_v3`, `aave_v4` | no       | WHICH PROTOCOL HOLDS the position being left. Defaults to morpho, which is what every plan written before this meant. aave\_v4 is Ethereum-only and is a DIFFERENT protocol from aave\_v3, not a newer version of it; a v4 shift stays inside one spoke, because a shift carries one venue and no step moves a position between spokes.                                                                                                                           |
| `to_lender`     | choice — `morpho`, `aave_v3`, `aave_v4` | no       | WHICH PROTOCOL SHOULD HOLD the position entered. Defaults to morpho. A shift sells ONLY when the collateral changes. Name a to\_market whose COLLATERAL IS THE SAME TOKEN and nothing is sold: no route is built, no floor is quoted, and max\_slippage is ignored. That is how a position moves protocol keeping its pair, and it is why there is no separate migrate step. Naming the same market AND the same lender is refused: there would be nothing to do. |
| `collateral`    | asset                                   | yes      | The position's COLLATERAL token, by symbol — what leaves the account, and what a shift or a close SELLS: `wsteth-usdc` takes "wstETH". The debt asset is never named; it comes from the market.                                                                                                                                                                                                                                                                   |
| `repay_amount`  | amount                                  | yes      | Debt to clear, in the raw base units of the market's LOAN asset — cbbtc-usdc borrows USDC at 6 decimals, so "30100000000" is 30,100 USDC. It also sizes the flash loan and must not be 0; with repay\_all "true" it is only a ceiling on the flash, because the exact debt is then repaid by shares.                                                                                                                                                              |
| `repay_all`     | flag                                    | no       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `borrow_amount` | amount                                  | no       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `mode`          | choice — `long`, `short`, `neutral`     | yes      | What the position should BE when this finishes. neutral means the same asset is lent and borrowed, so there is no price exposure; short means a true reversal of the market being left. Refused on chain if the destination market disagrees.                                                                                                                                                                                                                     |
| `max_slippage`  | bps                                     | yes      | Price tolerance for the sale this step makes, in basis points: "100" is 1%. It never reaches the chain — it is handed to the quoter and what gets signed is the minimum output it produces, so it is a tolerance around the market AT COMPILE TIME; a plan that waits on a trigger wants limit\_price instead.                                                                                                                                                    |
| `limit_price`   | price                                   | no       | THE PRICE the collateral must fetch, as a rate: "\<settlement units>/\<collateral units>". The floor for whatever amount of collateral actually moves is worked out from it, which is how a triggered close becomes a limit order on locked collateral. Prefer this to min\_out below, which pins the same price to one size.                                                                                                                                     |
| `min_out`       | amount                                  | no       | The same floor as an ABSOLUTE amount in raw units. Only meaningful beside a fixed collateral amount; setting it and limit\_price together is refused rather than resolved. Omit both and the floor comes from the quote at execution time.                                                                                                                                                                                                                        |


## Related topics

- [Adapters](/adapters.md)
- [FAQ](/faq.md)
- [Skills](/skills.md)
- [Every tool](/tools/reference.md)
- [The tool server](/tools.md)
