code-423n4 / 2021-10-mochi-findings

0 stars 0 forks source link

claimRewardAsMochi will produce a runtime error #149

Closed code423n4 closed 3 years ago

code423n4 commented 3 years ago

Handle

pauliax

Vulnerability details

Impact

function claimRewardAsMochi in ReferralFeePoolV0 will produce a runtime exception because the length of the path is 2 but it tries to assign 3 entries: address[] memory path = new address; path[0] = address(usdm); path[1] = uniswapRouter.WETH(); path[2] = address(engine.mochi()); So users will not be able to claim their rewards.

Recommended Mitigation Steps

address[] memory path = new address;

r2moon commented 3 years ago

duplicated with https://github.com/code-423n4/2021-10-mochi-findings/issues/97