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

0 stars 0 forks source link

Gas optimization on `redeemToken` of `ATokenYieldSource` #123

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

shw

Vulnerability details

Impact

At line 213 of ATokenYieldSource, depositToken() can be replaced by _tokenAddress() to save gas since the former is a public function, while the latter is an internal function.

Proof of Concept

Referenced code: ATokenYieldSource.sol#L213

Recommended Mitigation Steps

Change depositToken() to _tokenAddress().

PierrickGT commented 3 years ago

PR: https://github.com/pooltogether/aave-yield-source/pull/14