Prepare: post a Bailouts offer
bailout_offerUnsigned transaction posting a standing offer on a position in the version 2 trade account: once its LTV (Morpho's own, at the market's oracle) reaches at_ltv, anyone may put in what brings it back to to_ltv, up to max_usdg; the account's own idle money goes in ahead of the rescuer, who is owed back ahead of the owner plus fee_bps of what it put in (1 to 2000), earned over term_days (1 to 30, default 7), and may foreclose on that position alone after the term. at_ltv under the position's LLTV, to_ltv under at_ltv; expiry_days (default 30) is when it lapses untaken. No money moves when it is posted. At most 4 live offers an account, one per position. While one is live, max_slip_bps and the agent's slip may come down and never up. From the agent: within the owner's cap (agent_bailout_max_usdg) and at least 10.0 USDG, on positions it may trade, at_ltv at least 200 bps over the position's LTV now, 2 times its fee on max_usdg counted into today's loss budget when posted. Refused in words when the position is not held, a bailout is owed, the position carries an offer, the bounds are off, or the agent's limits refuse it; warns when it is takeable at once or when max_usdg is short of what a rescue at at_ltv would take. Simulated from the wallet (the owner or the agent).
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>",
"symbol": "<symbol>",
"side": "<side>",
"at_ltv": "<at_ltv>",
"to_ltv": "<to_ltv>",
"max_usdg": "<max_usdg>",
"fee_bps": "<fee_bps>"
},
"name": "bailout_offer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | short (the account's short on the stock) or long (its leveraged long) | |
| at_ltv | Yes | The LTV a rescue opens at: a fraction under 1, like 0.7 (a percent with its sign is taken too) | |
| symbol | Yes | A stock on Borro by its ticker, like NVDA or AAPL (markets lists every one) | |
| to_ltv | Yes | The LTV a rescue must bring it back to, under at_ltv | |
| wallet | Yes | The wallet's address (0x...); the transactions are built for it to sign | |
| account | No | A version 2 trade account's address (default: the wallet's own, as its owner; an agent gives its owner's account) | |
| fee_bps | Yes | The rescuer's fee on what it puts in, earned over the term, in hundredths of a percent (1 to 2000) | |
| max_usdg | Yes | The most a rescuer may put in, in whole USDG as a decimal string, like "250" | |
| term_days | No | Days the owner has to repay before the rescuer may foreclose (1 to 30, default 7) | |
| expiry_days | No | Days until the offer lapses if no one takes it (default 30, at most 365) |