write_account_borrow
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.
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": {
"pool_address": "<pool_address>",
"account_address": "<account_address>",
"amount": "<amount>",
"to": "<to>"
},
"name": "write_account_borrow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Address to receive borrowed tokens | |
| amount | Yes | Amount in raw units | |
| chain_id | No | Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood) | |
| pool_address | Yes | Lending pool: LP_WETH=0x803ea69c7e87D1d6C86adeB40CB636cC0E6B98E2, LP_USDC=0x3ec4a293Fb906DD2Cd440c20dECB250DeF141dF1, LP_CBBTC=0xa37E9b4369dc20940009030BfbC2088F09645e3B | |
| account_address | Yes | Arcadia account address used as collateral |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | ||
| transaction | Yes | ||
| predicted_account_address | No |