Commit Graph

205 Commits

Author SHA1 Message Date
Ernesto Boado
7a0d201f00 Merge branch 'fix/58' into 'master'
Resolve "Optimize the reading of the list of reserves by replacing the array with a mapping"

Closes #58

See merge request aave-tech/protocol-v2!66
2020-10-08 12:24:04 +00:00
eboado
273070fada Added return uint256 validation to flashLoan() 2020-10-07 16:20:32 +02:00
The3D
24a4980496 Refactored reservesList to a mapping 2020-10-06 15:51:48 +02:00
The3D
e86cf9fe0a Fixes liquidation bonus mask, adds comment on reserved bits 2020-10-06 10:23:02 +02:00
The3D
5a67250743 fixed error code 2020-09-30 18:03:34 +02:00
The3D
b907b6b0b3 Initial fix 2020-09-30 17:40:47 +02:00
eboado
d56a7a2779 Misc changes on ReserveConfiguration:
- Fixed unprecise STABLE_BORROWING_MASK.
  - Added constant for start bit positions of the different configurations.
2020-09-30 11:24:22 +02:00
The3D
e328cf0482 Formatting, removed console import 2020-09-25 10:57:51 +02:00
The3D
687b13f019 Formatting, removed console import 2020-09-25 10:57:26 +02:00
The3D
fb0f533ae9 Changes usage of the ltv in calculateUserAccountData 2020-09-25 10:55:58 +02:00
The3D
6e7787d23c initial fix 2020-09-24 18:20:17 +02:00
David Racero
ffc81df4ee Fix conflicts and renamings 2020-09-24 17:48:29 +02:00
The3D
12f1dbd0dc Readded calculateAvailableBorrowsETH 2020-09-21 22:08:44 +02:00
The3D
2e30bb8b85 Fixed error on rebalance conditions, changed style of internal functions 2020-09-21 21:15:12 +02:00
The3D
332cdff67a Merge branch 'master' into fix/45 2020-09-21 20:38:15 +02:00
The3D
45e4e0b5fe Merge branch 'master' into fix/42 2020-09-21 20:27:14 +02:00
The3D
75579e5d28 Merge branch 'master' into fix/45 2020-09-21 20:19:28 +02:00
The3D
c346251df0 Added comments 2020-09-21 18:51:51 +02:00
The3D
c278832e5a Removed unused error code 2020-09-21 17:59:44 +02:00
The3D
c7f0dfbaa9 Merge branch 'master' into fix/34 2020-09-21 10:03:18 +02:00
The3D
7c5de62910 Merge branch 'master' into 40-refactor-the-storage-of-lp 2020-09-21 09:31:54 +02:00
The3D
bfe0657b1a Updated code to fix deposit and withdraw tests 2020-09-17 16:37:51 +02:00
The3D
e4890a14c2 Merge branch 'master' into fix/34 2020-09-17 11:55:38 +02:00
The3D
7986a4704b Fixed mintToTreasury function 2020-09-17 10:53:55 +02:00
The3D
5c2ec07b70 Fixes #42 2020-09-16 17:12:07 +02:00
The3D
274b63713d Merge branch 'master' into fix/34 2020-09-16 16:34:29 +02:00
andyk
9594571761 Merge branch 'master' into 41-rename-liqudiationmanager 2020-09-16 15:22:55 +01:00
andyk
373bac109b small comments fixes 2020-09-16 15:45:49 +03:00
andyk
2a6248c6d2 misc renaming 2020-09-16 15:09:42 +03:00
andyk
66113d64a2 rename LendingPoolLiquidationManager -> LendingPoolCollateralManager 2020-09-16 13:41:12 +03:00
andyk
214c51f365 disallow liquiditySwap with freezed reserve as to 2020-09-16 10:22:46 +03:00
David Racero
6cbcf39454 Fixed conflicts and merge changes 2020-09-15 17:24:50 +02:00
The3D
c6a3588792 Merge branch 'master' into fix/34 2020-09-15 15:33:09 +02:00
David Racero
aa834ee904 Added missing whenNotPaused to new functions. Changed IS_PAUSED error code to 58 to prevent error collision. Added new pausable tests. 2020-09-15 13:13:28 +02:00
David Racero
83bf3e5677 Trim PausablePool into LendingPool to save code size. 2020-09-15 11:56:08 +02:00
David Racero
6842978706 Merge and fix conflicts 2020-09-15 10:57:04 +02:00
eboado
59996e1ece - Refactor validation of swapLiquidity() to ValidationLogic.
- Added extra check on active reserves on swapLiquidity().
2020-09-15 10:28:39 +02:00
eboado
8d391b9ab5 Merge branch 'master' into 30-collateral-swap 2020-09-15 09:56:41 +02:00
The3D
f428f69ebd Merge branch 'master' into fix/34 2020-09-15 09:34:00 +02:00
eboado
fb15afda8e Merge branch 'master' into fix/35-isActive-liquidations 2020-09-14 21:31:22 +02:00
eboado
c4904bc41c Merge branch 'master' into 30-collateral-swap 2020-09-14 21:06:16 +02:00
David Racero
59bfdc39f2 Fix conflicts 2020-09-14 19:59:00 +02:00
The3D
d542f098c1 fixed deposit, withdraw tests 2020-09-14 19:25:45 +02:00
eboado
a87dae445f Merge branch 'master' into 33-add-native-credit-delegation 2020-09-14 17:24:55 +02:00
andyk
9d757aaa37 fix docustring 2020-09-14 17:57:59 +03:00
David Racero
64066a14ec Rename IS_ACTIVE to NOT_PAUSED error. 2020-09-14 16:09:57 +02:00
David Racero
5af23057fa Fix conflicts. 2020-09-14 15:53:34 +02:00
David Racero
6e0091a668 Added PausablePool contract to support errors by number. 2020-09-14 15:24:30 +02:00
The3D
bb4e1b5c4b Fixed errors 2020-09-14 15:09:16 +02:00
andyk
35bff4bea2 add comment for getDebtTokenAddress function 2020-09-14 15:50:46 +03:00
andyk
d135c25b39 add borrowRateMode check on credit delegation 2020-09-14 15:41:44 +03:00
The3D
6e92575ac2 add code to _mintToTreasury 2020-09-14 11:41:14 +02:00
The3D
13f77ec0d2 Fixed repay 2020-09-14 11:34:40 +02:00
The3D
d1ffac6380 Merge branch 'master' into fix/34 2020-09-14 11:33:34 +02:00
The3D
a64edb3011 Removed interest redirection leftovers 2020-09-14 11:13:53 +02:00
The3D
5061aab9cc Added the total supply on stable debt token 2020-09-14 11:09:47 +02:00
eboado
e2500d1532 - Refactored validation logic of liquidationCall() and repayWithCollateral() to ValidationLogic. 2020-09-14 10:52:31 +02:00
David Racero
1fbe84df49 Remove unused parameter to allow compilation without optimization for coverage. 2020-09-14 10:46:57 +02:00
The3D
3c8018fab9 Cleaned up code, converted addressesProvider to immutable in LendingPool 2020-09-14 10:43:30 +02:00
The3D
fc2852e94e Rename updateIndexesAndTimestamp to updateState 2020-09-14 09:53:21 +02:00
The3D
dbf1a0b9e7 Merge branch 'master' into fix/34 2020-09-14 09:22:39 +02:00
The3D
f3856bac12 Refactored variable names, reordered the ReserveData struct 2020-09-13 11:58:45 +02:00
eboado
0911f907a8 Fixes #35 2020-09-13 10:08:14 +02:00
The3D
0d9a18813f Added optimization on mint and burn 2020-09-12 13:18:17 +02:00
The3D
7383fc9786 Merge branch 'master' into fix/29 2020-09-11 16:47:47 +02:00
eboado
f355ae219f Merge branch 'master' into 33-add-native-credit-delegation 2020-09-11 11:25:42 +02:00
The3D
73d7ca001c added configurator tests 2020-09-10 13:52:07 +02:00
The3D
4a1e1156f4 Merge local branch 2020-09-10 12:51:52 +02:00
David Racero
53112c0982 Merge changes 2020-09-09 21:26:52 +02:00
eboado
4b3abac526 Merge branch 'master' into feat/26-repay-collateral 2020-09-09 21:12:36 +02:00
andyk
3173bee782 initial implementation of the credit delegation + basic tests 2020-09-09 15:33:05 +03:00
The3D
e3c422468d Updated comment 2020-09-08 13:48:33 +02:00
The3D
a7b6beef48 Initial refactor commit 2020-09-07 17:55:47 +02:00
eboado
819cc65abd Merge branch 'master' into feat/27-new-erc20 2020-09-04 17:10:32 +02:00
eboado
da734aa68a - Refactored ERC20 and adapted derived contracts. 2020-09-04 16:27:35 +02:00
The3D
58488158cd Refactored error messages 2020-09-04 12:48:29 +02:00
The3D
9aad57978d Merged master 2020-09-04 10:27:32 +02:00
eboado
2cbb1f5714 - Implemented repayWithCollateral() on LendingPoolLiquidationManager. 2020-09-03 15:46:45 +02:00
pol
07007fa933 Fixed sintax errors 2020-09-03 11:17:49 +02:00
pol
714c2ff3fd Refactored as per the PR comments 2020-09-03 10:33:15 +02:00
pol
288d8f2889 Added LendingPoolLiquidationManager error messages to error lib, and updated tests. 2020-09-02 18:53:39 +02:00
pol
76b4fc6b2d All tests working. WIP look at old error messages to remove them all 2020-09-02 17:54:34 +02:00
pol
6122826ef4 fixed getting error codes from error lib 2020-09-02 16:34:15 +02:00
pol
7b4812c956 Moved error messages to error lib 2020-09-02 15:48:38 +02:00
pol
dbcd78a098 Updated require message errors with constant string numbers to reduce gas 2020-08-25 17:27:37 +02:00
David Racero
cf70929eee Merge and fix conflicts 2020-08-25 14:15:35 +02:00
andyk
b0ddb815b8 small lending pool gas optimization 2020-08-25 13:37:38 +03:00
The3D
03ec940109 Changed the indexes and rates type to uint128 2020-08-23 11:13:43 +02:00
The3D
4d054dd56d Optimized MathUtils, ReserveLogic 2020-08-22 13:01:41 +02:00
The3D
06fbe2d2a4 Removed SafeMath from WadRayMath, PercentageMath 2020-08-22 12:04:34 +02:00
The3D
796dc8ee3f Updated repay function 2020-08-21 19:10:48 +02:00
The3D
1864c7abf4 Updated libraries, renamed internal methods 2020-08-21 18:18:12 +02:00
David Racero
f9fddfba59 Fix conflicts 2020-08-21 17:19:25 +02:00
The3D
78cf1d5bfd Merge branch 'master' into fix/22 2020-08-21 16:00:51 +02:00
The3D
8fe40b4639 Initial update of ReserveLogic 2020-08-21 15:13:08 +02:00
The3D
86541b3fe5 Fixed GenericLogic 2020-08-21 14:58:30 +02:00
The3D
e948101f87 Fixed Helpers 2020-08-21 14:54:07 +02:00
The3D
b13e08cfde Fixed UserConfiguration 2020-08-21 14:52:10 +02:00
The3D
e39cf64183 Updated ReserveConfiguration 2020-08-21 14:50:28 +02:00
andyk
39984383c6 remove payable, add IAToken and ILendingPool 2020-08-20 15:32:20 +03:00