moolah_borrow
Supply collateral to Moolah markets, borrow against existing collateral, or do both in sequential transactions. Collateral must cover borrow amount to avoid revert.
Instructions
Flexible Moolah borrow entry point. Provide collateralAmount only → supply collateral without borrowing. Provide borrowAmount only → borrow against existing collateral. Provide both → supply collateral then borrow in two sequential transactions. Collateral must cover the borrow at the market's LLTV or the borrow tx reverts.
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>"
},
"name": "moolah_borrow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| network | No | Network. Default: mainnet | |
| marketId | Yes | Market ID (bytes32 hex) — from get_moolah_markets | |
| borrowAmount | No | Loan token amount to borrow (e.g. '500' USDT). Omit to skip. | |
| collateralAmount | No | Collateral to supply first (e.g. '10000' TRX). Omit to skip. |