Issue | Instances | |
---|---|---|
GAS-1 | Using bools for storage incurs overhead | 5 |
GAS-2 | Cache array length outside of loop | 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test/unit/borrower-pools.borrow.test.ts b/test/unit/borrower-pools.borrow.test.ts | |
index 4cf63ed..1dbeaf2 100644 | |
--- a/test/unit/borrower-pools.borrow.test.ts | |
+++ b/test/unit/borrower-pools.borrow.test.ts | |
@@ -58,7 +58,7 @@ describe('Borrower Pools - Borrow', function () { | |
poolParameters = await BorrowerPools.getPoolParameters(poolHash); | |
minRate = poolParameters.minRate; | |
rateSpacing = poolParameters.rateSpacing; | |
- depositRate = minRate.add(rateSpacing); //Tokens deposited at the min_rate + rate_spacing | |
+ depositRate = minRate; //Tokens deposited at the min_rate + rate_spacing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test/unit/borrower-pools.borrow.test.ts b/test/unit/borrower-pools.borrow.test.ts | |
index 4cf63ed..1dbeaf2 100644 | |
--- a/test/unit/borrower-pools.borrow.test.ts | |
+++ b/test/unit/borrower-pools.borrow.test.ts | |
@@ -58,7 +58,7 @@ describe('Borrower Pools - Borrow', function () { | |
poolParameters = await BorrowerPools.getPoolParameters(poolHash); | |
minRate = poolParameters.minRate; | |
rateSpacing = poolParameters.rateSpacing; | |
- depositRate = minRate.add(rateSpacing); //Tokens deposited at the min_rate + rate_spacing | |
+ depositRate = minRate; //Tokens deposited at the min_rate + rate_spacing |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test/unit/borrower-pools.borrow.test.ts b/test/unit/borrower-pools.borrow.test.ts | |
index 4cf63ed..1dbeaf2 100644 | |
--- a/test/unit/borrower-pools.borrow.test.ts | |
+++ b/test/unit/borrower-pools.borrow.test.ts | |
@@ -58,7 +58,7 @@ describe('Borrower Pools - Borrow', function () { | |
poolParameters = await BorrowerPools.getPoolParameters(poolHash); | |
minRate = poolParameters.minRate; | |
rateSpacing = poolParameters.rateSpacing; | |
- depositRate = minRate.add(rateSpacing); //Tokens deposited at the min_rate + rate_spacing | |
+ depositRate = minRate; //Tokens deposited at the min_rate + rate_spacing |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/BorrowerPools.sol b/src/BorrowerPools.sol | |
index 7745215..c21b1b9 100644 | |
--- a/src/BorrowerPools.sol | |
+++ b/src/BorrowerPools.sol | |
@@ -15,6 +15,8 @@ import "./lib/Uint128WadRayMath.sol"; | |
import "./PoolsController.sol"; | |
+import "hardhat/console.sol"; | |
+ |
- Variables name, symbol, decimals is assigned in constructor function
- No need to assign when declaring in code.
2. BasicERC20 - Initializing with decimals not equal 18 can make contract work incorrectly - Line 23
- INITIAL_SUPPLY is assigned 10 ** (50 + 18) in code, means that decimals should be 18 and number of tokens is 10 ** 50