Bebop enables applications to execute gasless or self-executed token swaps using a request-for-quote (RFQ) model that eliminates slippage. This guide demonstrates how to integrate Bebop’s swap functionality with Privy embedded wallets.
Prerequisites
Before implementing swaps, contact Bebop to receive the following credentials:
- Auth Key – Enables authenticated API calls with improved rate limits and pricing
- Source ID – Identifies the application as an integration partner for revenue tracking
Setup token approvals
Bebop requires token approvals before executing swaps. Applications can use either standard ERC20 approvals or Permit2.
Standard ERC20 approvals
To use standard ERC20 approvals, specify approval_type=Standard when requesting a quote from Bebop’s API.
Before executing a swap, the application must grant the Bebop settlement contract (0xbbbbbBB520d69a9775E85b458C58c648259FAD5F) an allowance to spend the user’s tokens.
Applications can also use Permit2 for approvals. Consult Bebop’s documentation for implementation
details.
Request a quote
After configuring approvals, request a quote from Bebop’s API. The RFQ model guarantees the quoted price with zero slippage.
The following example requests a quote to swap 1 WETH for USDC on Base:
Execute the swap
Once Bebop returns a quote, the application can execute the swap by broadcasting the transaction using Privy’s embedded wallet provider.
Fee monetization
Bebop embeds fees directly in quotes, which are collected by market makers and distributed to integration partners monthly. The source ID must be included in all requests to ensure proper revenue tracking.
Bebop can optionally hedge collected fees to stablecoins (such as ETH to USDC) to prevent applications from accumulating unwanted token inventory.
Contact Bebop to configure fee hedging preferences and review revenue distribution terms.