moolah_repay
Repay a Moolah market loan. Use 'max' to settle the full outstanding borrow. For TRC20 loans, call approve_moolah_proxy first; TRX is sent directly.
Instructions
Repay a Moolah market loan. Use amount='max' to repay the full outstanding borrow (uses shares math for exact settlement). For TRC20 loan tokens, call approve_moolah_proxy first. For TRX loans, TRX is sent directly.
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": {
"marketId": "<marketId>",
"amount": "<amount>"
},
"name": "moolah_repay"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Loan amount to repay, or 'max' for full repayment | |
| network | No | Network. Default: mainnet | |
| marketId | Yes | Market ID (bytes32 hex) |