Prepare a withdrawal from the lending pool
withdraw_from_lending_poolPrepare withdrawing amountUsd (default: the whole position) from the wallet's deposit at one tick of the DeFi lending pool (Sepolia Testnet). Checks first that the wallet has a deposit at the tick, read from the pool contract, and that the amount is within it, and warns when the tick has too few funds not lent out to pay all of it when signed: that part waits in the pool's withdrawal queue and is claimed later from the pool page. Prepared, not sent: returns a signRequest (summary, warnings, signLink to fabrica.land, expiresAt 15 minutes out, payload null for now) and stores it so the sign page can load it. The person opens the link, signs in with that wallet and signs; nothing happens until then. The server holds no keys and submits nothing. wallet is the address that will sign.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"tick": "<tick>",
"wallet": "<wallet>"
},
"name": "withdraw_from_lending_pool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pool | No | The pool's address, when the network has more than one | |
| tick | Yes | The pool tick: tick from the list this tool returns when tick is left out. A tick sets the largest loan it funds (a share of a property's value, or a fixed dollar amount) and the longest loan length | |
| wallet | Yes | The wallet that will sign (0x address). The sign page only lets this wallet sign. | |
| amountUsd | No | Amount to withdraw in US dollars (default: the whole position at the tick) |