Commit Graph

663 Commits

Author SHA1 Message Date
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
eboado
e4485f12fe - Refactored logic of repay() to an internal _executeRepay().
-  Initial implementation of flashCollateral() for flash liquidations, repayment with collateral and movement of position.
2020-08-26 16:02:22 +02:00
pol
dbcd78a098 Updated require message errors with constant string numbers to reduce gas 2020-08-25 17:27:37 +02:00
pol
5841e51439 Updated require message errors with constant string numbers to reduce gas 2020-08-25 15:57:54 +02:00
pol
0f5017cc81 Updated require message errors with constant string numbers to reduce gas 2020-08-25 15:51:52 +02:00
pol
abe967c707 Updated require message errors with constant string numbers to reduce gas 2020-08-25 15:32:22 +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
Ernesto Boado
eba3b5260f Merge branch 'fix/interest-strategy-styliguide' into 'master'
Refactoring of DefaultReserveInterestRateStrategy to follow the stuileguide

See merge request aave-tech/protocol-v2!32
2020-08-25 09:11:58 +00:00
andyk
4b00cde616 fixes in lendingpool folder to follow our styleguide 2020-08-25 11:53:58 +03:00
andyk
da5b6738c1 refactoring of DefaultReserveInterestRateStrategy to follow the stuileguide 2020-08-24 15:35:59 +03:00
The3D
03ec940109 Changed the indexes and rates type to uint128 2020-08-23 11:13:43 +02:00
The3D
5b7a2f2a55 Optimized debt tokens 2020-08-22 19:33:55 +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
9a4ccde6a2 Removed obsolete code 2020-08-21 19:00:08 +02:00
The3D
955d2be1da Merge branch 'master' into fix/22 2020-08-21 18:48:16 +02:00
The3D
bd0377198c Merge branch 'master' into fix/interfaces-guideline 2020-08-21 18:36:03 +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
andyk
13f4d34867 refactoring flashloan folder to fit current guideline, move events to interfaces 2020-08-21 17:03:01 +03:00
The3D
78cf1d5bfd Merge branch 'master' into fix/22 2020-08-21 16:00:51 +02:00
andyk
2d0325a3d2 refactoring interfaces and config folders to fit current guideline 2020-08-21 16:38:47 +03:00
Andrey Ko
c340b9972f Merge branch 'master' into 'fix/21'
# Conflicts:
#   contracts/lendingpool/LendingPool.sol
2020-08-21 13:20:41 +00:00
The3D
b7fa1bcac8 Merge branch 'master' into fix/22 2020-08-21 15:14:43 +02:00
The3D
8fe40b4639 Initial update of ReserveLogic 2020-08-21 15:13:08 +02:00
The-3D
dfa64d63f3 Merge branch 'fix/misc-guideline' into 'master'
Refactoring misc folder to fit current guideline

See merge request aave-tech/protocol-v2!26
2020-08-21 13:03:47 +00: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
The3D
1dd2a638ca Updated LiquidationManager 2020-08-21 14:14:13 +02:00
The3D
38bff60298 Updated comments 2020-08-21 14:05:14 +02:00
The3D
b4b9ff604a Cleaned up configurator, LendingPooL 2020-08-21 14:03:17 +02:00
andyk
b5f630f78f refactoring misc folder to fit current guideline 2020-08-21 15:00:10 +03:00
The3D
05fac16063 Cleanup LendingPool 2020-08-21 13:15:29 +02:00
andyk
4ecc53abee fix typo in StableDebtToken balanceOf method 2020-08-21 13:40:56 +03:00
andyk
94d8f38597 refactoring tokenization folder to fit current guideline, small gas optimizations 2020-08-21 13:38:08 +03:00
The3D
b93937f4fd Fixed DefaultReserveInterestRateStrategy 2020-08-21 11:21:50 +02:00
andyk
cdaa313f65 change public to external on debt tokens -2 2020-08-21 10:24:59 +03:00
The3D
2d769f4480 Fixes #19 2020-08-20 17:09:23 +02:00
andyk
ec0498bd3b Merge branch 'master' into feat/debt-token-fixes 2020-08-20 17:26:49 +03:00
andyk
735a00b5f3 fix minor debt token issues 2020-08-20 17:26:06 +03:00
The3D
8bdbd0a7ce Merge branch 'master' of gitlab.com:aave-tech/protocol-v2 2020-08-20 16:18:08 +02:00
The3D
fa32406b48 Removed redundant virtual in IVariableDebtToken 2020-08-20 16:04:03 +02:00
andyk
57fb45e380 remove named return in calculateAvailableCollateralToLiquidate 2020-08-20 16:31:52 +03:00
The-3D
7c3d5e0239 Merge branch 'feat/remove-payable' into 'master'
Remove payable

