This repository contains the Morpho protocol’s ERC20 token. It is designed to be upgradable and support onchain delegation. Additionally, it ships a wrapper contract to simplify the migration of assets from the previous token contract to the new Morpho token contract.
The Morpho token complies with the EIP-1967 to support upgradeability.
The Morpho token supports onchain voting and voting power delegation.
The Wrapper
contract enables the migration of legacy tokens to the new token version at a one-to-one ratio.
With the functions depositFor
and withdrawTo
, this contract ensures compliance with ERC20WrapperBundler
from the Morpho bundler contracts, enabling one-click migrations.
The Wrapper
contract will hold the migrated legacy tokens.
During contract intialization, 1 billion tokens will be minted for the Wrapper
contract, which will initially hold the entire supply.
Any legacy token holder will then be able to migrate their tokens provided that the migration amount is the approved for the wrapper.
Migrated legacy tokens may be recovered in order to revert a migration.
$ forge install
$ forge test
The Morpho token is licensed under GPL-2.0-or-later
, see LICENSE
.