⚙️How Brydge Works

Brydge bundles multiple transaction into 1 wallet confirmation. Brydge aggregates each of a transaction's steps at time of wallet confirmation, then executes the bundled transaction on-chain.

Here's your user's traditional path to add liquidity to a USDC-WMATIC Quickswap pool on Polygon, assuming they begin with ETH on Ethereum.

  1. Deposit ETH to an Ethereum --> Polygon bridge

  2. Wait for WETH to arrive in wallet on Polygon

  3. Get MATIC from a faucet or CEX for gas

  4. Approve WETH spend to Quickswap router contract

  5. Swap 50% of WETH --> USDC

  6. Swap remaining 50% of WETH --> WMATIC

  7. Approve USDC spend to the Quickswap router contract

  8. Approve WMATIC spend to the Quickswap router contract

  9. Deposit USDC-WMATIC liquidity and receive LP token

With Brydge, your users can now add liquidity to your pools by:

  1. Connecting wallet to the Brydge widget on your website

  2. Selecting any token from any supported chain to use

  3. Choosing how much liquidity to deposit

    • Here, Brydge dynamically calculates the transaction's route (Bridge ETH, approve WETH, swap --> USDC, swap --> WMATIC...), converts the route into calldata, and triggers a wallet confirmation popup for your user

  4. Confirming 1 in-wallet transaction

Upon confirmation, the transaction is posted to the source blockchain and executes via Brydge's audited smart contracts. This is similar to how Uniswap, 1inch, and other multicall engines work. View an example Brydge transaction here.

Try an LP deposit, cross-chain swap, or NFT purchase via the below Codepen!

👷‍♀️pageContract Architecture🔓pageSecurity

Last updated