Submitted by oakcobalt
Based on Canto doc, NOTE address may be modified and redeployed:
As stated in doc, Dapp should use CToken.underlying() to ensure that NOTE address used is always correct.
The problem is current implementation in asdRouter.sol will only initiate noteAddress at contract deployment. noteAddress can not be changed afterward and the effect is the same as hardcoding an address.
https://github.com/code-423n4/2024-03-canto/blob/52dd3d7083ca9bed0484180f4a5f3af84a10a9bc/contracts/asd/asdRouter.sol#L45
Note: When performing swap from asdUSDC to NOTE, noteAddress will be used instead of CToken.underlying(). This means when NOTE address changes, swap and lzcompose will be DOSed.
https://github.com/code-423n4/2024-03-canto/blob/52dd3d7083ca9bed0484180f4a5f3af84a10a9bc/contracts/asd/asdRouter.sol#L214-L218
For comparison, asdOFT.sol has the correct NOTE address implementation where cNoteToken.underlying() is used.
Change to store cNote address and only use CNote.underlying().
dsudit01 (Canto) confirmed and commented:
SpicyMeatball (warden) commented:
3docSec (judge) commented:
