What you need to know about the V2 token contracts

What is happening

We are upgrading the token smart contracts (EURe, USDe, GBPe, and ISKe) from version 1 (V1) to version 2 (V2). Ackee Blockchain Security, an industry leader trusted by top-tier organizations in web3 like Safe and 1inch, audited the new smart contracts. The report is available here.

Don't worry — the version 1 of the tokens will continue to work as usual without switching to the version 2 token. Version 1 of the tokens will still use the same address as before and operate with the version 2 contracts behind the scenes, ensuring your balance remains correct and you benefit from lower gas fees.

The upgrade is a significant step towards adopting the most advanced and widely accepted ERC standards. By leveraging OpenZeppelin's community-vetted libraries, the tokens inherit industry best practices and benefit from enhanced security and functionality. OpenZeppelin provides a robust framework that simplifies the integration of complex features, such as Permit (ERC2612), facilitates a smoother upgrade process, and guarantees that our smart contracts remain compliant with evolving ERC standards.

When will this happen

We will upgrade the tokens in phases:

Date Chain Status
Sunday, 18th of August 2024 Polygon ✅ completed
Sunday, 25th of August 2024 Gnosis ✅ completed
Sunday, 8th of September 2024 Ethereum Postponed

We have decided to postpone the Ethereum upgrade. We are getting feedback from the community and learning how to make this transition smoother.

Why the upgrade matters to you

The upgrade of the tokens significantly benefits users with both cost savings and enhanced features.

1. Gas cost efficiency

The new contract includes optimized functions that significantly reduce gas consumption, making onchain transactions much cheaper for users.

Function
ERC20 function
V1
gas used
V2
gas used
Difference
How much gas you save
Transfer
Send tokens to another address.
91908 26245 350%
Approve
Allow someone to spend tokens from your account
68586 24858 276%

2. A new feature, Permit (ERC2612)

The V2 tokens now support ERC-2612 Permit. Developers can use ERC-2612 Permit instead of ERC-20 Approve to improve user experience by relying on gasless token approvals through off-chain signatures, eliminating the need for a separate on-chain approval transaction. Using Permit, developers can create more efficient and user-friendly applications.

For more information, read our tutorial.

How you are affected

Although we have tried to be as prudent as possible in the migration, some difficulties are expected. We are working with the wallets, blockchain explorers, and DeFi protocols to migrate users and liquidity to the new tokens. Below is a list of how the upgrade may affect you.

1. Wallets displaying both V1 and V2 tokens

Your wallet may pick up the new token and show both V1 and V2 tokens with the same balance.

Example of a a Safe wallet displaying both V1 and V2 tokens

We are working with the wallets and platforms to improve the icon and details for the V2 token. You can differentiate between the versions by the name and address:

V1 V2
Name Monerium EUR emoney Monerium EURe
Gnosis EURe address 0xcB444e90D8198415266c6a2724b7900fb12FC56E 0x420CA0f9B9b604cE0fd9C18EF134C705e5Fa3430
Polygon EURe address 0x18ec0A6E18E5bc3784fDd3a3634b31245ab704F6 0xE0aEa583266584DafBB3f9C3211d5588c73fEa8d

2. Two transfer events are displayed when transferring V1 tokens

When signing transactions using the V1 token on projects like Aave and Curve, you might see two EURe transfer events in the preview in your wallet.

Example of two events in a wallet preview when using Aave

This behavior is expected because the V1 now forwards all transactions to V2 which manages the state of balances, approvals etc. Once the ecosystem has moved to V2, only one event is emitted, showing a single transfer event for EURe in the preview.

3. Event logs transitioning from V1 to V2

If you’re a builder using EURe event logs, your indexer may have broken. Although both V1 and V2 will always show the same balance, there is a nuanced difference in how the two versions emit logs. The fix is transitioning from V1 logs at a specific block height to V2 logs.

Chain T - block height V1 address (block height ⩽ T) V2 address (block height ≥ T)
Gnosis EURe 35656951 0xcB444e90D8198415266c6a2724b7900fb12FC56E 0x420CA0f9B9b604cE0fd9C18EF134C705e5Fa3430
Polygon EURe 60733237 0x18ec0A6E18E5bc3784fDd3a3634b31245ab704F6 0xE0aEa583266584DafBB3f9C3211d5588c73fEa8d

When the transfer or transferFrom methods are called on the V1 token, two events are emitted, one for each version. When the same methods are called on the V2 token, an event is only emitted for that token. This means that V1 will have all the relevant information to reconstruct the state up to T, and V2 will have the appropriate information after T.

Continued support for version 1

We understand that transitioning can take time, and users may have various needs and preferences. Therefore, it is important to note that the V1 tokens will continue to be supported. You can still use them as usual without any immediate need to upgrade.

Whether you use the V1 token or the V2 token in your wallet, you will still experience reduced gas costs and see the same balance.

How to use the V2 tokens

All information about token addresses, supported chains, etc., can be found at https://monerium.dev/docs/tokens.