Closed c4-bot-2 closed 7 months ago
bytes032 marked the issue as sufficient quality report
bytes032 marked the issue as primary issue
tserg (sponsor) disputed
The Blesser should deal with how leftover tokens are to be handled.
This particular exhibit concerns how an out-of-scope contract (IBlesser
) will behave in a particular system flow when updating rewards.
I am inclined to align with the Sponsor's statement in this particular exhibit as it is logical for the Blesser (i.e. vesting contract) to be able to handle tokens that are not ultimately vested.
alex-ppg marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/code-423n4/2024-01-opus/blob/4720e9481a4fb20f4ab4140f9cc391a23ede3817/src/core/absorber.cairo#L365-L389 https://github.com/code-423n4/2024-01-opus/blob/4720e9481a4fb20f4ab4140f9cc391a23ede3817/src/core/absorber.cairo#L914-L975
Vulnerability details
Impact
absorber.set_reward
can be used to updating a existing reward, but before updating, the function doesn't callbestow
to claiming the reward in original blesser, in such case, if there's some reward in the original blesser, the reward will lost.Proof of Concept
As show in code above, the absorber.set_reward function doesn't call absorber.bestow to claim the existing rewards before update an existing blesser.
Tools Used
VIM
Recommended Mitigation Steps
Assessed type
Other