sherlock-audit / 2023-01-sentiment-judging

2 stars 0 forks source link

obront - RewardRouterV2Controller decoding is slightly off #7

Closed github-actions[bot] closed 1 year ago

github-actions[bot] commented 1 year ago

obront

low

RewardRouterV2Controller decoding is slightly off

The canCallRedeem() function in RewardRouterV2Controller.sol performs the following decoding:

(tokensIn[0],,,) = abi.decode(data, (address, uint256, uint256, uint256));

However, the function has the following signature:

unstakeAndRedeemGlp(address _tokenOut,uint256 _glpAmount,uint256 _minOut,address _receiver)

I wouldn't normally submit this, since you don't use that part of the decoding, but one of my other issues has a recommendation that the receiver is used, so I wanted to highlight that this fix is necessary.