Soft Mulberry Narwhal
Medium
The function setTreasury doesn't transfer the funds left in the treasury.
https://github.com/sherlock-audit/2024-10-axion/blob/c65e662999d0c79439703fc6713814b4ad023e01/liquidity-amo/contracts/Minter.sol#L73 In Minter.sol:71, there is a missing line : IERC20Upgradeable(token).safeTransfer(treasury, amount);
- The treasury balance is not equal to zero.
No response
- the admin call setTreasury
The protocol suffers an approximate loss of the amount of the treasury balance.
No response
Add a requirement about the balance of the treasury in line 72 : require ( IERC20Upgradeable(token).balanceOf(treasury) ==0);