For the complete documentation index, see llms.txt. This page is also available as Markdown.

Deposit & Withdraw

Build your own funding flow into and out of Native Core — the vault contract, the signed withdrawal, and how to confirm each direction settled.

Funding spans two chains. A deposit starts on an EVM chain and finishes on Native Core; a withdrawal starts on Native Core and finishes on an EVM chain. Each direction gives you exactly one transaction to send and one thing to poll.

This section is for teams building their own deposit and withdrawal experience — wallets, aggregators, custodians, and trading front-ends that cannot route users through the Native web app. You need an EVM RPC endpoint and Native Core's two REST endpoints. No other Native-hosted service is involved.

DepositWithdrawVault Contract

The model

You never wait on your own second transaction.

Deposit
Withdraw

You send

deposit() on the vault contract

A signed withdraw action to /trade

Native settles the other side

credits the balance a few minutes later

releases tokens from the vault

You confirm with

POST /info deposits

vault usedNonces(...)

Correlation key

The Deposit event's nonce

The withdraw_nonce you chose

Neither direction can be cancelled or reversed once the first transaction lands. A deposit that fails validation is held for manual review, not returned; a withdrawal debits the Native balance the moment the action executes, before anything moves on EVM.

Endpoints

Native Core exposes two REST endpoints, and funding uses a handful of queries on each. The full contract for both is in Native Core API.

API_URL=https://api.native.org

/info is rate limited to 1 request per second per IP. Every polling loop in this section needs an interval at or above that, and a shared budget if you run several at once.

Discovery

Resolve the routing table at runtime. Vaults are redeployed and asset listings change, so treat every address and limit as a read, never a constant.

What you need
Where it comes from

Vault address per chain

Depositable tokens on a chain

vault getSupportedUnderlyings()

asset_id, balance_decimals, withdrawal fee

POST /info assets

Withdrawable (chain, asset) and minimums

Gas-token price, to quote the activation fee

POST /info markPrices

The current vault addresses are listed in Vault Contract.

Accounts

A first deposit creates the account and carries a one-time activation fee. Get it wrong and the funds are not credited, so read Size the activation fee before you build one.

Credit accounts cannot deposit or withdraw through this path. See Account Types.

Last updated