Submitted by maanas
The owner of the liquidity mining sidecar can pull the native coins that are stored in the CrocSwapDex to reward the users.
The setConcRewards and setAmbRewards functions dont check if the quoted amount of rewards are actually sent by the caller. This allows the owner to specify any total amount of native coin which are available in the CrocSwapDex from which the funds will be used when distributing the rewards.
https://github.com/code-423n4/2023-10-canto/blob/40edbe0c9558b478c84336aaad9b9626e5d99f34/canto_ambient/contracts/callpaths/LiquidityMiningPath.sol#L65C7-L72
https://github.com/code-423n4/2023-10-canto/blob/40edbe0c9558b478c84336aaad9b9626e5d99f34/canto_ambient/contracts/callpaths/LiquidityMiningPath.sol#L74-L81
According to Ambient Docs they allow for deposits in native tokens.
Update TestLiquidityMining.js:
The funds added using hardhat.setBalance() is being used by the owner to distribute rewards
Hardhat
Add a msg.value check in the rewards function to see that the total value is passed when call the functions.
Rug-Pull
OpenCoreCH (Canto) acknowledged and commented:
