Users of Migration.sol may forfeit rebase rewards
The migration function calls instantUnstake with the rebase flag set to false, so any pending rebase is skipped. A user migrating funds at that moment would forfeit the rewards from that pending rebase.
Submitted by 0x52, also found by berndartmueller
Users of moveFundsToUpgradedContract() in migration.sol may forfeit rebase rewards.
Proof of Concept
L54 calls instantUnstake(false) meaning that it skips the optional rebase. If there is a pending rebase then the user calling the function will not get this rebase and miss out on potential rewards.
Recommended Mitigation Steps
Add an input bool \_trigger then add the following code to the start of the function:
if (_trigger) { rebase(); }
This allows users to optionally call rebase if they are concerned about losing pending rebase rewards.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
A user calling the migration function while a rebase is pending could miss out on the rewards from that rebase.
What the attacker needed
Pending rebase at time of call; user calls moveFundsToUpgradedContract()
The fix
The function should accept a flag and call rebase() at the start when the caller wants to capture pending rewards before migrating.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A rebase is a periodic adjustment that credits rewards to holders. The migration function unstakes funds without first applying a pending rebase, so the user loses those rewards. The report suggests letting the caller choose to trigger the rebase first.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.