-
Notifications
You must be signed in to change notification settings - Fork 1
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
wstETH-wETH-vault-oracle #31
base: main
Are you sure you want to change the base?
Conversation
@@ -39,7 +39,7 @@ contract BaseOracle is AggregatorV3Interface { | |||
|
|||
bool public isCheckPriceDeviation; | |||
|
|||
uint256 constant internal DECIMAL_DIFFERENCE = 1e6; | |||
uint256 constant internal DECIMAL_DIFFERENCE = 1e10; |
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.
can you pls explain this change?
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 in 2006f09
|
||
/// @notice Triggers the Vault's reentrancy guard | ||
/// @dev This staticcall always reverts, but we need to make sure it doesn't fail due to a re-entrancy attack (abi.encoded BAL#400). | ||
modifier reentrancyCheck() { |
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.
can you also explain this please
@johnnyonline take a look at Balancer docs |
/********************************** Internal Functions **********************************/ | ||
|
||
function _getPrice() internal view override returns (int256) { | ||
function _getPrice() internal reentrancyCheck returns (int256) { | ||
uint256 rate = BPT.getRate(); | ||
if (rate < 1*1e18 || rate >= 1.1*1e18) revert virtualPriceOutOfBounds(); |
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.
perhaps the bounds should not be hardcoded, and give owner ability to change them?
https://docs.balancer.fi/concepts/advanced/valuing-bpt/valuing-bpt.html#informational-price-evaluation