moolah_borrow
Flexibly supply collateral, borrow against it, or both in sequence. Collateral must cover the borrow at the market's LLTV or the transaction reverts.
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.
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. |