maTokens
Aave's aTokens on Matic Network
Information generally about how maTokens work is given in the article here: Aave's Interest-Bearing aTokens on Matic Network.
Conversion between aTokens and maTokens
The aToken bridging contract leverages the Aave protocol to convert aToken values to maToken values and back. Exactly how this is done is given in the two functions below.
To convert an aToken value to a maToken value or vise versa call the following functions on Ethereum on the aToken bridge contract which is at this address: 0x0D29aDA4c818A9f089107201eaCc6300e56E0d5c
The source code for the aToken bridge contract is here: https://github.com/aavegotchi/pos-portal/blob/master/contracts/root/RootChainManager/ATokenRootChainManager.sol
Don't use the ABI on Etherscan to call these functions. Instead use the ABI at this link: https://gist.github.com/mudgen/5da65e965e05ba08354f003aa86e6587
Getting aToken and maToken contract addresses
Use the functions below to get aTokens and maToken addresses.
The aToken addresses can be found on Etherscan or in Aave documentation.
The aToken bridge to Matic only works with version 2 aToken contracts.
Last updated