Submitted by adriro, also found by d3e4
While the intention is to use the 0x protocol to sell rewards, the implementation doesnt provide any basic guarantee this will correctly happen and grants the rewarder arbitrary control over the tokens held by the strategy.
Rewards earned in the VotingStrategy contract are exchanged for ETH and deposited back into the protocol. As indicated by the documentation, the intention is to swap these rewards for ETH using the 0x protocol:
However, the implementation of applyRewards() shallowly executes a series of calls to arbitrary targets:
https://github.com/code-423n4/2023-09-asymmetry/blob/main/contracts/strategies/votium/VotiumStrategyCore.sol#L272-L305
This not only fails to provide any guarantee that 0x will be used (and that it will be used correctly), but grants a lot of power to the rewarder which can be used accidentally or purposely to negatively impact the protocol. The rewarded role can grant any token approval to any spender and execute arbitrary calls on behalf of the VotingStrategy.
Provide better guarantees in the implementation of applyRewards() that 0x will be used to swap rewards, to ensure a more transparent and less error prone solution.
Asymmetry acknowledged
