Explanation Video: https://youtu.be/xuU4nB3IOgU
aTokens are interest bearing tokens. Their balance keeps on increasing inside the user's wallet with each passing second.
Let's take an example where user wants to move aToken (aDAI) from Ethereum to Conflux:
- User deposits 100 aDAI to ShuttleFlow's deposit contract.
- Corresponding 100 aDAI gets minted on Conflux blockchain.
- User enjoys high transaction speeds with aDAI on Conflux.
- As ShuttleFlow has the custody of aDAI now, so during this it accumulates 20 aDAI as interest.
- User burns 100 aDAI on Conflux, to receive 100 aDAI on Ethereum.
- The 20 aDAI (accumulated interest) gets locked in the ShuttleFlow deposit contract.
- The user deposits their aTokens into the corresponding kToken pool. Eg;: Deposit aDAI to mint kDAI.
- These kDAI act similar to Compound's cTokens. The amount of tokens remain constant, but the underlying assets keeps increasing!
- The ShuttleFlow bridge works perfectly fine now.
- When the user burns their initial 100 kDAI, they get back 120 aDAI (100 initial + 20 interest).