Submitted by kaden, also found by kaden (1, 2) and cergyk
Attackers can steal unclaimed rewards due to insufficient accounting.
Pricing of shares for Yieldbox strategies is dependent upon the total underlying balance of the strategy. We can see below how we mint an amount of shares according to this underlying amount.
The total underlying balance of the strategy is obtained via asset.strategy.currentBalance.
GlpStrategy._currentBalance does not properly track all unclaimed rewards.
As a result, attackers can:
Its recommended that _currentBalance include some logic to retrieve the amount and value of unclaimed rewards to be included in its return value.
cryptolyndon (Tapioca confirmed)
