write.account.create
Create a new Arcadia Finance account for managing liquidity positions. Choose between spot accounts (no borrowing) or margin accounts (with borrowing capability) to optimize your DeFi strategy.
Instructions
Build an unsigned transaction to create a new Arcadia account via the Factory contract. account_version: 3 with creditor → V3 margin account (can borrow/leverage). account_version: 0 or 4 → V4 spot account (no borrowing, creditor is ignored, any ERC20 allowed). Returns the predicted account address (deterministic via CREATE2).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| salt | Yes | Unique salt (uint32) for deterministic account address | |
| wallet_address | Yes | Wallet address that will send the transaction (tx.origin, needed for address prediction) | |
| account_version | No | Account version: 0 = latest (V4 spot), 3 = margin (can borrow). 1/2 = legacy. | |
| creditor | No | Lending pool address for V3 margin account. Ignored for V4 spot accounts (version 0 or 4). | |
| chain_id | No | Chain ID: 8453 (Base) or 130 (Unichain) |