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

0 stars 0 forks source link

Incorrect comment about memory #69

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

hrkrshnn

Vulnerability details

Incorrect comment

Context

modified   contracts/MStableYieldSource.sol
@@ -44,7 +44,7 @@ contract MStableYieldSource is IYieldSource, ReentrancyGuard {

     constructor(ISavingsContractV2 _savings) ReentrancyGuard() {
         // As immutable storage variables can not be accessed in the constructor,
-        // create in-memory variables that can be used instead.
+        // create in-stack variables that can be used instead.
         IERC20 mAssetMemory = IERC20(_savings.underlying());

         // infinite approve Savings Contract to transfer mAssets from this contract

The comment and therefore the variable name aren't accurate. The value would be in stack, and not memory.

However, this doesn't affect the code in any way.

PierrickGT commented 3 years ago

PR: https://github.com/pooltogether/pooltogether-mstable/pull/7