Skip to content

Commit

Permalink
Merge pull request #270 from shenpengfeng/master
Browse files Browse the repository at this point in the history
chore: fix some comments
  • Loading branch information
kasperpawlowski authored Oct 16, 2024
2 parents d473c0b + 854a0dd commit 83481a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/whitepaper.md
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ These methods do not expose any pricing-level configuration. Instead, for custom

Price fractions are never directly returned by the interface. Instead, the oracle acts as though it is quoting swap amounts. This avoids certain catastrophic losses of precisions, especially with low-decimal tokens (see [an example with SHIB/USDC](https://github.com/euler-xyz/euler-price-oracle/blob/master/docs/whitepaper.md#precision-loss-example)).

Price oracles may legitimately return `0` to indicate that a requested quote amount is worthless, either because the price is very low or the quote amount was very small, or both. Legitimate pricing errors are signalled by a the oracle reverting. This in turn causes the vault to revert, which is dangerous since it can break functionality of the vault (most importantly, liquidation). Because of this, only reliable pricing oracles should be used.
Price oracles may legitimately return `0` to indicate that a requested quote amount is worthless, either because the price is very low or the quote amount was very small, or both. Legitimate pricing errors are signalled by the oracle reverting. This in turn causes the vault to revert, which is dangerous since it can break functionality of the vault (most importantly, liquidation). Because of this, only reliable pricing oracles should be used.

The `getQuote` function returns how many `quote` tokens an `inAmount` of `base` tokens would purchase at the current marginal (no price impact) price. The `getQuotes` method (plural) may return both the bid and ask `quote` amounts for the specified quantity of `base`. Although simple oracles will return the same amounts for both bid and ask, more advanced vaults may use this to expose current market spreads. Alternatively, confidence intervals can be expressed, potentially by querying multiple oracles, sorting them, and returning the lowest amount as the bid and the highest as the ask.

Expand Down
2 changes: 1 addition & 1 deletion src/EVault/modules/Governance.sol
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ abstract contract GovernanceModule is IGovernance, BalanceUtils, BorrowUtils, LT
ConfigAmount newBorrowLTV = borrowLTV.toConfigAmount();
ConfigAmount newLiquidationLTV = liquidationLTV.toConfigAmount();

// The borrow LTV must be lower than or equal to the the converged liquidation LTV
// The borrow LTV must be lower than or equal to the converged liquidation LTV
if (newBorrowLTV > newLiquidationLTV) revert E_LTVBorrow();

LTVConfig memory currentLTV = vaultStorage.ltvLookup[collateral];
Expand Down

0 comments on commit 83481a4

Please sign in to comment.