diff --git a/contracts/ResilientOracle.sol b/contracts/ResilientOracle.sol index 467a3493..c93c7897 100755 --- a/contracts/ResilientOracle.sol +++ b/contracts/ResilientOracle.sol @@ -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 @@ -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. */ @@ -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 diff --git a/contracts/oracles/ChainlinkOracle.sol b/contracts/oracles/ChainlinkOracle.sol index 1da26c43..63ed82a2 100755 --- a/contracts/oracles/ChainlinkOracle.sol +++ b/contracts/oracles/ChainlinkOracle.sol @@ -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)"); @@ -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