Skip to main content
Copy this page into your AI coding assistant (Cursor, Copilot, Claude, etc.) for accurate Amplify vault direct contract completions.
This page is a condensed, single-file reference for calling Amplify vault contracts directly — without the SDK. For full documentation with interactive examples, see the Direct Contract Integration guides.

Contract Source

Open-source Solidity: github.com/paxoslabs/nucleus-boring-vault

Architecture

communityCodeDepositorModuleId is a legacy GraphQL field name. It returns the DistributorCodeDepositor address.

Obtain Addresses — GraphQL API

Query

Example cURL

Response Shape

Multiple configs can reference the same vault. Deduplicate by vault.id. withdrawQueueModuleId and communityCodeDepositorModuleId can be null if the vault 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 vault is paused:

Deposit Flow — Standard (Approve + Deposit)

Two transactions: ERC-20 approve() 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

Common default: 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 vault operator fulfills orders (typically within 24 hours).

submitOrder Parameters

Share-to-Asset Conversion

Withdrawal Fee Calculation

Fee is subtracted from offered shares. To receive the full want amount, offer sharesNeeded + feeAmount.

Cancellation Flow — Direct

Only orders with PENDING status (value 1) can be cancelled. The WithdrawQueue is an ERC-721 — each order is an NFT.
If you already have the 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

The 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 require x-api-key: <your_key> header. Base URL: https://api.paxoslabs.com

Vault APY

apy is a decimal string — multiply by 100 for percentage (e.g., 0.0523 = 5.23%).

Vault TVL

Vault Assets (simplified vault discovery)

Only returns vaultAddress (BoringVault). Use the GraphQL API for full contract addresses.

Withdrawal Requests

REST status values: 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):