Prepare: pay a bailout back
bailout_repayUnsigned transactions paying the bailout owed on a version 2 trade account: from the wallet (the owner, usually; anyone may), an exact USDG approval to the account and payBailout, the rescuer ahead of Borro's cut, with an hour of the fee's growth allowed so it still pays it all when it lands (amount pays part); paid in full, the lien lifts at once. With from_account: true, repayBailout instead (anyone): it pays from what sits in the account, its free USDG and the bUSDG it takes, and once the rescued position has no debt left it hands that position's collateral to the rescuer as it is, up to what is owed, and ends the lien. Refused in words when nothing is owed. 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>"
},
"name": "bailout_repay"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | How much to pay from the wallet (default: everything owed), in whole USDG as a decimal string, like "250" | |
| 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) | |
| from_account | No | true: settle from what sits in the account (repayBailout) instead of the wallet |