This page is a condensed, single-file reference for calling Amplify account
contracts directly — without the SDK. For full documentation with interactive
examples, see the Direct Contract Integration
guides.
Prefer server-side calldata instead of direct contract calls? Use the
Calldata AI Reference —
the REST path returns ready-to-sign transaction data with no local ABI
management. Skill-aware tools also auto-discover the
amplify-earn-api-calldata Agent Skill at
/.well-known/agent-skills/index.json.Contract Source
Open-source Solidity: github.com/paxoslabs/nucleus-boring-accountArchitecture
communityCodeDepositorModuleId is a legacy GraphQL field name. It returns the DistributorCodeDepositor address.
Obtain Addresses — GraphQL API
Query
Example cURL
Response Shape
vault.id. withdrawQueueModuleId and communityCodeDepositorModuleId can be null if the account doesn’t support those operations.
GraphQL Variables
ABIs
DistributorCodeDepositor
WithdrawQueue
ERC-20 (BoringVault shares + deposit tokens)
Accountant
FeeModule
Teller
Pre-Flight: Pause State Check
Before submitting any deposit or withdrawal transaction, check whether the account is paused:Deposit Flow — Standard (Approve + Deposit)
Two transactions: ERC-20approve() then deposit().
Deposit Parameters
Distributor Codes
If Paxos Labs provided a distributor code, encode it as bytes:toHex('your_code') in JS, b'your_code' in Python, []byte("your_code") in Go. Otherwise pass 0x / b"" / []byte{}.
Deposit Flow — Permit (Single Transaction)
For tokens supporting EIP-2612 (USDC, USDG, pyUSD, USD₮0). Not available for USDT. Not available for smart contract wallets (Privy Smart Wallets, Safe) — they cannot sign typed data.Permit EIP-712 Domain (varies by token)
Always read the token’s
name(), version() (or EIP712_VERSION()) and use those for the domain.
Slippage / minimumMint Formula
SLIPPAGE_BPS = 50 (0.5%). Setting minimumMint = 0 disables slippage protection (fine for testing, not production).
Withdrawal Flow (Complete)
Withdrawals are order-based, not instant. The account operator fulfills orders (typically within 24 hours).submitOrder Parameters
Share-to-Asset Conversion
Withdrawal Fee Calculation
sharesNeeded + feeAmount.
Cancellation Flow — Direct
Only orders withPENDING status (value 1) can be cancelled. The WithdrawQueue is an ERC-721 — each order is an NFT.
orderIndex (from the OrderSubmitted event), skip enumeration and call cancelOrder(orderIndex) directly after verifying getOrderStatus(orderIndex) === 1.
Cancellation Flow — Meta-Transaction (Gasless)
A relayer submits the cancellation on behalf of the order owner using an EIP-712 signature.EIP-712 Cancel Signature
deadline in the signed message and the function call must match exactly. Reverts with SignatureExpired if the block timestamp exceeds the deadline.
REST API Endpoints
All requirex-api-key: <your_key> header. Base URL: https://api.paxoslabs.com
Account APY
apy is a decimal string — multiply by 100 for percentage (e.g., 0.0523 = 5.23%).
Account TVL
Account Assets (simplified account discovery)
vaultAddress (BoringVault). Use the GraphQL API for full contract addresses.
Withdrawal Requests
PENDING, COMPLETE, PENDING_REFUND, REFUNDED.
Order Status Enum (On-Chain)
Token Notes
For USDT: if current allowance > 0, call
approve(spender, 0) first, then approve(spender, amount).
Smart contract wallets (Privy Smart Wallets, Safe) cannot sign permits — use the standard approve + deposit flow.
Common Revert Errors
Supported Chains
SDK built-in networks (for parity with@paxoslabs/amplify-sdk on-chain reads):