code-423n4 / 2021-07-pooltogether-findings

0 stars 0 forks source link

SwappableYieldSource - Minor Refactoring - Use `depositToken()` instead of `yieldSource.depositToken()` #12

Closed code423n4 closed 3 years ago

code423n4 commented 3 years ago

Handle

GalloDaSballo

Vulnerability details

Impact

In supplyTokenTo, redeemToken, approveMaxAmount, _setYieldSource, and _transferFunds you write: _yieldSource.depositToken(), however you already defined a public function called depositToken to retrieve the address of the depositToken for the current Yield Source.

Since it's marked public, you could refactor every use of _yieldSource.depositToken() to depositToken()

Otherwise, you can mark the function as external so that it's clear it's just supposed to be used from outside

PierrickGT commented 3 years ago

Duplicate of https://github.com/code-423n4/2021-07-pooltogether-findings/issues/26