See merge request aave-tech/protocol-v2!20
2020-08-20 13:29:31 +00:00
andyk
26115b4601 RepayLocalVars removal 2020-08-20 16:12:19 +03:00
andyk
a6e78856a0 remove using WadRayMath and SafeMath duplication 2020-08-20 16:01:54 +03:00
andyk
3a24d4e434 remove unused Address lib imports 2020-08-20 15:35:51 +03:00
andyk
39984383c6 remove payable, add IAToken and ILendingPool 2020-08-20 15:32:20 +03:00
andyk
ae8878a50e fix more imports 2020-08-20 13:44:51 +03:00
The3D
028d859a54 Merge branch 'master' into feat/token-distributor-removal 2020-08-20 11:32:26 +02:00
The3D
a437512ae9 Removed origination fee event, variables 2020-08-20 09:56:43 +02:00
The3D
76fcb20b44 Code cleanup 2020-08-20 09:51:21 +02:00
andyk
1a2bfcbf45 remove FeeProvider setters and getters 2020-08-19 19:06:32 +03:00
andyk
2579bbcfec removal of TOKEN_DISTRIBUTOR constant 2020-08-19 18:58:53 +03:00
andyk
d60f7b6272 removal of TokenDistributor, FeeProvider and FlashLoanVars 2020-08-19 18:56:51 +03:00
The3D
926d25dba8 Cleaned up validation logic 2020-08-19 16:57:49 +02:00
The3D
a419ca9014 Further cleaned up reserveLogic 2020-08-19 16:39:04 +02:00
The3D
b68bb992fb Cleaned up reserveLogic 2020-08-19 16:36:58 +02:00
andyk
6a4caff6e4 AddressesSorage and UintStorage removal, guidlene fixes in AddressesProvider 2020-08-19 15:53:00 +03:00
The3D
90b2625bc0 Refactored tests, burn and mint function 2020-08-19 12:56:39 +02:00
The3D
576fd4ec55 Initial refactor 2020-08-18 21:19:11 +02:00
The3D
dd008ae226 Refactored code 2020-08-18 18:48:23 +02:00
emilio
3247fb8784 Added mock debt tokens for test 2020-08-18 11:39:34 +02:00
emilio
4a4073f1a9 Added function to update stable/variable debt tokens 2020-08-18 02:16:46 +02:00
emilio
674b885b31 Updated initReserve() with proxies 2020-08-17 21:28:50 +02:00
emilio
1d02b7f5e3 Initial commit 2020-08-12 19:36:58 +02:00
emilio
b5264a7c66 Removed rayPow 2020-08-11 12:32:34 +02:00
emilio
afc9612ac4 Updated optimization in aToken and debt tokens 2020-08-11 12:26:15 +02:00
emilio
9b0b190019 Fixed compounded interest approximation 2020-08-11 10:11:35 +02:00
emilio
413b648b41 implementation 2020-08-11 09:36:46 +02:00
emilio
7bb6f2fef2 Space 2020-08-11 09:23:57 +02:00
emilio
b3bf8d66a2 Updated initReserve() parameter 2020-08-11 09:20:47 +02:00
The3D
b387bcf845 Added upgradeability tests 2020-08-10 20:20:08 +02:00
The3D
734d125cd7 added function to update the aToken instance 2020-08-10 15:29:18 +02:00
emilio
fb5377a63e Gas optimization in getNormalizedIncome/getNormalizedDebt 2020-08-10 00:11:06 +02:00
emilio
49bca9febb Optimized aToken - turned pool and underlying asset address into immutables 2020-08-08 19:21:23 +02:00
emilio
50bb9d39b0 Merge branch 'master' into feat/10 2020-08-07 19:32:34 +02:00
emilio
cf3f68653f Updated setup script 2020-08-07 19:29:13 +02:00
emilio
a0bf692373 Initial commit 2020-08-07 18:23:52 +02:00
emilio
1015a7ca13 Fixes comments 2020-08-06 19:49:41 +02:00
emilio
5c4df95b87 Added comments to UserConfiguration 2020-08-06 09:57:12 +02:00
emilio
f9115b7030 refactored UserLogic 2020-08-06 09:52:15 +02:00
emilio
8df5182c59 Fixed bugs in user configuration 2020-08-06 00:46:22 +02:00
emilio
1eb2d11a3d initial commit 2020-08-05 12:40:24 +02:00
emilio
d8424d43a5 Added comments 2020-08-03 09:08:07 +02:00
emilio
c86884ef28 Fixes tests on liquidation 2020-08-02 18:36:04 +02:00
The3D
692cc87f62 Updated PercentageMath to support two decimals of precision 2020-07-27 16:14:21 +02:00
The3D
11e06e2e92 Refactored code to use PercentageMath, fixed PercentageMath bug 2020-07-27 13:47:48 +02:00
The3D
4baf17d9e6 added percentMath 2020-07-27 12:32:54 +02:00
The3D
729abc0769 Fixed the configurator comment 2020-07-27 10:03:53 +02:00
The3D
8a79d71230 Updated validateRepay, fixed natspec comment 2020-07-27 09:59:04 +02:00
The3D
1a29def14d Added natspec comments to ReserveConfiguration 2020-07-27 09:49:45 +02:00
The3D
8d1d06bbdd Removed change on calculateUserAccountData 2020-07-24 14:57:52 +02:00
The3D
fa60f03d8d Updated parameters mapping 2020-07-23 17:18:06 +02:00
The3D
77faf4774b Fixed configuration library 2020-07-21 10:20:51 +02:00
The3D
8e6ea20a79 Added configuration library 2020-07-21 09:53:38 +02:00
The3D
d6cc251f29 Fixes IR 2020-07-17 17:12:25 +02:00
The3D
60b30fe91e Removed unused function 2020-07-15 16:51:48 +02:00
The3D
2add014fe5 Fixes issue on LiquidationManager 2020-07-15 16:44:20 +02:00
The-3D
7b66a05c5d Merge branch 'feat/funds-allocation' into 'master'
Feat/funds allocation

