PancakeSwap
Launch App
English
English
  • Welcome to PancakeSwap
    • Product Overview
    • ✨How-to Guides
      • Get Started (BSC)
        • Create a Wallet
        • Get BEP20 Tokens
        • Using PancakeSwap without Centralized Exchanges
        • Connect Your Wallet to PancakeSwap
      • Get Started (Aptos)
        • Create a Wallet
        • Get Aptos Coins
        • CAKE Bridging Guide
        • Connect Your Wallet to PancakeSwap
        • Aptos FAQ
      • V3/V2 Migration
        • How to migrate
        • How v3 APR is calculated
        • FAQ
        • V2 Migration
          • Migrate Your Stakings
          • MasterChef v2
            • List of Farms
          • CAKE Syrup Pool
    • 🗺️Roadmap
    • veCAKE Sunset
      • Staked Cake Redemption
      • 🔷[Archive] veCAKE
        • What is veCAKE?
        • How to get veCAKE?
        • Migrate from CAKE Pool
        • veCAKE Managers
        • Bridge your veCAKE
        • Earn CAKE Weekly
          • FAQ
    • 📈Analytics (Info Page)
    • ✅Audits
    • 🤙Contact Us
      • Social Accounts
      • Telegram & Discord Communities
      • 💼Business Partnerships
        • ⛽veCAKE / Gauges
        • 🧑‍🌾Initial Farm Offerings - IFOs
        • 🥞Syrup Pools and Farms
        • 🖼️NFT Marketplace
        • ❓Commonly Asked Business Partnerships Questions
      • Ambassador Program
        • What can you do as an Ambassador?
        • Benefits of a PancakeSwap Ambassador
        • Want to be an Ambassador?
        • ❓ FAQs Page
      • General FAQ
        • I need help
        • Troubleshooting Errors
        • What is an Approval Transaction?
        • Fixing Stuck Pending Transactions on MetaMask
    • 👨‍👨‍👦About Us
      • Team
        • The Kitchen Team
        • Become a Chef
          • Brand / Graphics Designer
          • Motion / Interaction Designer
          • Social Media & Content Manager
          • Developer Relations Manager
          • Product Designer (UX/I)
          • Business Development Manager
          • Senior Backend Engineer
      • Brand & Logos
  • 👴Archive
    • 📂Legacy Products
      • 🖼️[Archived] NFT Marketplace
      • 🎮[Archived] Gaming Platform
        • 📒Brand Kit
        • 🎓Pancake Mayor
        • 🛡️Pancake Protectors
          • FAQ
      • 🍯[Archived] Pottery
        • How to Play Pottery
        • Pottery FAQ
      • 🧈[Archived] Trading Reward
        • How to Participate
          • Top Traders Campaign
          • CAKE Stakers Campaign
        • FAQ
      • 🤝[Archived] Simple Staking
        • How to start Simple Staking
        • FAQ
        • Terms & Conditions
      • 🎯[Archived] PancakeSwap Quest
        • Getting Started
        • How to Join and Complete a Quest
        • Rewards
      • 💧[Archived] Liquid Staking Integration
        • How To Liquid Stake
        • WBETH
          • WBETH FAQ
        • SnBNB
          • SnBNB FAQ
      • 💸[Archived] Options
        • Options Primer
        • CLAMM Options
        • Options FAQ
      • [Archived] CAKE Syrup Pool
        • How to use the Flexible Staking option
        • How to use the Fixed-Term Staking option
    • Old Tokenomics
      • CAKE Tokenomics v1
      • Controlling CAKE supply v1
    • How to Use Farms with BscScan
    • [Archived] Affiliate Program
      • Dashboard & Link
      • Commission Structure and Payment
      • Program Rules & Guidelines
      • Terms & Conditions
  • Trade
    • 🔄Swap
      • Token Swaps
      • How to Trade
      • Fees and Routes
      • Market Maker Integration
      • Smart Router (V2)
        • How to trade using Smart Router
    • ♾️PancakeSwap Infinity
      • Key Features
      • Hooks
        • Dynamic Fee Hook
      • Pool Types
      • Farms
    • 🎯Limit Orders and Twap
      • How to use Limit Orders
      • How to use TWAP
    • 📈Perpetual Trading
      • What is Perpetual Trading?
      • Perpetual Trading V2
        • How can I use it?
        • Dumb Mode
          • Dumb Mode Guide
        • Degen Mode
          • Degen Mode Dynamic Fee
        • MADBTCUSD
          • MADBTCUSD FAQ
        • Perpetuals V2 Glossary
        • Forex
        • Perpetual Trading FAQ
          • Arbitrum
            • ALP Syrup Pool (Arbitrum)
              • ALP Buying & Selling Fees
        • Trading Rewards Program
          • Arbitrum
        • Supported Chains, Modes & Markets
      • Perpetual Trading V1
        • Perpetuals V1 Glossary
        • How can I use it?
        • V1 Perpetual Trading FAQ
    • 🏦Stableswap
      • How to StableSwap
    • 💳Buy Crypto
    • ❓Trading FAQ
      • Swap FAQ
      • v4 FAQ
      • Limit Orders and TWAP FAQ
  • Trading Tools
    • 🛡️PancakeSwap MEV Guard
    • PancakeSwap Auto Slippage
      • How to Set Slippage on PancakeSwap
    • 🔔Notifications
    • ❓Trading Tools FAQ
      • MEV Guard FAQ
  • Bridge
    • 🌉Bridging
      • Between EVMs
      • Between EVM and Aptos
      • Wormhole Bridge Guide
    • ❓Bridging FAQ
      • Wormhole Bridge FAQ
  • Earn
    • 🌊Liquidity Pools
      • How to Add/Remove Liquidity
      • ⛏️Pancake Picks
      • Zap
        • Zap (V2)
    • 🚜Yield Farming
      • How to Use Farms
        • How to Use Farms (Legacy)
      • APR/ROI/IL Calculator
      • Farming on Aptos
        • FAQ
      • Crosschain Farming
        • FAQ
    • 🥩Cake Staking
      • 🍯Syrup Pools - Stake CAKE
        • Syrup Pools
    • 🛍️IFO (Initial Farm Offering)
      • How to Participate in an IFO
      • How to Participate in CrossChain IFOs
      • FAQ
      • NFT Profile System
        • How to Set Up an NFT Profile
        • Teams
      • Contract Details
    • ❓Earn FAQ
      • Cake Staking FAQ
        • Syrup Pool FAQ & Troubleshooting
  • Play
    • 🔮Prediction
      • How to Use Prediction
      • AI Prediction
      • Prediction FAQ
      • Prediction Troubleshooting
      • Prediction Mini App
    • 🎟️Lottery
      • How to Play Lottery
      • Lottery FAQ
  • ❓Play FAQ
  • Protocol
    • 🍰CAKE Tokenomics
    • 📔Governance
      • How to Vote
        • How to Vote with SafePal Wallet
    • 💻Developers
      • Developer Docs
      • Contributing
        • Codebase Overview
Powered by GitBook
On this page
  • Contract info
  • Example of CAKE bridging to Aptos
  • Utilities
  • Audits

Was this helpful?

  1. To Delete
  2. Smart Contracts (EVM)

Cross Chain CAKE Bridging

PancakeSwap uses LayerZero OFT for Cross Chain CAKE Bridging

Last updated 1 year ago

Was this helpful?

Contract info

CAKE Bridging Contract

Contract name: CakeProxyOFT Contract address:

Example of CAKE bridging to Aptos

sendFrom

    function sendFrom(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, uint _minAmount, LzCallParams calldata _callParams) external payable;

Name

Type

Description

_from

address

From address. This should be the address calling the CakeProxyOFT

_dstChainId

uint16

108 for Aptos mainnet

_toAddress

bytes32

The destination address on Aptos

_amount

uint256

Amount of CAKE in WEI. Please note that amounts less than 1e-8 will get dusted

_minAmount

uint256

Minimum receiving amount. We do not charge any fee in CAKE. But this should not be larger than _amount after being rounded down to 8 decimals.

_callParams

tuple

A set of call parameters used to define bridging behaviours. Continue reading for more detail.

sendFrom is a payable function. You will need to pay around 0.005-0.01 in BNB for destination airdrop gas fees. This value will vary based on the price of BNB/APT.

Please note that if you define extra gas being airdropped to your destination address, you will need to increase this number or tx will revert with not enough natives for fees

How to form `_callParams`

{
    refundAddress,
    zroPaymentAddress,
    adapterParams
}

Name

Type

Description

refundAddress

address

Excess fee (BNB) will be returned to this address

zroPaymentAddress

address

0x0000000000000000000000000000000000000000

adapterParams

bytes

A set of parameters to define destination gas airdropping. Continue reading for more detail.

How to form `adapterParams`

{
    version,
    dstGasLimit,
    dstNativeGasTransferAmount,
    dstNativeGasTransferAddress
}

Name

Type

Description

version

uint16

Default is 2

dstGasLimit

uint

Default is 200000

dstNativeGasTransferAmount

uint

Amount destination native gas token to airdrop. Use 0 if you don't need the bridge to convert BNB and airdrop you APT

dstNativeGasTransferAddress

bytes

The destination address that receives native gas tokens on destination chain

const adapterParams = utils.solidityPack(
    ["uint16", "uint", "uint", "bytes"],
    [2, 200000, 0, "0xYourAptosAddress"]
)

Utilities

Audits

0xb274202daBA6AE180c665B4fbE59857b7c3a8091
View on BscScan
GUI - CAKE - Aptos PancakeBridge
LayerZeroScan - track your crosschain txs
LayerZero Docs
OtterSec's PancakeSwap CAKE OFT (Bridging) security audit