zerø

Docs

Token Swaps & Staking

Execute token swaps seamlessly through Zero with zero platform fees. Swap NEAR-native tokens instantly via Ref Finance, access cross-chain liquidity through NEAR Intents, or stake NEAR tokens on validator pools.

Two Swap Routes

Zero provides two different swap mechanisms depending on which tokens you're trading:

1. Ref Finance (NEAR-Native Tokens)

For swaps between tokens native to the NEAR ecosystem, Zero routes through Ref Finance, the leading decentralized exchange on NEAR Protocol. All Ref Finance and Rhea pools are supported.

Instant Execution: Ref Finance swaps execute immediately on-chain with minimal slippage on liquid trading pairs.

2. NEAR Intents (Cross-Chain Swaps)

For swaps between NEAR tokens and assets on other blockchains, Zero uses the NEAR Intents protocol to access cross-chain liquidity.

Cross-Chain Connectivity: We support some cross-chain swaps via NEAR Intents. More tokens being added regularly.

Staking NEAR

Stake your NEAR tokens on validator pools to earn rewards while supporting network security.

text
Example staking commands:
"Stake 1,000 NEAR on shadowcorp.pool.near"
"Delegate 500 NEAR to validator.pool.near"
"Stake 2,000 NEAR"

When you stake NEAR, your tokens are delegated to a validator pool. You continue to earn staking rewards while your tokens help secure the NEAR network. You can unstake at any time, though there's typically a 2-3 epoch unbonding period before tokens are available to withdraw.

Validator Selection: Choose reputable validators with strong uptime and reasonable fees. You can specify a validator pool by name, or Zero can recommend high-performing validators.

Zero Platform Fees

Zero takes no cut from your swaps. You only pay the standard network and protocol fees:

  • Ref Finance: Ref's swap fee (typically 0.3% for most pools) + NEAR network gas fees
  • NEAR Intents: Solver network fees + destination chain gas fees + bridge fees (if applicable)
Transparent Pricing: Zero always displays the exact amount you'll receive and all fees before you confirm the swap. What you see in the quote is what you get.

How to Execute a Swap

Step 1: Ask the AI

Simply ask Zero's AI to execute a swap using natural language. The AI will automatically determine the correct route (Ref Finance or NEAR Intents) based on the tokens involved.

text
Example queries:
"Swap 10 NEAR for ETH"
"Exchange 1 ETH for NEAR"
"Swap 0.5 SOL to NEAR"

Step 2: Review the Quote

Zero will fetch a real-time quote and display:

  • Input Amount: How much you're swapping from
  • Output Amount: How much you'll receive
  • Exchange Rate: Price per token
  • Slippage Tolerance: Maximum price movement allowed
  • Minimum Received: Guaranteed minimum after slippage
  • Route: Whether it's Ref Finance or NEAR Intents
  • Estimated Fees: Network and protocol costs
Price Impact: Large swaps may experience price impact on low-liquidity pairs. Review the exchange rate carefully before confirming.

Step 3: Confirm the Swap

If the quote looks good, click the "Confirm Swap" button. Zero will prepare the transaction with the exact parameters from the quote.

Step 4: Sign the Transaction

Your NEAR wallet will open with a transaction approval request. Review the transaction details one final time, then sign to execute the swap.

Transaction Security: Always verify the transaction details in your wallet match the quote shown in Zero before signing.

Step 5: Track Execution

After signing, Zero will display the transaction status:

  • Ref Finance: Usually completes within seconds
  • NEAR Intents: May take 30 seconds to several minutes depending on the solver network and destination chain

You can click the transaction hash to view details in the NEAR Explorer.

Cross-Chain Swaps with EVM and Solana Wallets

To swap assets from Ethereum, Solana, or other non-NEAR chains, you'll need to connect the wallet for that specific chain in addition to your NEAR wallet.

Connecting Additional Wallets

When you request a cross-chain swap (e.g., "Swap 1 SOL to USDC on NEAR"), Zero will prompt you to connect your Solana wallet if it's not already connected.

Supported Wallet Types:

  • EVM Wallets: MetaMask, Coinbase Wallet, WalletConnect, Rainbow, and other Ethereum-compatible wallets
  • Solana Wallets: Phantom, Solflare, Backpack
