write.account.borrow
Build a transaction to borrow tokens from an Arcadia lending pool using margin account collateral. Validate account eligibility and create unsigned borrowing operations.
Instructions
Build an unsigned transaction to borrow from an Arcadia lending pool against account collateral. NOT needed for leveraged LP — write.account.add_liquidity handles borrowing internally when leverage > 0. Only works with margin accounts (created with a creditor/lending pool). Spot accounts (no creditor) cannot borrow — the tool will validate this and reject. Before borrowing, verify the account has positive free margin via read.account.info: collateral_value must exceed used_margin.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pool_address | Yes | Lending pool: LP_WETH=0x803ea69c7e87D1d6C86adeB40CB636cC0E6B98E2, LP_USDC=0x3ec4a293Fb906DD2Cd440c20dECB250DeF141dF1, LP_CBBTC=0xa37E9b4369dc20940009030BfbC2088F09645e3B | |
| account_address | Yes | Arcadia account address used as collateral | |
| amount | Yes | Amount in raw units | |
| to | Yes | Address to receive borrowed tokens | |
| chain_id | No | Chain ID: 8453 (Base) or 130 (Unichain) |