Lucene search

K
code423n4Code4renaCODE423N4:2022-01-BEHODLER-FINDINGS-ISSUES-146
HistoryJan 31, 2022 - 12:00 a.m.

user won't be able to get his rewards in case of staking with amount = 0

2022-01-3100:00:00
Code4rena
github.com
5

Handle

CertoraInc

Vulnerability details

Limbo.sol (stake() function)

if a user has a pending reward and he call the stake function with amount = 0, he won’t be able to get his reward (he won’t get the reward, and the reward debt will cover the reward)

that’s happening because the reward calculation is done only if the staked amount (given as a parameter) is greater than 0, and it updates the reward debt also if the amount is 0, so the reward debt will be updated without the user will be able to get his reward


The text was updated successfully, but these errors were encountered:

All reactions