NEAR Wallet Always Required: Even for cross-chain swaps, you must have a NEAR wallet connected to access Zero. EVM and Solana wallets are supplementary for cross-chain functionality only.

How Cross-Chain Swaps Work

  1. You connect both your NEAR wallet and the source chain wallet (e.g., Phantom for Solana)
  2. Request a swap from the source chain asset to a NEAR asset
  3. NEAR Intents protocol routes your swap through solver networks
  4. Solvers compete to provide the best execution path
  5. You sign the transaction with your source chain wallet
  6. Tokens arrive in your NEAR wallet after settlement

Slippage Protection

Slippage refers to the difference between the expected price of a trade and the actual execution price. Market volatility can cause prices to move between when you request a quote and when the transaction executes.

Default Slippage Settings

Zero uses intelligent default slippage tolerances:

  • Stable Pairs (USDC/USDT): 0.1% - 0.5%
  • Major Pairs (NEAR/USDC, ETH/USDC): 0.5% - 1%
  • Volatile Pairs: 1% - 3%
Slippage Balance: Lower slippage protects you from price movements but may cause transactions to fail if the market moves. Higher slippage increases execution success but allows more price deviation.

Minimum Received Guarantee

Every swap quote includes a "Minimum Received" amount. This is the absolute minimum you'll receive after accounting for maximum slippage. If the market moves beyond your slippage tolerance, the transaction will revert rather than execute at an unfavorable price.

Swap Quotes and Refresh

Quotes are valid for a limited time (typically 30-60 seconds) because market prices constantly change. If you don't confirm within this window, you'll need to request a fresh quote.

Real-Time Pricing: Zero fetches live quotes from liquidity pools at the moment of your request. For the most accurate pricing, confirm swaps quickly after receiving a quote.

Supported Swap Patterns

Zero supports these swap patterns through natural language:

Direct Token Swaps

text
"Swap 10 NEAR for ETH"
"Exchange 1 SOL for NEAR"
"Trade 0.5 ETH for SOL"

Buy/Sell Language

text
"Buy ETH with NEAR"
"Sell 5 NEAR for SOL"
"Purchase SOL using ETH"

Cross-Chain Swaps

text
"Swap 1 SOL to NEAR"
"Exchange 0.5 ETH for NEAR"
"Trade NEAR for SOL"
Natural Language: You don't need to use exact syntax. Zero's AI understands variations like "convert," "change," "swap," "trade," "buy," and "sell" interchangeably.

Transaction Failures and Troubleshooting

Common Failure Reasons

Insufficient Balance:

You don't have enough of the source token to complete the swap plus gas fees.

Slippage Exceeded:

The market price moved beyond your slippage tolerance between quote and execution. Request a new quote and try again.

Insufficient Liquidity:

The trading pair doesn't have enough liquidity to execute your swap size. Try a smaller amount or a different pair.

Quote Expired:

You waited too long to confirm the transaction. Request a fresh quote.

Network Congestion:

High network activity can cause transactions to fail or take longer. Wait and try again during lower congestion.

Always Keep NEAR for Gas: Ensure you have at least 0.1 NEAR in your wallet to cover transaction fees. Without sufficient NEAR for gas, swap transactions will fail.

Security Best Practices

  • Verify Transaction Details: Always double-check the swap amounts and fees in your wallet before signing
  • Use Trusted Wallets: Only connect wallets you control and have verified as legitimate
  • Check Token Contracts: For unfamiliar tokens, verify the contract address matches the official token
  • Start Small: Test with small amounts when swapping new or unfamiliar tokens
  • Beware of Scam Tokens: Avoid tokens with suspicious names, extremely low liquidity, or unrealistic price movements

Privacy in Swaps

While blockchain transactions are public by nature, Zero adds privacy protections:

  • Your IP address is never exposed to liquidity providers or solvers
  • Zero doesn't log your swap history or build trading profiles
  • Cross-chain swaps route through decentralized solver networks, not centralized bridges
  • No third-party analytics or tracking on swap interfaces
On-Chain Visibility: All swap transactions are recorded on their respective blockchains. Zero protects your off-chain privacy (IP, browsing, intent data) but cannot hide on-chain transaction data that's inherently public.