Prepare: foreclose on a rescued position
bailout_forecloseFor the rescuer, after maturity: an unsigned transaction foreclosing on the rescued position of a version 2 trade account (never the owner's other positions). The account's idle money pays ahead of the close; then it closes no more of the position than covers what is owed plus 50 bps (percent: less, if asked), bounded at the feed within 50 bps at maturity, widening to the offer's own bound over 35 minutes of trading time; what it returns pays the rescuer ahead of Borro's cut and the rest stays the owner's. The market must be open and the feed fresh. Refused in words before maturity, while the market is shut or the feed stale, when nothing is owed, or from any wallet but the rescuer's. Send with a gas limit of 4,000,000. Simulated from the wallet.
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": {
"wallet": "<wallet>",
"account": "<account>"
},
"name": "bailout_foreclose"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet | Yes | The wallet's address (0x...); the transactions are built for it to sign | |
| account | Yes | The version 2 trade account's address | |
| percent | No | The most of the rescued position to close, more than 0 to 100 (default 100: what covers what is owed) |