| Method | Description |
|---|---|
| Permit | Gas-efficient off-chain signature (EIP-2612). Single transaction — no separate approval needed. |
| Approval | Standard ERC-20 approve transaction followed by the deposit transaction. |
| Already Approved | Direct deposit when sufficient allowance already exists. |
Prerequisites
- A Paxos Labs API key
- An EVM-compatible signer (private key, HSM, or wallet service)
- An HTTP client library for your language
Step 0: Fetch Available Accounts
Retrieve all accounts accessible with your API key. Accounts are grouped byname, with a deployments[] array per chain. Record boringVaultAddress, chainId, and baseTokenAddress for the deployment you want to deposit into.
deployments[i] entry:
| Field | Usage |
|---|---|
boringVaultAddress | Passed to GET /v2/core/authorization and GET /v2/amplify/deposit as vaultAddress |
chainId | Passed to all endpoints |
baseTokenAddress | The primary deposit asset address |
Step 1: Check Authorization
GET /v2/core/authorization detects whether the deposit token supports EIP-2612 permits, requires a standard ERC-20 approval, or already has sufficient allowance.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
vaultAddress | string | Yes | BoringVault contract address (boringVaultAddress from discovery) |
tokenAddress | string | Yes | ERC-20 deposit token address |
amount | string | Yes | Deposit amount in token base units (decimal string) |
userAddress | string | Yes | Depositor’s wallet address |
chainId | number | Yes | EVM chain ID |
Response Variants
The responsemethod field tells you which path to follow:
permit — Gas-efficient off-chain signature (EIP-2612). Single transaction, no separate approval needed.
approval — Standard ERC-20 approve() required before depositing.
already_approved — Sufficient allowance exists. Skip directly to the deposit.
Step 2: Handle Authorization
Permit Path
Sign the EIP-712 typed data frompermitData using eth_signTypedData_v4 (or your library’s equivalent), then include the signature in the deposit request.
Approval Path
Send theapprovalTransaction.encoded calldata as a transaction to the deposit token contract address (tokenAddress from step 1). Wait for confirmation, then proceed to the deposit.
Already Approved Path
Skip directly to step 3.Step 3: Prepare Deposit Calldata
GET /v2/amplify/deposit returns the transaction object for the deposit.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
vaultAddress | string | Yes | BoringVault contract address (0x + 40 hex chars) |
depositAsset | string | Yes | ERC-20 token address to deposit |
depositAmount | string | Yes | Amount in token base units (decimal string) |
userAddress | string | Yes | Wallet address signing and submitting the transaction. Also the default share recipient when to is omitted. |
chainId | number | Yes | EVM chain ID |
to | string | No | Destination address that receives the vault shares (maps to the on-chain to argument on DistributorCodeDepositor.deposit()). Defaults to userAddress when omitted. |
permitSignature | string | No | EIP-2612 permit signature (65-byte hex). Required for permit path. |
permitDeadline | number | No | Permit deadline as Unix timestamp. Required when permitSignature is provided. |
responseFormat | string | No | encoded (default), full, or structured |
Response
The
abi, functionName, and args fields are only present when
responseFormat is full or structured. See
Authentication
for details.Step 4: Sign and Submit
Send the transaction using your signer or wallet infrastructure:to— the contract address to calldata— the ABI-encoded calldata (when usingencodedorfullformat)value— ETH to send (usually"0"for ERC-20 deposits)
Complete Examples
- Node.js
- Python
- Go
- Java
Error Responses
| Status | Meaning |
|---|---|
| 400 | Invalid parameters (missing field, bad address format, invalid permit signature, deposit amount below fees, etc.) |
| 404 | No account found for the given vaultAddress + chainId |
| 503 | Upstream RPC unavailable (share rate, fee module, or supply cap read failed) |