Back to Home

Cable Documentation

Complete technical documentation for Cable cross-chain swaps

Getting Started

Prerequisites

  • A Web3 wallet (MetaMask, Coinbase Wallet, WalletConnect, etc.)
  • Native tokens for gas on your source chain (ETH, MATIC, etc.)
  • Tokens you wish to swap

Connection Steps

  1. 1. Connect Wallet

    Click "Connect Wallet" in the header. Select your preferred wallet provider from the list. Approve the connection request in your wallet.

  2. 2. Network Detection

    Cable automatically detects your current network. If you're on an unsupported network, you'll be prompted to switch.

  3. 3. Account Access

    Grant Cable read-only access to view your token balances. This does not give permission to move funds.

How Cable Works

Architecture Overview

Cable is a non-custodial cross-chain swap aggregator that routes your transactions through the most efficient path available.

Key Components:

  • Route Finder: Identifies optimal swap paths across chains
  • Bridge Aggregator: Selects the best bridge for cross-chain transfers
  • DEX Aggregator: Finds best rates across decentralized exchanges
  • Smart Contract Layer: Executes atomic swaps and bridging

Same-Chain Swaps

When swapping tokens on the same chain:

  1. Cable queries multiple DEXs for the best rate
  2. Routes are compared (direct swaps vs. multi-hop)
  3. Best route is presented with estimated output
  4. User approves token spending (one-time per token)
  5. Swap executes atomically through smart contract

Cross-Chain Swaps

When swapping across different chains:

  1. Source chain DEX swap (if needed)
  2. Token bridging to destination chain
  3. Destination chain DEX swap (if needed)
  4. All steps executed atomically - if any step fails, transaction reverts

Note: Cross-chain swaps may take 2-15 minutes depending on bridge confirmation times and network congestion.

Supported Chains

Ethereum

Chain ID

1

Native Token

ETH

Avg Gas Cost

~$5-20

Block Time

~12s

RPC Endpoint

https://eth.llamarpc.com

Block Explorer

https://etherscan.io

Polygon

Chain ID

137

Native Token

MATIC

Avg Gas Cost

~$0.01-0.10

Block Time

~2s

RPC Endpoint

https://polygon-rpc.com

Base

Chain ID

8453

Native Token

ETH

Avg Gas Cost

~$0.10-0.50

Block Time

~2s

RPC Endpoint

https://mainnet.base.org

Block Explorer

https://basescan.org

Arbitrum

Chain ID

42161

Native Token

ETH

Avg Gas Cost

~$0.20-1.00

Block Time

~0.25s

RPC Endpoint

https://arb1.arbitrum.io/rpc

Block Explorer

https://arbiscan.io

Optimism

Chain ID

10

Native Token

ETH

Avg Gas Cost

~$0.20-1.00

Block Time

~2s

RPC Endpoint

https://mainnet.optimism.io

BNB Smart Chain

Chain ID

56

Native Token

BNB

Avg Gas Cost

~$0.10-0.50

Block Time

~3s

RPC Endpoint

https://bsc-dataseed.binance.org

Block Explorer

https://bscscan.com

Avalanche

Chain ID

43114

Native Token

AVAX

Avg Gas Cost

~$0.50-2.00

Block Time

~2s

RPC Endpoint

https://api.avax.network/ext/bc/C/rpc

Block Explorer

https://snowtrace.io

Token Support

Supported Token Types

  • Native Tokens:

    ETH, MATIC, BNB, AVAX - the native gas tokens of each chain

  • ERC-20 Tokens:

    All standard ERC-20 tokens on Ethereum and EVM-compatible chains

  • Stablecoins:

    USDC, USDT, DAI, BUSD, and other major stablecoins

  • Wrapped Tokens:

    WETH, WMATIC, WBNB, WAVAX - wrapped versions of native tokens

Token Requirements

For a token to be swappable on Cable, it must:

  • Be an ERC-20 compliant token
  • Have sufficient liquidity on supported DEXs
  • Not have transfer restrictions or fees
  • Have a verified contract on the block explorer

Custom Token Addition

To swap a token not in the default list:

  1. Click "Select Token" in the swap interface
  2. Click "Add Custom Token" at the bottom
  3. Enter the token contract address
  4. Token details will auto-populate if valid
  5. Confirm to add the token to your list

Warning: Always verify the contract address before adding custom tokens. Scam tokens can appear legitimate.

Transaction Flow

Step-by-Step Process

1. Route Calculation

Cable calculates the optimal route considering gas costs, slippage, and execution time.

2. Token Approval (First Time Only)

Grant Cable permission to access your tokens:

  • One-time approval per token per chain
  • You can revoke approvals at any time
  • Recommended: Approve exact amount or unlimited

3. Transaction Submission

Your wallet will prompt you to sign the transaction. Review:

  • From/To tokens and amounts
  • Estimated gas fee
  • Minimum received (after slippage)
  • Destination chain (for cross-chain swaps)

4. Execution

Transaction is broadcast to the network. You can track progress via:

  • In-app transaction tracker
  • Block explorer (Etherscan, etc.)
  • Your wallet's activity tab

5. Confirmation

Wait for blockchain confirmation:

  • Same-chain: 1-3 block confirmations (seconds to minutes)
  • Cross-chain: Bridge confirmation time varies (2-15 minutes)

Transaction States

✓ Confirmed

Transaction completed successfully. Tokens are in your wallet.

⏳ Pending

Transaction submitted, waiting for network confirmation.

🔄 Processing

Cross-chain transaction bridging to destination chain.

✗ Failed

Transaction reverted. Funds returned (minus gas). See error details.

Gas Optimization

Understanding Gas Costs

Gas fees are paid to blockchain validators, not Cable. We provide tools to minimize these costs:

Gas Components:

  • Base Fee: Network minimum (varies by congestion)
  • Priority Fee: Incentive for faster processing
  • Gas Limit: Maximum computational steps allowed

Optimization Tips

  1. 1. Choose Low-Cost Chains

    Polygon, Base, and Arbitrum typically have much lower gas than Ethereum mainnet.

  2. 2. Swap During Off-Peak Hours

    Gas prices often lower during weekends and late night UTC hours.

  3. 3. Batch Transactions

    If swapping multiple tokens, do them in one session to share approval costs.

  4. 4. Use Infinite Approvals (with caution)

    Approve unlimited amount to avoid repeated approval transactions. Only do this for trusted contracts.

  5. 5. Monitor Gas Trackers

    Check gas prices before swapping: Ethereum Gas Tracker, Polygon Gas Tracker, etc.

Custom Gas Settings

Advanced users can customize gas parameters:

Gas Limit: Auto-calculated

Max Fee: Adjustable

Priority Fee: Low / Medium / High

Caution: Setting gas too low may cause transaction failure or indefinite pending state.

Security

Non-Custodial Architecture

Cable never takes custody of your funds. All swaps execute atomically:

  • Funds remain in your wallet until swap execution
  • Smart contracts cannot withdraw funds without your signature
  • Failed transactions automatically refund (minus gas)
  • No registration or KYC required

Smart Contract Security

Security Measures:

  • ✓ Audited smart contracts
  • ✓ Open source and verifiable on block explorers
  • ✓ Timelock on contract upgrades
  • ✓ Multi-signature requirements for critical functions
  • ✓ Emergency pause functionality

Best Practices

  1. Verify Transaction Details

    Always review token addresses, amounts, and destination before confirming.

  2. Use Hardware Wallets

    For large amounts, use hardware wallets (Ledger, Trezor) for added security.

  3. Check Token Approvals

    Periodically review and revoke unnecessary token approvals using tools like Revoke.cash.

  4. Beware of Phishing

    Always verify you're on cable.ninja. Never share your private key or seed phrase.

  5. Test with Small Amounts

    For first-time swaps or new chains, test with small amounts before large transactions.

Risk Disclosure

Important: DeFi involves inherent risks:

  • Smart contract bugs or exploits
  • Network congestion or failures
  • Impermanent loss on cross-chain swaps
  • Price volatility and slippage
  • User error (wrong address, network, etc.)

Only swap funds you can afford to lose. Always DYOR (Do Your Own Research).

Troubleshooting

Common Issues

❌ "Insufficient Balance"

Cause: Not enough tokens or gas

Solution: Ensure you have enough tokens to swap AND native tokens for gas (ETH, MATIC, etc.)

❌ "Transaction Failed"

Cause: Slippage exceeded, low gas, or network issue

Solution: Increase slippage tolerance (Settings), increase gas price, or wait for network to stabilize

⏳ "Transaction Stuck Pending"

Cause: Gas price too low or network congestion

Solution: Speed up transaction in your wallet, or wait for network to clear. Can also cancel and retry with higher gas.

❌ "Wrong Network"

Cause: Wallet on different chain than selected

Solution: Switch network in your wallet to match the source chain, or click "Switch Network" when prompted

❌ "User Rejected Transaction"

Cause: Transaction cancelled in wallet

Solution: Simply retry the swap and approve in your wallet

❌ "Insufficient Liquidity"

Cause: Not enough liquidity for token pair

Solution: Reduce swap amount, try different token route, or use major tokens (USDC, ETH, etc.)

Wallet Connection Issues

  1. 1. Refresh the page and try reconnecting
  2. 2. Clear browser cache and cookies
  3. 3. Try a different browser or incognito mode
  4. 4. Update your wallet extension to latest version
  5. 5. Disable conflicting browser extensions

Need More Help?

If you're still experiencing issues:

Contact Support on Twitter

Error Codes

CodeMeaningAction
E001Insufficient balanceAdd more tokens or reduce amount
E002Insufficient gasAdd native tokens for gas
E003Slippage exceededIncrease slippage tolerance
E004Token not approvedComplete token approval first
E005Wrong networkSwitch to correct chain
E006Route not foundTry different tokens or chain
E007Transaction deadline exceededRetry the swap
E008Bridge unavailableTry again later or different route
E009RPC errorCheck network connection, retry
E010User rejectedApprove transaction in wallet

Limits & Constraints

Transaction Limits

Minimum Swap

$1 USD equivalent (to cover gas costs)

Maximum Swap

Limited by available liquidity (typically millions USD)

Slippage Range

0.1% - 50% (default: 0.5%)

Transaction Timeout

20 minutes (adjustable)

Network Constraints

  • Block Confirmation Times: Varies by chain (0.25s - 12s per block)
  • Bridge Confirmation: 2-15 minutes for cross-chain swaps
  • Gas Limits: Varies by chain and transaction complexity
  • RPC Rate Limits: Standard public RPC limits apply

Recommended Practices

  • ✓ For best rates, swap amounts between $100 - $100,000
  • ✓ Allow 0.5-1% slippage for volatile tokens
  • ✓ Use stablecoins for predictable cross-chain transfers
  • ✓ Check gas prices before large transactions
  • ✓ Test new routes with small amounts first