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

New release #230

Merged
merged 31 commits into from
Oct 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
30b3bfb
fix typo
mhxw Sep 8, 2023
8171715
chore: add config and deployments of oracles
Debugger022 Jul 5, 2024
9875747
fix: minor fix
Debugger022 Jul 5, 2024
2006972
feat: updating deployment files
Debugger022 Jul 5, 2024
cacc97b
Merge branch 'develop' into deploy/oracles-opsepolia
Debugger022 Aug 29, 2024
4d08d3c
refactor: update deployment config for opsepolia tokens chainlinkfeed
Debugger022 Sep 4, 2024
95ee040
refactor: update mock token addresses for the opsepolia
Debugger022 Sep 9, 2024
b1fbeab
feat: add LST ETH pool deployment on BNB chain
kkirka Sep 9, 2024
ab4f42e
feat: updating deployment files
kkirka Sep 10, 2024
0c5edf1
Merge pull request #224 from VenusProtocol/main
chechu Sep 10, 2024
67b3129
fix: xvs address and chainlink feeds
Debugger022 Sep 11, 2024
bc05014
Merge pull request #204 from VenusProtocol/deploy/oracles-opsepolia
Debugger022 Sep 12, 2024
f48e992
chore(release): 2.6.0-dev.1 [skip ci]
toolsvenus Sep 12, 2024
a157808
feat: deployment files for oracles on op mainnet
Debugger022 Sep 18, 2024
8c1c23b
feat: updating deployment files
Debugger022 Sep 18, 2024
c1a85c6
refactor: deploy SequencerChainlinkOracle instead of ChainlinkOracle …
Debugger022 Sep 18, 2024
54af379
feat: updating deployment files
Debugger022 Sep 18, 2024
e1c96ae
refactor: remove unnecessary scenarios
coreyar Sep 18, 2024
7bdc00a
Merge pull request #125 from mhxw/develop
chechu Sep 18, 2024
e5612b7
Merge pull request #226 from VenusProtocol/remove-unnecessary-scenarios
coreyar Sep 19, 2024
f8b90a6
chore: xvs address
Debugger022 Sep 18, 2024
8ffae43
Merge pull request #225 from VenusProtocol/feat/VEN-2812
chechu Sep 20, 2024
13b5a1e
fix: update type import
coreyar Sep 20, 2024
d90d805
ci: add build check
coreyar Sep 20, 2024
d5ab333
Merge pull request #227 from VenusProtocol/fix-build
coreyar Sep 20, 2024
9181e4d
chore(release): 2.6.0-dev.2 [skip ci]
toolsvenus Sep 20, 2024
9cbce41
Merge pull request #221 from VenusProtocol/feat/bnb-chain-lst-eth
kkirka Sep 24, 2024
060715f
chore(release): 2.6.0-dev.3 [skip ci]
toolsvenus Sep 24, 2024
f13d176
feat: use @venusprotocol/governance-contracts that includes the Optim…
chechu Oct 10, 2024
b1b1622
Merge pull request #229 from VenusProtocol/release/VEN-2720
chechu Oct 10, 2024
b182056
chore(release): 2.6.0-dev.4 [skip ci]
toolsvenus Oct 10, 2024
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
Next Next commit
fix typo
  • Loading branch information
mhxw committed Sep 8, 2023
commit 30b3bfb11f06da05ffdaf184a64c886c9617b130
20 changes: 10 additions & 10 deletions contracts/ResilientOracle.sol
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions contracts/oracles/ChainlinkOracle.sol
Original file line number Diff line number Diff line change
@@ -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
Loading