code-423n4 / 2022-02-concur-findings

2 stars 0 forks source link

[ConcurRewardPool] Possible reentrancy when claiming rewards #86

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Lines of code

https://github.com/code-423n4/2022-02-concur/blob/main/contracts/ConcurRewardPool.sol#L34

Vulnerability details

[ConcurRewardPool] Possible reentrancy when claiming rewards

Impact

Since the reward tokens are transferred before the balances are set to 0, it is possible to perform a reentrancy attack if the reward token has some kind of call back functionality e.g. ERC777. pBTC is an ERC777 token that is currently available on Convex. A similar attack occurred with imBTC on uniswap v1.

Proof of Concept

You can also find a walkthrough replicating a similar attack here.

Recommended Mitigation Steps

GalloDaSballo commented 2 years ago

The warden has shown how using a specific reward token can lead to reentrnacy for the function claimRewads

Because the finding is contingent on a specific token that enables the exploit, I believe Medium Severity to be appropriate