Submitted by cccz
In the staking contract, the rebase function can only be called once per epoch.
In the rebase function, the rewards of the current epoch are used in the next epoch, which can cause the rewards to be updated incorrectly and lead to incorrect distribution of user rewards.
https://github.com/code-423n4/2022-06-yieldy/blob/524f3b83522125fb7d4677fa7a7e5ba5a2c0fe67/src/contracts/Staking.sol#L701-L719
Put IYieldy(YIELDY_TOKEN).rebase after epoch.distribute update
toshiSat (Yieldy) acknowledged and commented:
JasoonS (judge) decreased severity to Medium and commented:
