LogoLogo
  • Introduction
  • Parallel Protocol
    • PRL (Parallel Governance Token)
      • Issuance
      • Bridging Module
        • Specifications
        • Implementation
      • Tokenomics
        • Epoch Concept
        • Staking Mechanisms
        • ParaBoost
        • Fee Distribution
      • Governance
      • MIMO to PRL Migration
    • PAR (€ stablecoin)
      • How does PAR work?
      • Where can I get PAR ?
    • paUSD ($ stablecoin)
      • How does paUSD work?
      • Where can I get paUSD ?
    • Classic Vaults
      • Depositing
      • Borrowing
      • Fees
        • Fees Generation
      • Withdrawing
      • Repaying
      • Liquidating
    • Bridging Module
      • LayerZero Infrastructure
      • Specifications
      • Implementation
        • PAR
        • paUSD
    • Super Vaults (SV)
      • Leveraging
      • Rebalancing
      • EmptyVault
      • Automated Rebalance
      • Managed Rebalance
    • Inception Vaults (IV)
      • Borrowing
      • Liquidating
  • DAO & Governance
    • sPRL and Voting Power
    • Governance process
    • Proposal Framework
      • Parallel Integration Request (PIR)
      • Parallel Governance Proposal (PGP)
      • Parallel Improvement Protocol (PIP)
    • DAO Multisigs
      • DAO Multisigs Elections
        • Election 1
        • Election 2
        • Election 3
        • Election 4
        • Election 5
        • Election 6
      • Multisigs Transactions History
        • May 2022 Multisig History
        • June 2022 Multisig History
        • July 2022 Multisig History
        • August 2022 Multisig History
        • September 2022 Multisig History
        • October 2022 Multisig History
        • November 2022 Multisig History
        • December 2022 Multisig History
        • January 2023 Multisig History
        • February 2023 Multisig History
        • March 2023 Multisig History
        • April 2023 Multisig History
        • May 2023 Multisig History
        • June 2023 Multisig History
        • July 2023 Multisig History
        • August 2023 Multisig History
        • September 2023 Multisig History
        • October 2023 Multisig History
        • November 2023 Multisig History
        • December 2023 Multisig History
        • January 2024 Multisig History
        • February 2024 Multisig History
        • March 2024 Multisig History
        • April 2024 Multisig History
        • May 2024 Multisig History
    • Parallel Emergency Guardians
    • DAO Treasury
      • DAO Treasury Reports
  • Risk Assessments
    • Parallel's Risk framework
    • Methodology
    • Risk per Assets
      • PAR
        • Ethereum Assets
        • Polygon Assets
        • Fantom Assets
      • paUSD
        • Ethereum Assets
        • Polygon Assets
    • Risk parameters
      • PAR
        • Ethereum Risk parameters
        • Polygon Risk parameters
        • Fantom Risk parameters
      • paUSD
        • Ethereum Risk parameters
        • Polygon Risk parameters
    • Insurance Fund
  • Developers
    • Developer Guide
    • Parallel Governance Token (PRL)
    • Tokenomics
      • Key Operations Flows
      • Contracts
    • Classic Vaults
      • Architecture
      • VaultsCore
      • Opening a vault
      • Borrowing and minting PAR/paUSD
    • Bridging Module
      • Architecture
      • Sample Use Cases
    • Super Vault (SV)
      • Proxy Design
        • MIMOProxy
        • MIMOProxyGuard
        • MIMOProxyFactory
      • Action Contracts
        • MIMOEmptyVault
        • MIMOLeverage
        • MIMORebalance
        • MIMOAutoRebalance
        • MIMOManagedRebalance
        • MIMOProxyActions
        • MIMOVaultActions
      • Leverage Max Amount Derivation
    • Inception Vault (IV)
      • IV Architecture
      • InceptionVaultFactory
      • AdminInceptionVault
      • InceptionVaultCore
      • InceptionVaultsDataProvider
      • InceptionVaultPriceFeed
    • Contract Addresses
      • Parallel V3
        • Core Protocol
        • Parallel Governance Token
      • Parallel V2
        • PAR
          • Ethereum
          • Polygon PoS
          • Fantom
        • paUSD
          • Ethereum
          • Polygon PoS
      • Super Vaults (SV)
        • PAR
          • Ethereum
          • Polygon PoS
        • paUSD
          • Ethereum
          • Polygon PoS
      • Inception Vaults (IV)
        • Kovan
  • Resources
    • User Guides
      • Setting up
      • Managing Transactions on EVM blockchains
      • Troubleshooting
      • Mint PAR
      • Liquidity Providing
        • Provide PAR-USDC liquidity on Uniswap V3 (Ethereum)
        • Provide PAR-jEUR liquidity on Balancer (Polygon PoS)
        • Impermanent loss
      • How to Migrate to PRL?
      • How to Bridge Parallel Tokens?
      • How to Stake PRL?
    • Security & Audits
    • Links
    • Glossary
    • Brand Kit
Powered by GitBook
On this page
  • Overview
  • Key Features
  • High level Design:
  • LayerZero OFT standard
  • Why do we need an OFT token ?
  • Receiving Credit Messages from LayerZero
  • Sending Messages to LayerZero

Was this helpful?

  1. Developers

Bridging Module

PreviousBorrowing and minting PAR/paUSDNextArchitecture

Last updated 6 months ago

Was this helpful?

Overview

allows an already deployed ERC-20 token to be bridgeable by leveraging . The Parallel Bridging Module codebase is available , licensed under and has been audited by BailSecurity. You can find the report . Deployed addresses can be seen .

Key Features

The key features of BridgeableToken are:

  • Ability to burn principal tokens (named XXX) and send a message to LayerZero to mint the mirrored token on the other chain.

  • Ability to mint principal tokens by receiving a message from LayerZero from the mirrored BridgeableToken contract on the other chain.

  • Ability to cap the principal token amount to mint and burn (per day and globally). Since minting tokens from a received message must not revert, when the mint limit is reached, the user will receive OFT tokens (named lz-XXX) instead of principal tokens.

  • Ability to swap OFT tokens to principal tokens if the limits are not reached.

High level Design:

High Level Design

LayerZero OFT standard

Why do we need an OFT token ?

When the contract receives a message from LayerZero to mint principal tokens on its chain, it must not revert. Due to the mint limit on the principal token, we still have to credit the user with something. This is why we mint OFT tokens instead of principal tokens XXX. The user can then swap these OFT tokens for principal tokens if the limit is not reached.

Receiving Credit Messages from LayerZero

When the contract receives a message from LayerZero, it will mint tokens to the specified receiver address. Depending on the mint limits, the receiver will be credited with principal tokens and/or OFT tokens.

Sending Messages to LayerZero

Users can send principal tokens or OFT tokens to a receiver address on another chain by calling the send function. A check regarding burn limits and isIsolateMode is performed before sending the message to LayerZero. If any check fails, the function will revert. The user's tokens will be burned before sending the message to LayerZero.

The OFT standard from LayerZero allows fungible tokens to be transferred across multiple blockchains without asset wrapping or middlechains. The BridgeableToken contract is designed to comply with this standard to mint/burn the OFT tokens if the mint/burn limit is reached. More details about the OFT standard can be found .

here
BridgeableToken.sol
LayerZero's OFT standard
here
MIT License
here
here