There don't seem to be protections against a malicious actor griefing others by manipulating the global liquidity accounting. This could potentially block honest users from claiming their earned rewards.
Proof of Concept
The main risk of griefing by manipulating global liquidity accounting stems from this function:
Lines of code
https://github.com/code-423n4/2023-10-canto/blob/40edbe0c9558b478c84336aaad9b9626e5d99f34/canto_ambient/contracts/mixins/LiquidityMining.sol#L39-L65 https://github.com/code-423n4/2023-10-canto/blob/40edbe0c9558b478c84336aaad9b9626e5d99f34/canto_ambient/contracts/mixins/LiquidityMining.sol#L156-L168
Vulnerability details
Impact
There don't seem to be protections against a malicious actor griefing others by manipulating the global liquidity accounting. This could potentially block honest users from claiming their earned rewards.
Proof of Concept
The main risk of griefing by manipulating global liquidity accounting stems from this function:
function accrueConcentratedGlobalTimeWeightedLiquidity
The issue is this function can be called by any user at any time. There is no access control.
An attacker could exploit this by:
Calling
accrueConcentratedGlobalTimeWeightedLiquidity
with manipulated curve liquidity data right before honest users try to claim rewardsThis distorts the global accounting that reward calculations rely on
Honest users end up claiming smaller % of rewards due to griefing
A more in-depth explanation for the griefing attack would be very helpful here.
function claimConcentratedRewards
The griefing attack works as follows:
Honest user has been accruing rewards for 1 week based on depositing 100 ETH in pool liquidity
Attacker has small portion of pool liquidity
When honest user tries to claim rewards:
3a. Attacker calls
accrueConcentratedGlobalTimeWeightedLiquidity
with a manipulatedcurve.concLiq_
value of 10 ETH3b. This results in a very low global liquidity for the week right before claim
Honest user's rewards claim calculates percentage based on the distorted global liquidity
Honest user gets only a small portion of the intended rewards due to griefing
Tools Used
Vs
Recommended Mitigation Steps
To prevent this,
accrueConcentratedGlobalTimeWeightedLiquidity
should check:This would ensure only the owner can accumulate global liquidity, preventing manipulation.
Assessed type
Access Control