Skip to main content

Bungee Manual

Overview

Bungee Manual is our battle-tested bridge and swap aggregator that enables users to move assets between networks. It aggregates liquidity from multiple sources and finds optimal routes for transactions, minimizing costs and complexity.

Unlike Bungee Auto, which automatically executes the best route through a marketplace of off-chain agents (read more about it here), Bungee Manual provides you with all available routes and lets you choose the one that best matches your preferences.

Bungee Manual aggregates all asset bridges and DEXs into a single unified interface, selecting and routing funds through the most suitable bridge based on user preferences such as cost, latency, or security.

Manual Mode

Key Features

  • Route Selection: Choose from multiple optimized routes across DEXs and bridges
  • Cost Control: Compare and select routes based on fees, gas costs, and execution time
  • API Integration: Integrate directly via our comprehensive API endpoints
  • Battle-tested: Powering billions in volume across major protocols and wallets

How Bungee Manual Works

Bungee Manual is powered by an onchain component and an offchain component:

Onchain Component: Smart Contracts

Bungee contract architecture

The Bungee Manual smart contracts aggregate DEXs and bridges into a unified interface. Our architecture prioritizes modularity over upgradability, making modules immutable after deployment.

Key components include:

  • Gateway Contract: Main entry point for all transfers and swaps
  • Implementation Contracts: Specialized middleware for each DEX and bridge protocol
  • Modular Design: Allows adding new protocols without changing core architecture
  • Immutable Modules: Contracts cannot be upgraded, ensuring security and transparency

Offchain Component: Backend & API

Backend & API architecture

The Bungee Manual backend aggregates liquidity data from multiple DEXs and bridges to determine optimal transfer routes. Our API provides a unified interface for developers to access this functionality.

Key components include:

  • Routing Engine: Calculates the most efficient routes between chains and tokens based on cost, speed, and liquidity
  • Transaction Builder: Generates transaction data for interacting with the Gateway contract
  • Onchain Indexer: Monitors transaction status across multiple chains in real-time
  • API Gateway: Provides a unified interface for all Bungee functionality
  • Rate Limiting & Caching: Ensures optimal performance and reliability for all API consumers

Bridging Flows

Bungee Manual provides a seamless experience for transferring assets across chains. Here's how the process works:

  1. User Approval: The user first provides an approval for the Gateway contract to access their tokens

  2. Gateway Routing: As the main entry point, the Gateway contract acts as a router that directs the transaction to the appropriate implementation contract

  3. Implementation Execution: The implementation contract executes the operation, which may be:

    • A direct transfer (bridging only)
    • A swap followed by a bridge operation
  4. Source Chain: Once the transaction is included on the source blockchain, our onchain indexer captures the event

  5. Bridge Protocol: The underlying bridge protocol processes the transfer to the destination chain

  6. Destination Chain: On the destination chain, the bridged asset is sent directly to the user's address

  7. Fulfillment Monitoring: Our indexer captures the fulfillment event on the destination chain, marking the transfer as complete

Lifecycle of a Bridging Session

Lifecycle of bridging session

  1. Quote Generation: User fetches a quote to transfer Token A from Chain X to Token B on Chain Y, selects a preferred route, and initiates bridging.

  2. Transaction Building: The user requests transaction data for the route's initial step. If a prior approval transaction for Bungee contracts is required, it is indicated in the response.

  3. Execution: Upon executing the transaction, the UI tracks its progress. The initial transaction in the route encompasses the Swap and Bridge operation.

  4. Fulfilment: Upon completing the final transaction, the status API marks the route as "COMPLETED," signifying the recipient has received the funds on the destination chain.

Integration Options

Bungee Manual can be integrated using the Bungee API. see Manual Route Integration.

Next Steps