-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AaveV3LeverageStrategyExtension audit feedback #142
Merged
snake-poison
merged 29 commits into
master
from
aave-v3-leverage-strategy-extension-audit-feedback
Aug 14, 2023
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
f3a2d4b
Test showing that settting Emode does not affect getReserveConfigurat…
ckoopmann 77244d3
Start adjusting StrategyExtension test to switcht to wsteth/eth pair
ckoopmann 51c978f
Fixing tests
ckoopmann c29adfd
Fix test
ckoopmann bebb8bb
First test case for rebalancing in e-mode
ckoopmann 5526d84
Fix handling of emode ltv / liquidationThreshold
ckoopmann aa7afc5
Add test case for wrong repay threshold
ckoopmann dba1428
Fix tests
ckoopmann 718dd42
Remove subtraction of unutilizedLeveragePercentage when delevering
ckoopmann f2eacaa
Add test for targetLeverageRatio verification
ckoopmann eeb34fb
Add verification step for targetLeverageRatio >= 1
ckoopmann 9d04e7b
Switch div / mul order in _calculateMinRepayUnits
ckoopmann 0e291b4
Switch div / mul order in calculateChunkRebalanceNotional
ckoopmann 7ab6d28
Switch to latestRoundData on chainlink call
ckoopmann 0e10200
Add check for maximum oracle price age
ckoopmann 7e3f87a
Add tests for outdated price response from oracle
ckoopmann 332caf2
Fix tests
ckoopmann edbe0b0
Add method to override noRebalanceInProgress modifier
ckoopmann d9a653f
Fix tests
ckoopmann bed0e34
Use AaveOracle instead of configured chainlink oracles
ckoopmann 87f4723
Merge branch 'master' into aave-v3-leverage-strategy-extension-audit-…
pblivin0x 5d1cc59
Get AaveOracle address from AddressProvider instead of deploy argument
ckoopmann 140f09b
Merge branch 'aave-v3-leverage-strategy-extension-audit-feedback' of …
ckoopmann 0a69def
Change to get aaveOracle address on the fly from addressProvider
ckoopmann 3b5c204
Clean up and additional code comments
ckoopmann 998fd21
fix(dependencies): Add post audit Aave V3 dependencies (#145)
pblivin0x 8ef6b7b
Updates to test (#146)
snake-poison 125323c
remove .only from test
snake-poison 0bc8b24
test: fix issues with updating block.
snake-poison File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,67 @@ | ||
// SPDX-License-Identifier: agpl-3.0 | ||
pragma solidity 0.6.10; | ||
|
||
|
||
interface IAToken { | ||
/** | ||
* @dev Returns the address of the underlying asset of this aToken (E.g. WETH for aWETH) | ||
**/ | ||
function UNDERLYING_ASSET_ADDRESS() external view returns (address); | ||
event Approval(address indexed owner, address indexed spender, uint256 value); | ||
event BalanceTransfer(address indexed from, address indexed to, uint256 value, uint256 index); | ||
event Burn(address indexed from, address indexed target, uint256 value, uint256 balanceIncrease, uint256 index); | ||
event Initialized( | ||
address indexed underlyingAsset, | ||
address indexed pool, | ||
address treasury, | ||
address incentivesController, | ||
uint8 aTokenDecimals, | ||
string aTokenName, | ||
string aTokenSymbol, | ||
bytes params | ||
); | ||
event Mint( | ||
address indexed caller, address indexed onBehalfOf, uint256 value, uint256 balanceIncrease, uint256 index | ||
); | ||
event Transfer(address indexed from, address indexed to, uint256 value); | ||
|
||
function ATOKEN_REVISION() external view returns (uint256); | ||
function DOMAIN_SEPARATOR() external view returns (bytes32); | ||
function EIP712_REVISION() external view returns (bytes memory); | ||
function PERMIT_TYPEHASH() external view returns (bytes32); | ||
function POOL() external view returns (address); | ||
function RESERVE_TREASURY_ADDRESS() external view returns (address); | ||
function UNDERLYING_ASSET_ADDRESS() external view returns (address); | ||
function allowance(address owner, address spender) external view returns (uint256); | ||
function approve(address spender, uint256 amount) external returns (bool); | ||
function balanceOf(address user) external view returns (uint256); | ||
function burn(address from, address receiverOfUnderlying, uint256 amount, uint256 index) external; | ||
function decimals() external view returns (uint8); | ||
function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool); | ||
function getIncentivesController() external view returns (address); | ||
function getPreviousIndex(address user) external view returns (uint256); | ||
function getScaledUserBalanceAndSupply(address user) external view returns (uint256, uint256); | ||
function handleRepayment(address user, address onBehalfOf, uint256 amount) external; | ||
function increaseAllowance(address spender, uint256 addedValue) external returns (bool); | ||
function initialize( | ||
address initializingPool, | ||
address treasury, | ||
address underlyingAsset, | ||
address incentivesController, | ||
uint8 aTokenDecimals, | ||
string memory aTokenName, | ||
string memory aTokenSymbol, | ||
bytes memory params | ||
) external; | ||
function mint(address caller, address onBehalfOf, uint256 amount, uint256 index) external returns (bool); | ||
function mintToTreasury(uint256 amount, uint256 index) external; | ||
function name() external view returns (string memory); | ||
function nonces(address owner) external view returns (uint256); | ||
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) | ||
external; | ||
function rescueTokens(address token, address to, uint256 amount) external; | ||
function scaledBalanceOf(address user) external view returns (uint256); | ||
function scaledTotalSupply() external view returns (uint256); | ||
function setIncentivesController(address controller) external; | ||
function symbol() external view returns (string memory); | ||
function totalSupply() external view returns (uint256); | ||
function transfer(address recipient, uint256 amount) external returns (bool); | ||
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); | ||
function transferOnLiquidation(address from, address to, uint256 value) external; | ||
function transferUnderlyingTo(address target, uint256 amount) external; | ||
} | ||
|
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting nits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed with a bunch of other formatting / documentation related changes in this Commit:
3b5c204