TL;DR
Technical analysis for the Aave community on why the upcoming transition of $MATIC to $POL token should not affect Aave’s systems apart from some minor miscellaneous changes like renaming of the contracts.
This transition will occur in two phases.
- First, an upgrade on Polygon’s staking and bridge contracts on Ethereum is scheduled for September 4th, 2024, which should not significantly affect Aave apart from some adaptations in peripheral contracts.
- Afterwards, the Ahmedabad hard fork on Polygon PoS chain, planned for late September 2024 or thereafter, will require the renaming of some Aave contracts via governance proposal.
$MATIC → $POL Migration
The Polygon ecosystem is expected to undergo a migration of the $MATIC token to $POL token. POL is the upgraded native token of Polygon 2.0 and will replace MATIC as the native gas and staking token of the Polygon PoS network playing a crucial role in the network’s AggLayer, a key part of its scaling strategy.
Technical changes
The migration from $MATIC to $POL introduces several technical changes that are worth highlighting.
→ Token Contracts:
On the Polygon PoS network, the WMATIC and MATIC token contract will be updated by replacing its bytecode via a hard-fork.
- MATIC token contract: The name will be updated to
Polygon Ecosystem Token
, the symbol toPOL
and theEIP712_DOMAIN_NAME
also changed toPolygon Ecosystem Token
, with revision bumped to2
- WMATIC token contract: Only the name will be changed to
Wrapped Polygon Ecosystem Token
and the symbol toWPOL
.
On the Ethereum network, there is a new contract deployment of the POL token changing the token name to Polygon Ecosystem Token
and the symbol name to POL
with an additional support for EIP-2612 Signature based permit approvals and some non-standard functions for allowance modification to add support for PERMIT2.
The implementation can be found here.
The MATIC token on ethereum can be migrated 1-1 to POL using the migration contract. This is live and the migration contract is deployed here.
→ Staking Contracts:
On Ethereum, the StakeManager proxy contract used for staking MATIC will be updated to a new implementation which will:
- Convert all the $MATIC in the StakeManager to $POL.
- Use $POL for all new staking and unstaking requests.
- Have legacy functions that allow for staking and unstaking using both MATIC and POL both to preserve maximum backward compatibility.
This proposed upgrade will not change any staking contracts on the Polygon PoS Network.
→ Bridge Contracts:
The PoS Plasma Bridge Contract on Ethereum will be upgraded to a newer version which will use POL instead of the MATIC token thus upgrading the native token of the Polygon PoS network from MATIC to POL. The PoS Plasma Bridge contract will:
- Convert all the $MATIC in the bridge to $POL
- Fulfil all withdrawal requests for the native asset of Polygon PoS Chain with $POL
- Credits all deposits in $POL or $MATIC with the native asset of the Polygon PoS chain.
Impact on Aave Ecosystem
The upgrade will not affect Aave on the non-Polygon PoS instances, as the $MATIC token is only listed there. Additional changes like support for EIP-2612 Signature based permit approvals which will be added for $POL will also not affect Aave as these changes would not be applied on the WMATIC token, which is the technically the one listed on Aave v3 Polygon.
We have been in close contact with the Chainlink team and the contract address for the $WMATIC feed on Polygon PoS chain will be the same, and the upgrade will be managed transparently by Chainlink infrastructure with the Chainlink node operators, assuring no liquidity disruption consequences.
Some minor miscellaneous changes like the following will be needed:
- Renaming of contracts: Following the upgrade, the aToken, variableDebtToken, and the staticAToken of WMATIC token need to be upgraded via a maintenance proposal which will update the token name and symbols to the new one to maintain consistency. There will be no upgrade on the WMATIC stableDebtToken as stable rate is deprecated. The renaming of WMATIC aTokens should be done on both Aave V2 and Aave V3 Polygon instances.
- LST’s (MATICx, stMATIC): Since the upgrade is backward compatible, there should be no major changes to the LST’s staking mechanism and no effect on the Matic LST’s listed on Aave. However, we have been in close contact with the teams about them.
- Migration of MATIC token to POL on the collector: The collector on ethereum holds ~580k old MATIC tokens, which should be migrated to $POL token via the migrator contract via a maintenance or treasury proposal.
- Misc Toolings: The AavePolEthPlasmaBridge contract which uses the PoS Plasma bridge should not be used for bridging post September 4 migration as it uses MATIC token on Ethereum side instead of POL. Instead a new adapted version should be deployed.
Conclusion
From a technical perspective, the Aave smart contracts will not be majorly affected by the $MATIC to $POL migration, only non-critical miscellaneous changes would be needed like renaming some contracts, fixing some tooling contracts or migration of $MATIC tokens on the Ethereum collector to $POL.
All these are not really time sensitive and will be done via a maintenance governance proposal.