Bridge Specification
Last updated
Last updated
DefiVerse Bridge (also known as Bridge) is a bridge aggregator that allows users to transfer tokens from an external network (e.g., Ethereum) to any Verse within the Oasys ecosystem in just one step.
As of the time of writing, there is no direct bridge that allows users to transfer tokens straight from an external network to an L2 Verse. To bring tokens from an external network to L1 Oasys Hub, users first need to use a third-party bridge called cBridge. Once the tokens are on L1 Oasys Hub, they must then be transferred to the desired Verse using Oasys’ native bridge.
The Bridge simplifies this process by enabling users to transfer tokens from an external network to any L2 Verse in a single step, making it feel as if a direct bridge exists. It works by using cBridge to send the user's tokens from the external network to a bridge contract on L1 Oasys Hub. Once the tokens arrive, multiple verifiers in the Bridge automatically transfer them to the designated Verse. When moving tokens from a Verse back to an external network, the process is reversed: tokens from an L2 Verse are sent from the user’s wallet to the Bridge’s contract and then transferred to the external network via cBridge.
The diagram above shows the flow of tokens from an external network (e.g., Ethereum) to each Verse (e.g., DefiVerse).
DefiVerse Bridge: A dApp that provides a user-friendly interface (GUI) for bridging tokens between an external network and Oasys, and vice versa.
Bridge Verifiers: Background agents that continuously monitor tokens bridged via cBridge and transfer them to the Oasys Native Bridge. They also track tokens moving through the Oasys Native Bridge and ensure they are sent to cBridge when bridging from a Verse back to an external network.
Price Oracle: A background service that retrieves token prices from third-party sources (such as CoinGecko or CoinMarketCap) when the gas option is enabled. It then feeds this pricing data to the Bridge Verifiers to assist with transactions.
The gas option is a special feature that allows users to automatically convert a portion of their bridged tokens into OAS on the destination Verse. The conversion rate (i.e., token price) is fetched from third-party sources like CoinGecko. When enabled, Bridge Verifiers send the specified amount of tokens to a predefined account and bridge an equivalent amount of OAS to the user’s account on the destination Verse.
A user bridges 100 USDC from Ethereum to DefiVerse.
They enable the Gas Option, choosing to convert 0.3 USDC into OAS.
The Bridge Verifiers transfers 0.3 USDC to a predefined account as part of the process.
At that time, the exchange rates are $0.03 per OAS and $1 per USDC.
As a result, the user’s DefiVerse account receives 99.7 USDC and 30 OAS.