Skip to content
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

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

wstETH-wETH-vault-oracle #31

wants to merge 20 commits into from

Conversation

ashablovskiy
Copy link
Contributor

@ashablovskiy ashablovskiy requested a review from johnnyonline July 9, 2023 06:56
@@ -39,7 +39,7 @@ contract BaseOracle is AggregatorV3Interface {

bool public isCheckPriceDeviation;

uint256 constant internal DECIMAL_DIFFERENCE = 1e6;
uint256 constant internal DECIMAL_DIFFERENCE = 1e10;
Copy link
Contributor

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?

Copy link
Contributor

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() {
Copy link
Contributor

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
Copy link
Contributor

@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();
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants