Prepare: rescue a position (take a Bailouts offer)
bailoutFor rescuers: unsigned transactions taking an offer on a version 2 trade account, from the wallet's own USDG: an exact USDG approval to the account of what its lens says to approve (what the rescue takes if the account's bUSDG cannot be redeemed, plus 100 bps, for interest, the price and the vault before it lands), then bailout(offer_id, amount). The account works out what it takes when it lands: what brings the LTV to the offer's to_ltv plus 50 bps of it, less its own idle money, at most max_usdg; if the idle money alone does it, nothing is taken. Refused in words when the offer cannot be taken now (under its LTV, expired, a bailout owed already, over its max, the long's debt floor) or the wallet holds too little. The answer gives what you are owed (the principal, your part of the fee within a day and at maturity, Borro's cut of the fee, 1000 bps of it), the position's equity against the claim, and when you may foreclose. Rescues run at any hour. A rescue is the rescuer's own USDG lent against the rescued position plus money that arrives in the account while it is owed: if the position is liquidated anyway the rescuer can lose it. Borro's keeper never rescues. 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>",
"offer_id": "<offer_id>"
},
"name": "bailout"
}
}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 | |
| max_usdg | No | The most the rescue may take from the wallet (default: the lens's approve), in whole USDG as a decimal string, like "250" | |
| offer_id | Yes | The offer's number (bailouts shows each one's) |