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

fix typo #125

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions contracts/ResilientOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ import "@venusprotocol/governance-contracts/contracts/Governance/AccessControlle
* @title ResilientOracle
* @author Venus
* @notice The Resilient Oracle is the main contract that the protocol uses to fetch prices of assets.
*
*
* DeFi protocols are vulnerable to price oracle failures including oracle manipulation and incorrectly
* reported prices. If only one oracle is used, this creates a single point of failure and opens a vector
* for attacking the protocol.
*
*
* The Resilient Oracle uses multiple sources and fallback mechanisms to provide accurate prices and protect
* the protocol from oracle attacks. Currently it includes integrations with Chainlink, Pyth, Binance Oracle
* and TWAP (Time-Weighted Average Price) oracles. TWAP uses PancakeSwap as the on-chain price source.
*
* For every market (vToken) we configure the main, pivot and fallback oracles. The oracles are configured per
* vToken's underlying asset address. The main oracle oracle is the most trustworthy price source, the pivot
* oracle is used as a loose sanity checker and the fallback oracle is used as a backup price source.
*
*
* For every market (vToken) we configure the main, pivot and fallback oracles. The oracles are configured per
* vToken's underlying asset address. The main oracle oracle is the most trustworthy price source, the pivot
* oracle is used as a loose sanity checker and the fallback oracle is used as a backup price source.
*
* To validate prices returned from two oracles, we use an upper and lower bound ratio that is set for every
* market. The upper bound ratio represents the deviation between reported price (the price that’s being
* validated) and the anchor price (the price we are validating against) above which the reported price will
Expand All @@ -38,8 +38,8 @@ isValid = anchorRatio <= upperBoundAnchorRatio && anchorRatio >= lowerBoundAncho

* In most cases, Chainlink is used as the main oracle, TWAP or Pyth oracles are used as the pivot oracle depending
* on which supports the given market and Binance oracle is used as the fallback oracle. For some markets we may
* use Pyth or TWAP as the main oracle if the token price is not supported by Chainlink or Binance oracles.
*
* use Pyth or TWAP as the main oracle if the token price is not supported by Chainlink or Binance oracles.
*
* For a fetched price to be valid it must be positive and not stagnant. If the price is invalid then we consider the
* oracle to be stagnant and treat it like it's disabled.
*/
Expand Down Expand Up @@ -409,7 +409,7 @@ contract ResilientOracle is PausableUpgradeable, AccessControlledV8, ResilientOr
* @param asset asset address
* @return price USD price in 18 decimals
* @return pivotValidated Boolean representing if the validation of fallback oracle price
* and pivot oracle price were successfull
* and pivot oracle price were successfully
* @custom:error Invalid price error is thrown if fallback oracle fails to fetch price of the asset
* @custom:error Invalid price error is thrown if fallback oracle is not enabled or fallback oracle
* address is null
Expand Down
4 changes: 2 additions & 2 deletions contracts/oracles/ChainlinkOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ contract ChainlinkOracle is AccessControlledV8, OracleInterface {
* @param asset Asset address
* @param price Asset price in 18 decimals
* @custom:access Only Governance
* @custom:event Emits PricePosted event on succesfully setup of asset price
* @custom:event Emits PricePosted event on successfully setup of asset price
*/
function setDirectPrice(address asset, uint256 price) external notNullAddress(asset) {
_checkAccessAllowed("setDirectPrice(address,uint256)");
Expand Down Expand Up @@ -96,7 +96,7 @@ contract ChainlinkOracle is AccessControlledV8, OracleInterface {
* @custom:error NotNullAddress error is thrown if asset address is null
* @custom:error NotNullAddress error is thrown if token feed address is null
* @custom:error Range error is thrown if maxStale period of token is not greater than zero
* @custom:event Emits TokenConfigAdded event on succesfully setting of the token config
* @custom:event Emits TokenConfigAdded event on successfully setting of the token config
*/
function setTokenConfig(
TokenConfig memory tokenConfig
Expand Down
Loading