OmniBridge
OmniBridge allows the migration and return of assets instantly between all of Omnify's supported networks. Each source asset is locked on the source network and has its own distinct equivalent asset on each destination network. This equivalent asset is minted upon receiving the migrated assets, and is burned when returning it to the source network. This method ensures a 1:1 peg between source and bridged assets. Accessible from bridge.omnify.finance and app.omnify.finance/bridges

Migrating and Returning assets
The process of migrating and returning assets using OmniBridge is very straightforward. Start by downloading the OmniBridge interface from our github repo. You can find a list of all Omnify services' tiers and fees at omnify.finance/fees.
OmniBridge does not support native token bridging with "msg.value". Make sure your native tokens are wrapped into their ERC20 wrap before bridging.
In this example we will be bridging USDC from Avalanche C-Chain to Binance Smart Chain.
Bridging
Quote network fee
Omnify uses LayerZero to send and receive cross-chain messages. LayerZero requires a network fee to process these messages and get them across to the destination networks. We can learn how much LayerZero's DVN's & Executors request to process our bridge transactions by calling quote with our payload from our OmniBridge contract.
Before we call quote we need to know:
the destination chain's LayerZero ID
the payload message we want to send
and create the options that we will forward to LayerZero's DVNs & executors
(1) All networks' Layerzero IDs can be found in our notes file in our Github Repo.
(2) Payload message
The payload message is simply a string that contains the transaction details:
"sourceAssetAddress.sourceChainEid.msgsenderaddress.recipientAddress.amount.assetName.assetSymbol.assetDecimals.isReturningBridgedAsset.foreignEquivalentAddress"
You can dynamically deduce the payload as such:
(3) Now let's get the gas limit and create the options
Lets explain quote and its structure
We can finally call quote from our code
Bridging through OmniBridge is complete, Good Job! 👏
Last updated