Parallel Governance Token (PRL)
Last updated
Was this helpful?
Last updated
Was this helpful?
This document details features related to the new token and the migration from Mimo token to PRL.
3 types of contracts:
The token contract that inherit of Openzeppelin ERC20 and ERC20Permit standards.
The Migrations contracts handled by the and contracts that leveraging on for migrating Mimo from anychain to PRL on anychain.
The Bridging of PRL, handled by the and contracts that leveraging on fork of for allow PRL to be omnichain.
The architecture allows:
Omnichain migration from MIMO to PRL
Omnichain PRL
The omnichain part is handled by LayerZero that allows cross chain messages. We are using two standard :
Each Omnichain contract inherits a specific type of the LayerZero standard :
Migration contracts :
Omnichain PRL:
Thanks to the architecture, users will be able to migrate from Mimo to PRL without friction on the chain to send/receive. Below you will find the possible scenarios:
Migrate on Main
In this case we just transfer Mimo to the contract from the user and send him PRL.
Migrate from Main to chain A
In this case we swap Mimo to PRL on the main chain and send the PRL to the LockBox (OFT) that will lock the PRL and send a message to the PeripheralPRL contract on the destination chain.
Migrate from chain A to Main
In this case we are using the PrincipalMigrationContract to transfer user's Mimo to itself and send a migration message to the main chain. Then the PrincipalMigrationContract will receive the message and send PRL to the user.
Migrate from chain A to chain X
In this case we are using the full architecture to send message from A to X link in the previous case. Then the PrincipalMigrationContract will create a new message that will be send to the LockBox. The LockBox will transfer PRL from the PrincipalMigrationContract to itself and send the message to the final chain that will mint PRL to the user.
A pause
function exists to prevent new send()
and migrateToPRL()
calls from being executed. This is useful in the event of a bug or security vulnerability.
Only the Owner can call pause
An unpause
function exists to unpause the contract.
Only the Owner can call unpause.
A emergencyRescue()
function exists on migration contract to withdraw any tokens owned by the contract.
Only the Owner can call emergencyRescue and the contract must be in pause.
The contract is an immutable contract that inherit of Openzeppelin and standards.
The is the main migration contract that will be deployed on the same chain as the PRL token. It will own the total supply of PRL at deployment and will allow users to migrate their Mimo to PRL on the same chain or by receiving omnichain messages from other chains. This contract inherits from LayerZero's OAppReceiver.
The will be deployed on the same chain as the PRL token and will allow user to bridge to/from different chain their PRL. This contract inherit of LayerZero's OFTAdapter that allow tokens' bridged on other chains to be lock into this contract.
The is the contract deployed on other chains that allow user to migrate Mimo to PRL from any chain. This contract inherit of LayerZero's OAppSender.
The will be deployed on other chains than where the PRL token is and will allow user to bridge to/from different chain their PRL. This contract inherit of LayerZero's OFTAdapter.
used by the MigrationContract to send/receive message link Mimo to PRL token migration.
used to make the PRL token bridgeable between chains.
is an OAppReceiver as its goal is to receive migration message.
is an OAppSender as its goal is to send migration message to the main chain.
is an OFTAdapter that allow to lock PRL token that has been bridged to other chains and to send/receive messages.
is an OFT that will mint/burn PRL on its chain and to send/receive messages.
By default LayerZero's OFT standard implement shareDecimals/decimalConversionRate to allow amount to be accepted on chains like Solana which are not uint256 but uint64. We fork the standard and removed all code related to shareDecimals/decimalConversionRate. Forked code is under folder.
Check the file for the deployed addresses on different networks.
For more details on the contract, refer to the .