Closes #6

See merge request aave-tech/protocol-v2!4
2020-07-15 12:11:18 +00:00
emilio
511096382f Merge branch 'master' into fix/12 2020-07-14 16:15:11 +02:00
The3D
8c8954ea8e Fixes aToken issue on interest accumulation 2020-07-14 14:53:07 +02:00
The3D
64f6e7a276 Revert "Fixes the interest redirection bug on the aToken"
This reverts commit ab3198128a.
2020-07-14 14:50:31 +02:00
The3D
ab3198128a Fixes the interest redirection bug on the aToken 2020-07-14 14:48:42 +02:00
The3D
92f2f2a9b3 Fixes aToken bug 2020-07-14 14:43:43 +02:00
The3D
56fa10bd8f Fixes tests on flashloans 2020-07-13 15:19:47 +02:00
The3D
048a2de7de Merge branch 'master' into feat/funds-allocation 2020-07-13 12:24:36 +02:00
andyk
89ad335912 pretty print 2020-07-13 11:54:08 +03:00
The3D
edd7ad3b15 Added transfer of the funds to aTokens 2020-07-10 19:16:04 +02:00
The3D
7018a85774 Merge branch 'master' into feat/debt 2020-07-10 11:20:15 +02:00
The3D
e5f0206f87 Added atoken approval to LendingPool 2020-07-10 10:57:30 +02:00
emilio
af04ce86f3 Fixed revert message in LendingPool 2020-07-09 17:05:16 +02:00
emilio
853f3118dc removed unused library, console.log 2020-07-09 17:02:16 +02:00
emilio
2b459fc578 Polished comments in UserLogic 2020-07-09 16:55:09 +02:00
emilio
a84f26670c polished variable rate debt token comments 2020-07-09 16:52:57 +02:00
emilio
e5bf908d1c polished stable rate debt token comments 2020-07-09 16:50:56 +02:00
emilio
529115dd98 added stable and variable debt tokens tests 2020-07-09 16:46:49 +02:00
emilio
a3326fc86d Updated LendingPool to add a method to retrieve debt tokens 2020-07-09 16:27:19 +02:00
emilio
77be1963d1 added comments, cleaned up variable debt token, base debt token 2020-07-09 11:59:49 +02:00
emilio
7813e8cec0 Added natspec comments to stable debt token, cleaned up stable debt token code 2020-07-09 11:23:30 +02:00
emilio
da6273a951 Removed ETHAddressLib from LiquidationManager 2020-07-09 00:33:33 +02:00
emilio
8f86b44076 Removed CoreLibrary 2020-07-09 00:16:05 +02:00
The3D
f1743a5eac Fixed liquidation tests 2020-07-08 17:26:50 +02:00
The3D
395e4aa3a7 Updated liquidation 2020-07-07 17:34:38 +02:00
The3D
6b2764f760 Renamed debt fetching function, updated liquidationManager 2020-07-07 17:14:44 +02:00
The3D
dd1982010c Fixed swap rate tests 2020-07-07 12:07:31 +02:00
The3D
0d182d6436 Fixed swapBorrowRateMode, rebalanceBorrowRate 2020-07-05 23:44:19 +02:00
The3D
34efb0c917 fixed redeem tests, removed console.log 2020-07-04 09:32:54 +02:00
The3D
30ab5ddec2 Merge branch 'feat/debt' of gitlab.com:aave-tech/protocol-v2 into feat/debt 2020-07-04 09:32:01 +02:00
The3D
e16eed2d03 Fixed borrow tests 2020-07-03 23:20:02 +02:00
andyk
7690b22e8e repo cleanup -1 2020-07-03 12:15:30 +03:00
The3D
a784e42b78 Initial commit 2020-06-30 14:09:28 +02:00
The3D
abc0d3edb6 Fixed tests 2020-06-27 04:13:32 +02:00
The3D
1980773a58 Updated test cases 2020-06-26 21:28:18 +02:00
The3D
c298579908 Fixed tests 2020-06-26 16:58:52 +02:00
The3D
51fee50e50 Fixed setup 2020-06-26 14:34:44 +02:00
The3D
02d943b235 Refactoring migration 2020-06-21 01:40:03 +02:00
eboado
2379fe7ae7 - Temporary removed nonReentrant from LendingPool, until this fix on ReentrancyGuard is released to prod https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2171. 2020-06-09 16:36:33 +02:00
eboado
18e19b4f84 - Added getAllReservesTokens for AaveProtocolTestHelpers. 2020-06-09 11:11:19 +02:00
eboado
0453a49f8f - Fixed issue on AaveProtocolTestHelpers.
- Migrated atoken-modifiers tests.
2020-06-08 21:06:26 +02:00
eboado
21e6697eda - Added AaveProtocolTestHelpers 2020-06-08 17:36:40 +02:00
eboado
82de55fdbf - Added mocha __setup script with snapshotting 2020-06-08 14:03:40 +02:00
andyk
951bc6ebf6 optimize 0 ETH 2020-06-05 11:23:48 +03:00
andyk
d099d3c20e fix isETH condition in repay 2020-06-05 10:35:29 +03:00
andyk
a281bdba97 update universalTransferFromSenderToThis with returnExcess 2020-06-04 10:57:08 +03:00
andyk
43b5c2c832 compilation errors fixes, removed: getReserveAvailableLiquidity, transferToUser, transferToFeeCollectionAddress, transferFlashLoanProtocolFeeInternal 2020-06-03 17:57:41 +03:00
andyk
199d386b3e removal of transferToReserve method 2020-06-03 15:51:17 +03:00
andyk
43ae2f36e7 update universalTransferFrom logic, and comments 2020-06-03 15:48:59 +03:00
andyk
a41816b32c fix typos in docstrings 2020-06-03 14:08:22 +03:00
andyk
e31d5b9bee add doc strings to UniversalERC20, delete remove values there, fixes from MR comments 2020-06-03 14:02:18 +03:00
andyk
268e749a6d remove SafeERC20 dependency 2020-06-02 18:16:27 +03:00
andyk
f3597f670f remove EthAddressLib 2020-06-02 17:16:22 +03:00
andyk
2dfcc970da fix some typo 2020-06-02 16:54:46 +03:00
andyk
fea677a607 migration to 1inch UniversalERC20 2020-06-02 16:49:24 +03:00
eboado
b889cb25b6 - Added contracts from v1 of the protocol. 2020-05-29 18:45:37 +02:00
eboado
0ca8e30fb2 Initial commit 2020-05-29 16:55:31 +02:00