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

0 stars 0 forks source link

Cache deposit token #63

Closed code423n4 closed 3 years ago

code423n4 commented 3 years ago

Handle

cmichel

Vulnerability details

The SwappableYieldSource contract could cache the deposit token in a storage variable once in initialize and when the yield source changes, instead of always doing an external call to get it IERC20Upgradeable(yieldSource.depositToken()):

PierrickGT commented 3 years ago

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