Skip to main content
Understanding the swap engine that combines DEX aggregation, cross-chain bridging, and FX optimization TED Swap is the core exchange engine of TED Protocol. It combines DEX aggregation, cross-chain bridging, and FX optimization into a unified swap experience.

The Swap Flow

Step 1: Quote Discovery

When you enter a swap, TED Protocol identifies whether it’s a same-chain swap, cross-chain transfer, or multi-hop FX conversion. The system then queries all relevant DEXs in parallel—not sequentially—to find available routes. For each potential path, the aggregator calculates total costs including gas, bridge fees, and slippage, then returns the optimal route that maximizes your output. Quote responses typically arrive in under 2 seconds. A caching layer with 10-second TTL and approximately 30% hit rate ensures fast subsequent queries while keeping prices fresh.

Step 2: Transaction Preparation

Once the best route is identified, the system prepares transaction parameters:
  • Destination contract address
  • Encoded call data
  • Gas estimates
  • Minimum output amounts with slippage protection
All this information is returned to the frontend for user review.

Step 3: User Signing

TED Protocol is fully non-custodial. You review the transaction details in a confirmation modal—including exact amounts, fees, and destination—then sign with your wallet. Your private keys never leave your device, and TED Protocol never takes custody of your funds. The signed transaction is then broadcast to the blockchain.

Step 4: Execution and Monitoring

After you sign, the transaction is submitted to the blockchain and TED Protocol monitors its confirmation status. For cross-chain transfers, the system continues monitoring through bridge completion. You receive notifications when the swap completes and tokens arrive in your wallet.

Swap Types

Same-Chain Swap

The simplest operation: exchange tokens within the same blockchain. For example, swapping 100 USDT to USDC on Ethereum routes through the best available DEX—typically Curve for stablecoin pairs—and completes in about 15 seconds. You pay only gas costs plus the standard 0.1% protocol fee. Same-chain swaps are ideal for quick conversions, stablecoin arbitrage, or preparing assets for cross-chain transfers.

Cross-Chain Transfer

Move the same token between different blockchains. Transferring 100 USDC from Ethereum to Base, for instance, routes through Circle CCTP and completes in 1-2 minutes. CCTP transfers are free beyond gas costs since Circle absorbs the bridge fees. Cross-chain transfers are useful for moving funds between chains, accessing chain-specific DeFi opportunities, or consolidating assets.

Cross-Chain Swap

The most powerful operation: swap and bridge in a single flow. Converting 1,000 USDT on Ethereum to JPYC on Polygon involves three steps:
1

Source swap

USDT to USDC via Curve
2

Bridge

USDC bridging via CCTP or LayerZero
3

Destination swap

USDC to JPYC via the destination chain’s best DEX
All executed as one coordinated operation. Total time is typically 5-10 minutes with combined fees around $5. Cross-chain swaps are designed for international transfers, currency conversion, and cross-border payments where the goal is to move value between currencies and chains simultaneously.

Slippage Protection

Every swap includes built-in slippage protection. You set the maximum acceptable slippage—0.5% by default—and the smart contract enforces a minimum output amount. If market movement during execution exceeds your tolerance, the transaction reverts and you lose only gas, not your swap amount.
ScenarioRecommended Slippage
Stablecoin pairs with deep liquidity0.1-0.3%
Standard swaps0.5%
Lower liquidity or volatile conditions1-2%

Gas Optimization

TED Protocol minimizes gas costs through several mechanisms:
  • Permit2 signatures — Reduce approval overhead by approximately 20%
  • Batch approvals — Approve each token only once rather than per-transaction
  • Route optimization — Minimize unnecessary contract calls
  • L2 chain suggestions — Recommend cheaper chains when appropriate for your swap

Security Model

The security architecture spans multiple layers:
  • Smart contracts — Audited, non-custodial, with emergency pause capabilities
  • User signatures — Every transaction requires explicit signing with transparent parameters
  • Bridge integrations — Only battle-tested protocols with billions in cumulative volume (CCTP, LayerZero, Wormhole)
  • Frontend — Open-source and verifiable
For detailed security information, see Risk Overview and Smart Contract Risks.