aave / gho-core

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The discount lock-period of user can be bypassed by executing balance-changing actions

MichaelMorami opened this issue · comments

In GhoVariableDebtToken.sol, the rebalanceUserDiscountPercent function checks a user's rebalance lock period (rebalanceTimestamp) is over before it allows rebalancing of the discount percentage.

However, _burnScaled and _mintScaled, stkAAVE.transfer are doing the same functionality of updating the discount percentage without checking whether the lock period is over.

This allows a user to rebalance their own, or somebody else's discount percentage even when the lock period is still active.

Link T-5682