Submitted by GalloDaSballo, also found by cccz, itsmeSTYJ, and PwnPatrol
Rewards for Heart beat are sent via _issueReward
https://github.com/code-423n4/2022-08-olympus/blob/b5e139d732eb4c07102f149fb9426d356af617aa/src/policies/Heart.sol#L110-L115
The function doesnt check for available tokens e.g.
min(reward, rewardToken.balanceOf(address(this)));
In case of calling withdrawUnspentRewards
https://github.com/code-423n4/2022-08-olympus/blob/b5e139d732eb4c07102f149fb9426d356af617aa/src/policies/Heart.sol#L149-L152
Because the function withdraws the entire amount, the heart will stop until a caller incentive is deposited again.
While a profitable searches will stop calling the Heart without an incentive, allowing the heart to beat when no rewards are available is preferable to having it self-DOS until a DAO aligned caller donates rewardToken or the DAO deals with the lack of tokens.
Add a check for available tokens
min(reward, rewardToken.balanceOf(address(this)));
Oighty (Olympus) confirmed and commented:
