Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/collinsville22/Sable/llms.txt

Use this file to discover all available pages before exploring further.

Cross-Chain Bridge

Bridge assets to/from StarkNet via NEAR Intents / 1-Click protocol. Supports Solana, Ethereum, Base, Arbitrum, NEAR, and other chains.

Overview

Sable’s bridge integration allows users to:
  • Bridge IN: Send tokens from any chain → receive STRK on StarkNet
  • Bridge OUT: Send STRK from StarkNet → receive tokens on any chain
All bridges are powered by NEAR Intents (1-Click protocol), a decentralized solver network that finds optimal routes across chains.

Supported Chains

ChainBridge INBridge OUTPopular Tokens
EthereumETH, USDC, WBTC
SolanaSOL, USDC
BaseETH, USDC
ArbitrumETH, USDC, ARB
PolygonMATIC, USDC
AvalancheAVAX, USDC
NEARNEAR, USDC
OptimismETH, USDC, OP
Bridge availability depends on NEAR Intents solver network. Some routes may be unavailable during low liquidity periods.

Bridge Architecture

BRIDGE IN (External Chain → StarkNet):
  ┌──────────┐    deposit     ┌──────────────┐    intents    ┌──────────┐
  │ Solana / │ ───────────► │ NEAR 1-Click │ ──────────► │ StarkNet │
  │ Ethereum │    (SOL/ETH)   │ Protocol     │    (swap +    │ Wallet   │
  │ Base ... │                │ (Intents)    │    bridge)    │ (STRK)   │
  └──────────┘                └──────────────┘               └──────────┘

BRIDGE OUT (StarkNet → External Chain):
  ┌──────────┐   STRK transfer  ┌──────────────┐   intents   ┌──────────┐
  │ StarkNet │ ──────────────► │ NEAR 1-Click │ ─────────► │ Solana / │
  │ Wallet   │   to deposit     │ Protocol     │   (swap +   │ Ethereum │
  │          │   address        │ (Intents)    │   bridge)   │ etc.     │
  └──────────┘                  └──────────────┘              └──────────┘

Bridge Flow

Bridge IN (to StarkNet)

1

Select Source Chain & Token

Choose the chain and token you want to bridge from:
const bridgeIn = {
  sourceChain: "Ethereum",
  sourceToken: "USDC",
  amount: "100",
  destinationChain: "StarkNet",
  destinationToken: "STRK"
}
2

Get Quote

Fetch a quote from NEAR Intents API:
const quote = await fetch('https://api.1click.near.org/quote', {
  method: 'POST',
  body: JSON.stringify({
    from_chain: 'ethereum',
    from_token: 'USDC',
    to_chain: 'starknet',
    to_token: 'STRK',
    amount: '100000000',  // 100 USDC (6 decimals)
    dry_run: true
  })
});

// Returns estimated output amount and route
dry_run: true provides an estimate without creating a deposit address. Set to false for actual bridge.
3

Confirm & Get Deposit Address

User confirms the quote. Request actual bridge with dry_run: false:
const bridge = await fetch('https://api.1click.near.org/quote', {
  method: 'POST',
  body: JSON.stringify({
    ...quote,
    dry_run: false,
    recipient: '0x...starknet_wallet_address'
  })
});

// Returns deposit address on source chain
const depositAddress = bridge.deposit_address;
4

Deposit Tokens

User sends tokens to the deposit address on source chain:
From: User's Ethereum wallet
To: 0x...deposit_address (Ethereum)
Amount: 100 USDC
Only send the exact token and amount specified in the quote. Other tokens will be lost.
5

Wait for Settlement

NEAR Intents solver network:
  1. Detects deposit on source chain (~30s)
  2. Swaps tokens to intermediate assets if needed
  3. Bridges to StarkNet
  4. Swaps to STRK on StarkNet DEXes
  5. Sends STRK to recipient wallet
Typical time: 30-60 seconds
6

Receive STRK

STRK arrives in your StarkNet wallet. Bridge complete!

Bridge OUT (from StarkNet)

1

Select Destination Chain & Token

Choose where you want to send your STRK:
const bridgeOut = {
  sourceChain: "StarkNet",
  sourceToken: "STRK",
  amount: "100",
  destinationChain: "Ethereum",
  destinationToken: "USDC"
}
2

Get Quote & Deposit Address

Similar to Bridge IN, but STRK is the source token:
const quote = await fetch('https://api.1click.near.org/quote', {
  method: 'POST',
  body: JSON.stringify({
    from_chain: 'starknet',
    from_token: 'STRK',
    to_chain: 'ethereum',
    to_token: 'USDC',
    amount: '100000000000000000000',  // 100 STRK (18 decimals)
    dry_run: false,
    recipient: '0x...ethereum_wallet_address'
  })
});

const depositAddress = quote.deposit_address;  // StarkNet address
3

Transfer STRK

Send STRK to the deposit address on StarkNet:
STRK.transfer(deposit_address, 100_000000000000000000)
Use Sable’s bridge interface to auto-fill the transfer transaction.
4

Wait for Settlement

NEAR Intents processes the bridge:
  1. Detects STRK transfer on StarkNet
  2. Swaps STRK to intermediate assets
  3. Bridges to destination chain
  4. Swaps to destination token
  5. Sends to recipient
Typical time: 30-90 seconds (depends on destination chain finality)
5

Receive Tokens

Destination tokens arrive in your wallet on the destination chain.

Bridge Status Tracking

Sable provides real-time status tracking:
GET /api/bridge/status?transaction_id=...

Response:
{
  "status": "processing",
  "steps": [
    {
      "step": "deposit_detected",
      "status": "completed",
      "timestamp": 1234567890,
      "tx_hash": "0x..."
    },
    {
      "step": "swap_source_token",
      "status": "completed",
      "timestamp": 1234567920
    },
    {
      "step": "bridge_to_destination",
      "status": "processing",
      "timestamp": null
    },
    {
      "step": "swap_destination_token",
      "status": "pending",
      "timestamp": null
    },
    {
      "step": "send_to_recipient",
      "status": "pending",
      "timestamp": null
    }
  ]
}
StatusDescription
pendingStep not yet started
processingStep in progress
completedStep finished successfully
failedStep failed (bridge will auto-refund)

Fees & Pricing

Fee Structure

Total Cost = Source Amount + Bridge Fee + Gas Fees + Swap Fees

Bridge Fee: ~0.1-0.5% (NEAR Intents protocol fee)
Gas Fees: Varies by source/dest chain
  • Ethereum: $5-20
  • Solana: $0.01-0.10
  • StarkNet: $0.50-2
Swap Fees: ~0.1-0.3% per swap (DEX fees)

Example (Bridge IN from Ethereum):
  Input: 100 USDC
  Bridge fee: 0.20 USDC (0.2%)
  Gas (Ethereum): $10 (in ETH)
  Swap fee (StarkNet): 0.15 USDC (0.15%)
  
  Net received: ~99.65 USDC equivalent in STRK
  Total cost: $10 ETH + 0.35 USDC
Quote API returns exact output amount after all fees. No hidden costs.

Bridge Speed

RouteTypical TimeNotes
Ethereum → StarkNet60-90sEthereum finality + StarkNet settlement
Solana → StarkNet30-45sFast Solana finality
StarkNet → Ethereum60-120sStarkNet finality + Ethereum gas
StarkNet → Solana45-60sFast Solana settlement
Base/Arbitrum → StarkNet45-60sL2 finality faster than Ethereum
During high network congestion, bridges may take 2-5x longer. Monitor status tracker for updates.

Security & Trust Model

NEAR Intents (1-Click)

Architecture: Decentralized solver network How it works:
  1. User creates a bridge intent (“I want to send 100 USDC from Ethereum to STRK on StarkNet”)
  2. Solvers compete to fulfill the intent at best price
  3. Winning solver executes the swap + bridge + delivery
  4. User receives funds on destination chain
Trust Assumptions:
  • Solvers are incentivized by fees to execute correctly
  • Failed bridges auto-refund to source chain
  • NEAR protocol validates solver actions
NEAR Intents is non-custodial. Funds route through smart contracts, not centralized custodians.

Refund Policy

Bridges can fail due to:
  • Destination chain congestion
  • Insufficient destination liquidity
  • Oracle price deviation
On failure:
  1. NEAR Intents detects failed step
  2. Auto-initiates refund to source chain
  3. User receives original tokens back (minus gas fees)
Refund time: 1-24 hours (depends on source chain)
Gas fees are not refundable even if bridge fails.

Best Practices

  1. Check Quote Carefully: Verify output amount before confirming
  2. Use Test Amounts First: Bridge $10-20 before large transfers
  3. Monitor Status: Don’t panic if bridge takes 2-3 minutes
  4. Save Transaction ID: Bookmark status page for tracking
  5. Bridge During Low Traffic: Avoid peak hours (US evenings) for faster settlement
  6. Consider Gas Costs: Small bridges (under $100) pay high % fee due to gas

API Integration

Quote Endpoint

POST https://api.1click.near.org/quote

Request:
{
  "from_chain": "ethereum",
  "from_token": "USDC",
  "to_chain": "starknet",
  "to_token": "STRK",
  "amount": "100000000",
  "dry_run": false,
  "recipient": "0x..."
}

Response:
{
  "transaction_id": "abc123",
  "deposit_address": "0x...",
  "estimated_output": "95.2 STRK",
  "route": [
    {"step": "swap", "from": "USDC", "to": "ETH", "dex": "Uniswap"},
    {"step": "bridge", "from": "Ethereum", "to": "StarkNet"},
    {"step": "swap", "from": "ETH", "to": "STRK", "dex": "Jediswap"}
  ],
  "fees": {
    "bridge_fee": "0.20 USDC",
    "gas_estimate": "$8.50",
    "swap_fees": "0.15 USDC"
  }
}

Status Endpoint

GET https://api.1click.near.org/status?transaction_id=abc123

Response:
{
  "transaction_id": "abc123",
  "status": "completed",
  "output_amount": "95.18 STRK",
  "output_tx_hash": "0x...",
  "completion_time": 1234567890
}

Supported Tokens

Bridge IN (Source Chains)

ChainSupported Tokens
EthereumETH, USDC, USDT, WBTC, DAI
SolanaSOL, USDC, USDT
BaseETH, USDC
ArbitrumETH, USDC, ARB
PolygonMATIC, USDC
AvalancheAVAX, USDC

Bridge OUT (Destination Chains)

All above tokens supported. Bridge OUT always sources from STRK on StarkNet.

Risk Factors

  • Bridge protocol risk: NEAR Intents solver network failure
  • Price volatility during bridge: Token price can change in 30-90s settlement
  • Smart contract risk: Bridge contracts on source/dest chains
  • Slippage: Swaps may execute at worse-than-quoted prices during high volatility
  • Refund delays: Failed bridges can take 24h to refund

Next Steps

Bridge to StarkNet

Step-by-step guide for Bridge IN

Bridge from StarkNet

Step-by-step guide for Bridge OUT

NEAR Intents Docs

Learn about the bridge protocol

Track Bridge Status

Monitor your cross-chain transfers