@venusprotocol/oracle 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorInterface.sol/AggregatorInterface.dbg.json +1 -1
- package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol/AggregatorV2V3Interface.dbg.json +1 -1
- package/artifacts/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol/AggregatorV3Interface.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/Context.sol/Context.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/math/SafeCast.sol/SafeCast.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/math/SafeMath.sol/SafeMath.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol/PausableUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol/AddressUpgradeable.dbg.json +1 -1
- package/artifacts/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.dbg.json +1 -1
- package/artifacts/build-info/1d7bedd9b14544f287811332b9a539d7.json +1 -0
- package/artifacts/build-info/{96c10bfc915caedc90a237abc802c96d.json → 57da5d39a9f98618d0dcf1f6d4ff6b0d.json} +1 -1
- package/artifacts/build-info/f6af69795174616b8b4a6373f9f1c538.json +1 -0
- package/artifacts/contracts/PriceOracle.sol/PriceOracle.dbg.json +1 -1
- package/artifacts/contracts/ResilientOracle.sol/ResilientOracle.dbg.json +1 -1
- package/artifacts/contracts/ResilientOracle.sol/ResilientOracle.json +2 -2
- package/artifacts/contracts/interfaces/FeedRegistryInterface.sol/FeedRegistryInterface.dbg.json +1 -1
- package/artifacts/contracts/interfaces/OracleInterface.sol/BoundValidatorInterface.dbg.json +1 -1
- package/artifacts/contracts/interfaces/OracleInterface.sol/OracleInterface.dbg.json +1 -1
- package/artifacts/contracts/interfaces/OracleInterface.sol/ResilientOracleInterface.dbg.json +1 -1
- package/artifacts/contracts/interfaces/OracleInterface.sol/TwapInterface.dbg.json +1 -1
- package/artifacts/contracts/interfaces/PythInterface.sol/AbstractPyth.dbg.json +1 -1
- package/artifacts/contracts/interfaces/PythInterface.sol/IPyth.dbg.json +1 -1
- package/artifacts/contracts/interfaces/PythInterface.sol/PythStructs.dbg.json +1 -1
- package/artifacts/contracts/interfaces/VBep20Interface.sol/VBep20Interface.dbg.json +1 -1
- package/artifacts/contracts/libraries/PancakeLibrary.sol/FixedPoint.dbg.json +1 -1
- package/artifacts/contracts/libraries/PancakeLibrary.sol/FixedPoint.json +2 -2
- package/artifacts/contracts/libraries/PancakeLibrary.sol/IPancakePair.dbg.json +1 -1
- package/artifacts/contracts/libraries/PancakeLibrary.sol/PancakeOracleLibrary.dbg.json +1 -1
- package/artifacts/contracts/libraries/PancakeLibrary.sol/PancakeOracleLibrary.json +2 -2
- package/artifacts/contracts/oracles/BinanceOracle.sol/BinanceOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/BinanceOracle.sol/BinanceOracle.json +2 -2
- package/artifacts/contracts/oracles/BoundValidator.sol/BoundValidator.dbg.json +1 -1
- package/artifacts/contracts/oracles/BoundValidator.sol/BoundValidator.json +3 -3
- package/artifacts/contracts/oracles/ChainlinkOracle.sol/ChainlinkOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/ChainlinkOracle.sol/ChainlinkOracle.json +2 -2
- package/artifacts/contracts/oracles/PythOracle.sol/PythOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/PythOracle.sol/PythOracle.json +2 -2
- package/artifacts/contracts/oracles/TwapOracle.sol/TwapOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/TwapOracle.sol/TwapOracle.json +2 -2
- package/artifacts/contracts/oracles/mocks/MockBinanceFeedRegistry.sol/MockBinanceFeedRegistry.dbg.json +1 -1
- package/artifacts/contracts/oracles/mocks/MockBinanceOracle.sol/MockBinanceOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/mocks/MockBinanceOracle.sol/MockBinanceOracle.json +2 -2
- package/artifacts/contracts/oracles/mocks/MockChainlinkOracle.sol/MockChainlinkOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/mocks/MockChainlinkOracle.sol/MockChainlinkOracle.json +2 -2
- package/artifacts/contracts/oracles/mocks/MockPythOracle.sol/MockPythOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/mocks/MockPythOracle.sol/MockPythOracle.json +2 -2
- package/artifacts/contracts/oracles/mocks/MockTwapOracle.sol/MockTwapOracle.dbg.json +1 -1
- package/artifacts/contracts/oracles/mocks/MockTwapOracle.sol/MockTwapOracle.json +2 -2
- package/artifacts/contracts/test/BEP20Harness.sol/BEP20Harness.dbg.json +1 -1
- package/artifacts/contracts/test/MockPyth.sol/MockPyth.dbg.json +1 -1
- package/artifacts/contracts/test/MockPyth.sol/MockPyth.json +2 -2
- package/artifacts/contracts/test/MockSimpleOracle.sol/MockBoundValidator.dbg.json +1 -1
- package/artifacts/contracts/test/MockSimpleOracle.sol/MockBoundValidator.json +2 -2
- package/artifacts/contracts/test/MockSimpleOracle.sol/MockSimpleOracle.dbg.json +1 -1
- package/artifacts/contracts/test/MockSimpleOracle.sol/MockSimpleOracle.json +2 -2
- package/artifacts/contracts/test/MockV3Aggregator.sol/MockV3Aggregator.dbg.json +1 -1
- package/artifacts/contracts/test/MockV3Aggregator.sol/MockV3Aggregator.json +2 -2
- package/artifacts/contracts/test/PancakePairHarness.sol/Math.dbg.json +1 -1
- package/artifacts/contracts/test/PancakePairHarness.sol/Math.json +2 -2
- package/artifacts/contracts/test/PancakePairHarness.sol/PancakePairHarness.dbg.json +1 -1
- package/artifacts/contracts/test/PancakePairHarness.sol/PancakePairHarness.json +2 -2
- package/artifacts/contracts/test/PancakePairHarness.sol/UQ112x112.dbg.json +1 -1
- package/artifacts/contracts/test/PancakePairHarness.sol/UQ112x112.json +2 -2
- package/artifacts/contracts/test/VBEP20Harness.sol/VBEP20Harness.dbg.json +1 -1
- package/contracts/PriceOracle.sol +2 -2
- package/contracts/ResilientOracle.sol +127 -114
- package/contracts/libraries/PancakeLibrary.sol +8 -8
- package/contracts/oracles/BinanceOracle.sol +4 -4
- package/contracts/oracles/BoundValidator.sol +31 -29
- package/contracts/oracles/ChainlinkOracle.sol +85 -83
- package/contracts/oracles/PythOracle.sol +41 -41
- package/contracts/oracles/TwapOracle.sol +67 -67
- package/contracts/oracles/mocks/MockBinanceOracle.sol +4 -4
- package/contracts/oracles/mocks/MockChainlinkOracle.sol +4 -4
- package/contracts/oracles/mocks/MockPythOracle.sol +4 -4
- package/contracts/oracles/mocks/MockTwapOracle.sol +4 -4
- package/contracts/test/MockPyth.sol +13 -13
- package/contracts/test/MockSimpleOracle.sol +8 -8
- package/contracts/test/MockV3Aggregator.sol +18 -18
- package/contracts/test/PancakePairHarness.sol +10 -10
- package/deploy/1-deploy-oracles.d.ts +1 -3
- package/deploy/1-deploy-oracles.d.ts.map +1 -1
- package/deploy/1-deploy-oracles.js +13 -3
- package/deploy/1-deploy-oracles.js.map +1 -1
- package/deploy/2-configure-feeds.d.ts +1 -3
- package/deploy/2-configure-feeds.d.ts.map +1 -1
- package/deploy/2-configure-feeds.js +101 -87
- package/deploy/2-configure-feeds.js.map +1 -1
- package/deployments/bsctestnet/BinanceOracle.json +42 -29
- package/deployments/bsctestnet/BinanceOracle_Implementation.json +96 -23
- package/deployments/bsctestnet/BinanceOracle_Proxy.json +28 -28
- package/deployments/bsctestnet/BoundValidator.json +65 -39
- package/deployments/bsctestnet/BoundValidator_Implementation.json +113 -35
- package/deployments/bsctestnet/BoundValidator_Proxy.json +37 -37
- package/deployments/bsctestnet/ChainlinkOracle.json +64 -38
- package/deployments/bsctestnet/ChainlinkOracle_Implementation.json +122 -41
- package/deployments/bsctestnet/ChainlinkOracle_Proxy.json +37 -37
- package/deployments/bsctestnet/DefaultProxyAdmin.json +15 -15
- package/deployments/bsctestnet/PythOracle.json +71 -45
- package/deployments/bsctestnet/PythOracle_Implementation.json +128 -44
- package/deployments/bsctestnet/PythOracle_Proxy.json +44 -44
- package/deployments/bsctestnet/ResilientOracle.json +67 -54
- package/deployments/bsctestnet/ResilientOracle_Implementation.json +161 -63
- package/deployments/bsctestnet/ResilientOracle_Proxy.json +39 -39
- package/deployments/bsctestnet/TwapOracle.json +74 -71
- package/deployments/bsctestnet/TwapOracle_Implementation.json +163 -93
- package/deployments/bsctestnet/TwapOracle_Proxy.json +37 -41
- package/deployments/bsctestnet/solcInputs/6153c675ce838eebb6442d63350712be.json +144 -0
- package/package.json +4 -2
- package/deployments/bsctestnet/solcInputs/09bc2981019c6dcce653b90bac585fe0.json +0 -81
- package/deployments/bsctestnet/solcInputs/5dedb37ab8105f1f71e53a3f865859c5.json +0 -57
- package/deployments/bsctestnet/solcInputs/bb71c6049f6b7b21a6581f40daf802bc.json +0 -138
|
@@ -13,19 +13,18 @@ struct Observation {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
struct TokenConfig {
|
|
16
|
-
/// @notice
|
|
16
|
+
/// @notice Asset address, which can't be zero address and can be used for existance check
|
|
17
17
|
address asset;
|
|
18
18
|
/// @notice Decimals of underlying asset
|
|
19
19
|
uint256 baseUnit;
|
|
20
|
-
/// @notice The address of
|
|
20
|
+
/// @notice The address of Pancake pair
|
|
21
21
|
address pancakePool;
|
|
22
22
|
/// @notice Whether the token is paired with WBNB
|
|
23
23
|
bool isBnbBased;
|
|
24
|
-
/// @notice A flag identifies whether the
|
|
24
|
+
/// @notice A flag identifies whether the Pancake pair is reversed
|
|
25
25
|
/// e.g. XVS-WBNB is not reversed, while WBNB-XVS is.
|
|
26
26
|
bool isReversedPool;
|
|
27
|
-
/// @notice
|
|
28
|
-
/// required to update **twap** window
|
|
27
|
+
/// @notice The minimum window in seconds required between TWAP updates
|
|
29
28
|
uint256 anchorPeriod;
|
|
30
29
|
}
|
|
31
30
|
|
|
@@ -52,7 +51,13 @@ contract TwapOracle is OwnableUpgradeable, TwapInterface {
|
|
|
52
51
|
/// @notice Stored price by token
|
|
53
52
|
mapping(address => uint256) public prices;
|
|
54
53
|
|
|
55
|
-
/// @notice
|
|
54
|
+
/// @notice Keeps a record of token observations mapped by address, updated on every updateTwap invocation.
|
|
55
|
+
mapping(address => Observation[]) public observations;
|
|
56
|
+
|
|
57
|
+
/// @notice Observation array index which probably falls in current anchor period mapped by asset address
|
|
58
|
+
mapping(address => uint256) public windowStart;
|
|
59
|
+
|
|
60
|
+
/// @notice Emit this event when TWAP window is updated
|
|
56
61
|
event TwapWindowUpdated(
|
|
57
62
|
address indexed asset,
|
|
58
63
|
uint256 oldTimestamp,
|
|
@@ -61,12 +66,6 @@ contract TwapOracle is OwnableUpgradeable, TwapInterface {
|
|
|
61
66
|
uint256 newAcc
|
|
62
67
|
);
|
|
63
68
|
|
|
64
|
-
/// @notice Keeps a record of token observations mapped by address, updated on every updateTwap invocation.
|
|
65
|
-
mapping(address => Observation[]) public observations;
|
|
66
|
-
|
|
67
|
-
/// @notice index of array which probably falls in current anchor period mapped with asset address
|
|
68
|
-
mapping(address => uint256) public windowStart;
|
|
69
|
-
|
|
70
69
|
/// @notice Emit this event when TWAP price is updated
|
|
71
70
|
event AnchorPriceUpdated(address indexed asset, uint256 price, uint256 oldTimestamp, uint256 newTimestamp);
|
|
72
71
|
|
|
@@ -89,16 +88,9 @@ contract TwapOracle is OwnableUpgradeable, TwapInterface {
|
|
|
89
88
|
}
|
|
90
89
|
|
|
91
90
|
/**
|
|
92
|
-
* @notice
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
__Ownable_init();
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* @notice Add multiple token configs at the same time
|
|
100
|
-
* @param configs config array
|
|
101
|
-
* @custom:error ZSero length error thrown, if length of the array in parameter is 0
|
|
91
|
+
* @notice Adds multiple token configs at the same time
|
|
92
|
+
* @param configs Config array
|
|
93
|
+
* @custom:error Zero length error thrown, if length of the config array is 0
|
|
102
94
|
*/
|
|
103
95
|
function setTokenConfigs(TokenConfig[] memory configs) external onlyOwner {
|
|
104
96
|
require(configs.length > 0, "length can't be 0");
|
|
@@ -109,16 +101,41 @@ contract TwapOracle is OwnableUpgradeable, TwapInterface {
|
|
|
109
101
|
}
|
|
110
102
|
|
|
111
103
|
/**
|
|
112
|
-
* @notice
|
|
104
|
+
* @notice Get the underlying TWAP price for the given vToken
|
|
105
|
+
* @param vToken vToken address
|
|
106
|
+
* @return price Underlying price in USD
|
|
107
|
+
* @custom:error Missing error is thrown if the token config does not exist
|
|
108
|
+
* @custom:error Range error is thrown if TWAP price is not greater than zero
|
|
109
|
+
*/
|
|
110
|
+
function getUnderlyingPrice(address vToken) external view override returns (uint256) {
|
|
111
|
+
// VBNB token doesn't have `underlying` method, vBNB's underlying token is wBNB
|
|
112
|
+
address asset = address(vToken) == vBnb ? WBNB : VBep20Interface(vToken).underlying();
|
|
113
|
+
require(tokenConfigs[asset].asset != address(0), "asset not exist");
|
|
114
|
+
uint256 price = prices[asset];
|
|
115
|
+
|
|
116
|
+
// if price is 0, it means the price hasn't been updated yet and it's meaningless, revert
|
|
117
|
+
require(price > 0, "TWAP price must be positive");
|
|
118
|
+
return (price * (10 ** (18 - IERC20Metadata(asset).decimals())));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @notice Initializes the owner of the contract and sets the contracts required
|
|
123
|
+
*/
|
|
124
|
+
function initialize() public initializer {
|
|
125
|
+
__Ownable_init();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @notice Adds a single token config
|
|
113
130
|
* @param config token config struct
|
|
114
131
|
* @custom:access Only Governance
|
|
115
|
-
* @custom:error Range error thrown if anchor period is not greater than zero
|
|
116
|
-
* @custom:error Range error thrown if base unit is not greater than zero
|
|
117
|
-
* @custom:error Value error thrown if base unit decimals not same as asset decimals
|
|
118
|
-
* @custom:error NotNullAddress if address of asset is
|
|
119
|
-
* @custom:error NotNullAddress if
|
|
132
|
+
* @custom:error Range error is thrown if anchor period is not greater than zero
|
|
133
|
+
* @custom:error Range error is thrown if base unit is not greater than zero
|
|
134
|
+
* @custom:error Value error is thrown if base unit decimals is not the same as asset decimals
|
|
135
|
+
* @custom:error NotNullAddress error is thrown if address of asset is null
|
|
136
|
+
* @custom:error NotNullAddress error is thrown if PancakeSwap pool address is null
|
|
120
137
|
* @custom:event Emits TokenConfigAdded event if new token config are added with
|
|
121
|
-
* asset address,
|
|
138
|
+
* asset address, PancakePool address, anchor period address
|
|
122
139
|
*/
|
|
123
140
|
function setTokenConfig(
|
|
124
141
|
TokenConfig memory config
|
|
@@ -139,25 +156,24 @@ contract TwapOracle is OwnableUpgradeable, TwapInterface {
|
|
|
139
156
|
}
|
|
140
157
|
|
|
141
158
|
/**
|
|
142
|
-
* @notice
|
|
143
|
-
* @
|
|
144
|
-
* @
|
|
145
|
-
* @custom:error Missing error thrown if token config is not exist
|
|
146
|
-
* @custom:error Range error thrown if **twap** price is not greater than zero
|
|
159
|
+
* @notice Updates the current token/BUSD price from PancakeSwap, with 18 decimals of precision.
|
|
160
|
+
* @return anchorPrice anchor price of the underlying asset of the vToken
|
|
161
|
+
* @custom:error Missing error is thrown if token config does not exist
|
|
147
162
|
*/
|
|
148
|
-
function
|
|
163
|
+
function updateTwap(address vToken) public returns (uint256) {
|
|
149
164
|
// VBNB token doesn't have `underlying` method, vBNB's underlying token is wBNB
|
|
150
165
|
address asset = address(vToken) == vBnb ? WBNB : VBep20Interface(vToken).underlying();
|
|
151
166
|
require(tokenConfigs[asset].asset != address(0), "asset not exist");
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
167
|
+
// Update & fetch WBNB price first, so we can calculate the price of WBNB paired token
|
|
168
|
+
if (asset != WBNB && tokenConfigs[asset].isBnbBased) {
|
|
169
|
+
require(tokenConfigs[WBNB].asset != address(0), "WBNB not exist");
|
|
170
|
+
_updateTwapInternal(tokenConfigs[WBNB]);
|
|
171
|
+
}
|
|
172
|
+
return _updateTwapInternal(tokenConfigs[asset]);
|
|
157
173
|
}
|
|
158
174
|
|
|
159
175
|
/**
|
|
160
|
-
* @notice Fetches the current token/WBNB and token/BUSD price accumulator from
|
|
176
|
+
* @notice Fetches the current token/WBNB and token/BUSD price accumulator from PancakeSwap.
|
|
161
177
|
* @return cumulative price of target token regardless of pair order
|
|
162
178
|
*/
|
|
163
179
|
function currentCumulativePrice(TokenConfig memory config) public view returns (uint256) {
|
|
@@ -169,30 +185,13 @@ contract TwapOracle is OwnableUpgradeable, TwapInterface {
|
|
|
169
185
|
}
|
|
170
186
|
}
|
|
171
187
|
|
|
172
|
-
/**
|
|
173
|
-
* @notice Updates the current token/BUSD price from PancakeSwap, with 18 decimals of precision.
|
|
174
|
-
* @return vToken Address of vToken
|
|
175
|
-
* @custom:error Missing error thrown if token config is not exist
|
|
176
|
-
*/
|
|
177
|
-
function updateTwap(address vToken) public returns (uint256) {
|
|
178
|
-
// VBNB token doesn't have `underlying` method, vBNB's underlying token is wBNB
|
|
179
|
-
address asset = address(vToken) == vBnb ? WBNB : VBep20Interface(vToken).underlying();
|
|
180
|
-
require(tokenConfigs[asset].asset != address(0), "asset not exist");
|
|
181
|
-
// Update & fetch WBNB price first, so we can calculate the price of WBNB paired token
|
|
182
|
-
if (asset != WBNB && tokenConfigs[asset].isBnbBased) {
|
|
183
|
-
require(tokenConfigs[WBNB].asset != address(0), "WBNB not exist");
|
|
184
|
-
_updateTwapInternal(tokenConfigs[WBNB]);
|
|
185
|
-
}
|
|
186
|
-
return _updateTwapInternal(tokenConfigs[asset]);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
188
|
/**
|
|
190
189
|
* @notice Fetches the current token/BUSD price from PancakeSwap, with 18 decimals of precision.
|
|
191
|
-
* @return price in USD, with 18 decimals
|
|
192
|
-
* @custom:error Timing error thrown if current time is not greater than old observation timestamp
|
|
193
|
-
* @custom:error Zero price error thrown if token is BNB based and price is zero
|
|
194
|
-
* @custom:error Zero price error thrown if fetched anchorPriceMantissa is zero
|
|
195
|
-
* @custom:event Emits AnchorPriceUpdated event on
|
|
190
|
+
* @return price Underlying price in USD, with 18 decimals
|
|
191
|
+
* @custom:error Timing error is thrown if current time is not greater than old observation timestamp
|
|
192
|
+
* @custom:error Zero price error is thrown if token is BNB based and price is zero
|
|
193
|
+
* @custom:error Zero price error is thrown if fetched anchorPriceMantissa is zero
|
|
194
|
+
* @custom:event Emits AnchorPriceUpdated event on successful update of observation with assset address,
|
|
196
195
|
* AnchorPrice, old observation timestamp and current timestamp
|
|
197
196
|
*/
|
|
198
197
|
function _updateTwapInternal(TokenConfig memory config) internal virtual returns (uint256) {
|
|
@@ -234,11 +233,12 @@ contract TwapOracle is OwnableUpgradeable, TwapInterface {
|
|
|
234
233
|
}
|
|
235
234
|
|
|
236
235
|
/**
|
|
237
|
-
* @notice
|
|
238
|
-
*
|
|
236
|
+
* @notice Appends current observation and pick an observation with a timestamp equal
|
|
237
|
+
* or just greater than the window start timestamp. If one is not available,
|
|
238
|
+
* then pick the last availableobservation. The window start index is updated in both the cases.
|
|
239
239
|
* Only the current observation is saved, prior observations are deleted during this operation.
|
|
240
|
-
* @return cumulative price
|
|
241
|
-
* @custom:event
|
|
240
|
+
* @return Tuple of cumulative price, old observation and timestamp
|
|
241
|
+
* @custom:event Emits TwapWindowUpdated on successful calculation of cumulative price with asset address,
|
|
242
242
|
* new observation timestamp, current timestamp, new observation price and cumulative price
|
|
243
243
|
*/
|
|
244
244
|
function pokeWindowValues(
|
|
@@ -12,15 +12,15 @@ contract MockBinanceOracle is OwnableUpgradeable {
|
|
|
12
12
|
|
|
13
13
|
constructor() {}
|
|
14
14
|
|
|
15
|
+
function setPrice(address asset, uint256 price) external {
|
|
16
|
+
assetPrices[asset] = price;
|
|
17
|
+
}
|
|
18
|
+
|
|
15
19
|
function initialize(FeedRegistryInterface feed) public initializer {
|
|
16
20
|
__Ownable_init();
|
|
17
21
|
feedRegistry = feed;
|
|
18
22
|
}
|
|
19
23
|
|
|
20
|
-
function setPrice(address asset, uint256 price) external {
|
|
21
|
-
assetPrices[asset] = price;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
24
|
function getUnderlyingPrice(address vToken) public view returns (uint256) {
|
|
25
25
|
return assetPrices[vToken];
|
|
26
26
|
}
|
|
@@ -11,14 +11,14 @@ contract MockChainlinkOracle is OwnableUpgradeable {
|
|
|
11
11
|
//set price in 6 decimal precision
|
|
12
12
|
constructor() {}
|
|
13
13
|
|
|
14
|
-
function initialize() public initializer {
|
|
15
|
-
__Ownable_init();
|
|
16
|
-
}
|
|
17
|
-
|
|
18
14
|
function setPrice(address asset, uint256 price) external {
|
|
19
15
|
assetPrices[asset] = price;
|
|
20
16
|
}
|
|
21
17
|
|
|
18
|
+
function initialize() public initializer {
|
|
19
|
+
__Ownable_init();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
22
|
//https://compound.finance/docs/prices
|
|
23
23
|
function getUnderlyingPrice(address vToken) public view returns (uint256) {
|
|
24
24
|
address token = VBep20Interface(vToken).underlying();
|
|
@@ -14,16 +14,16 @@ contract MockPythOracle is OwnableUpgradeable {
|
|
|
14
14
|
//set price in 6 decimal precision
|
|
15
15
|
constructor() {}
|
|
16
16
|
|
|
17
|
+
function setPrice(address asset, uint256 price) external {
|
|
18
|
+
assetPrices[asset] = price;
|
|
19
|
+
}
|
|
20
|
+
|
|
17
21
|
function initialize(address underlyingPythOracle_) public initializer {
|
|
18
22
|
__Ownable_init();
|
|
19
23
|
require(underlyingPythOracle_ != address(0), "pyth oracle cannot be zero address");
|
|
20
24
|
underlyingPythOracle = IPyth(underlyingPythOracle_);
|
|
21
25
|
}
|
|
22
26
|
|
|
23
|
-
function setPrice(address asset, uint256 price) external {
|
|
24
|
-
assetPrices[asset] = price;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
27
|
//https://compound.finance/docs/prices
|
|
28
28
|
function getUnderlyingPrice(address vToken) public view returns (uint256) {
|
|
29
29
|
address token = VBep20Interface(vToken).underlying();
|
|
@@ -13,16 +13,16 @@ contract MockTwapOracle is OwnableUpgradeable {
|
|
|
13
13
|
//set price in 6 decimal precision
|
|
14
14
|
constructor() {}
|
|
15
15
|
|
|
16
|
+
function setPrice(address asset, uint256 price) external {
|
|
17
|
+
assetPrices[asset] = price;
|
|
18
|
+
}
|
|
19
|
+
|
|
16
20
|
function initialize(address vBNB_) public initializer {
|
|
17
21
|
__Ownable_init();
|
|
18
22
|
require(vBNB_ != address(0), "vBNB can't be zero address");
|
|
19
23
|
vBNB = vBNB_;
|
|
20
24
|
}
|
|
21
25
|
|
|
22
|
-
function setPrice(address asset, uint256 price) external {
|
|
23
|
-
assetPrices[asset] = price;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
26
|
//https://compound.finance/docs/prices
|
|
27
27
|
function getUnderlyingPrice(address vToken) public view returns (uint256) {
|
|
28
28
|
return assetPrices[vToken];
|
|
@@ -15,11 +15,6 @@ contract MockPyth is AbstractPyth {
|
|
|
15
15
|
validTimePeriod = _validTimePeriod;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
function queryPriceFeed(bytes32 id) public view override returns (PythStructs.PriceFeed memory priceFeed) {
|
|
19
|
-
require(priceFeeds[id].id != 0, "no price feed found for the given price id");
|
|
20
|
-
return priceFeeds[id];
|
|
21
|
-
}
|
|
22
|
-
|
|
23
18
|
// simply update price feeds
|
|
24
19
|
function updatePriceFeedsHarness(PythStructs.PriceFeed[] calldata feeds) external {
|
|
25
20
|
require(feeds.length > 0, "feeds length must > 0");
|
|
@@ -28,14 +23,6 @@ contract MockPyth is AbstractPyth {
|
|
|
28
23
|
}
|
|
29
24
|
}
|
|
30
25
|
|
|
31
|
-
function priceFeedExists(bytes32 id) public view override returns (bool) {
|
|
32
|
-
return (priceFeeds[id].id != 0);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function getValidTimePeriod() public view override returns (uint256) {
|
|
36
|
-
return validTimePeriod;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
26
|
// Takes an array of encoded price feeds and stores them.
|
|
40
27
|
// You can create this data either by calling createPriceFeedData or
|
|
41
28
|
// by using web3.js or ethers abi utilities.
|
|
@@ -91,6 +78,19 @@ contract MockPyth is AbstractPyth {
|
|
|
91
78
|
emit UpdatePriceFeeds(msg.sender, 1, requiredFee);
|
|
92
79
|
}
|
|
93
80
|
|
|
81
|
+
function queryPriceFeed(bytes32 id) public view override returns (PythStructs.PriceFeed memory priceFeed) {
|
|
82
|
+
require(priceFeeds[id].id != 0, "no price feed found for the given price id");
|
|
83
|
+
return priceFeeds[id];
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function priceFeedExists(bytes32 id) public view override returns (bool) {
|
|
87
|
+
return (priceFeeds[id].id != 0);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function getValidTimePeriod() public view override returns (uint256) {
|
|
91
|
+
return validTimePeriod;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
94
|
function getUpdateFee(uint256 updateDataSize) public view override returns (uint256 feeAmount) {
|
|
95
95
|
return singleUpdateFeeInWei * updateDataSize;
|
|
96
96
|
}
|
|
@@ -10,13 +10,13 @@ contract MockSimpleOracle is OracleInterface {
|
|
|
10
10
|
//
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
function setPrice(address vToken, uint256 price) public {
|
|
14
|
-
prices[vToken] = price;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
13
|
function getUnderlyingPrice(address vToken) external view returns (uint256) {
|
|
18
14
|
return prices[vToken];
|
|
19
15
|
}
|
|
16
|
+
|
|
17
|
+
function setPrice(address vToken, uint256 price) public {
|
|
18
|
+
prices[vToken] = price;
|
|
19
|
+
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
contract MockBoundValidator is BoundValidatorInterface {
|
|
@@ -27,10 +27,6 @@ contract MockBoundValidator is BoundValidatorInterface {
|
|
|
27
27
|
//
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
function setValidateResult(address vToken, bool pass) public {
|
|
31
|
-
validateResults[vToken] = pass;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
30
|
function validatePriceWithAnchorPrice(
|
|
35
31
|
address vToken,
|
|
36
32
|
uint256 reporterPrice,
|
|
@@ -38,4 +34,8 @@ contract MockBoundValidator is BoundValidatorInterface {
|
|
|
38
34
|
) external view returns (bool) {
|
|
39
35
|
return validateResults[vToken];
|
|
40
36
|
}
|
|
37
|
+
|
|
38
|
+
function setValidateResult(address vToken, bool pass) public {
|
|
39
|
+
validateResults[vToken] = pass;
|
|
40
|
+
}
|
|
41
41
|
}
|
|
@@ -28,24 +28,6 @@ contract MockV3Aggregator is AggregatorV2V3Interface {
|
|
|
28
28
|
updateAnswer(_initialAnswer);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
function updateAnswer(int256 _answer) public {
|
|
32
|
-
latestAnswer = _answer;
|
|
33
|
-
latestTimestamp = block.timestamp;
|
|
34
|
-
latestRound++;
|
|
35
|
-
getAnswer[latestRound] = _answer;
|
|
36
|
-
getTimestamp[latestRound] = block.timestamp;
|
|
37
|
-
getStartedAt[latestRound] = block.timestamp;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function updateRoundData(uint80 _roundId, int256 _answer, uint256 _timestamp, uint256 _startedAt) public {
|
|
41
|
-
latestRound = _roundId;
|
|
42
|
-
latestAnswer = _answer;
|
|
43
|
-
latestTimestamp = _timestamp;
|
|
44
|
-
getAnswer[latestRound] = _answer;
|
|
45
|
-
getTimestamp[latestRound] = _timestamp;
|
|
46
|
-
getStartedAt[latestRound] = _startedAt;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
31
|
function getRoundData(
|
|
50
32
|
uint80 _roundId
|
|
51
33
|
)
|
|
@@ -73,4 +55,22 @@ contract MockV3Aggregator is AggregatorV2V3Interface {
|
|
|
73
55
|
function description() external pure returns (string memory) {
|
|
74
56
|
return "v0.6/tests/MockV3Aggregator.sol";
|
|
75
57
|
}
|
|
58
|
+
|
|
59
|
+
function updateAnswer(int256 _answer) public {
|
|
60
|
+
latestAnswer = _answer;
|
|
61
|
+
latestTimestamp = block.timestamp;
|
|
62
|
+
latestRound++;
|
|
63
|
+
getAnswer[latestRound] = _answer;
|
|
64
|
+
getTimestamp[latestRound] = block.timestamp;
|
|
65
|
+
getStartedAt[latestRound] = block.timestamp;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function updateRoundData(uint80 _roundId, int256 _answer, uint256 _timestamp, uint256 _startedAt) public {
|
|
69
|
+
latestRound = _roundId;
|
|
70
|
+
latestAnswer = _answer;
|
|
71
|
+
latestTimestamp = _timestamp;
|
|
72
|
+
getAnswer[latestRound] = _answer;
|
|
73
|
+
getTimestamp[latestRound] = _timestamp;
|
|
74
|
+
getStartedAt[latestRound] = _startedAt;
|
|
75
|
+
}
|
|
76
76
|
}
|
|
@@ -55,16 +55,6 @@ contract PancakePairHarness {
|
|
|
55
55
|
uint256 public price1CumulativeLast;
|
|
56
56
|
uint256 public kLast; // reserve0 * reserve1, as of immediately after the most recent liquidity event
|
|
57
57
|
|
|
58
|
-
function currentBlockTimestamp() external view returns (uint32) {
|
|
59
|
-
return uint32(block.timestamp % 2 ** 32);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function getReserves() public view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast) {
|
|
63
|
-
_reserve0 = reserve0;
|
|
64
|
-
_reserve1 = reserve1;
|
|
65
|
-
_blockTimestampLast = blockTimestampLast;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
58
|
// called once by the factory at time of deployment
|
|
69
59
|
function initialize(address _token0, address _token1) external {
|
|
70
60
|
token0 = _token0;
|
|
@@ -87,4 +77,14 @@ contract PancakePairHarness {
|
|
|
87
77
|
reserve1 = uint112(balance1);
|
|
88
78
|
blockTimestampLast = blockTimestamp;
|
|
89
79
|
}
|
|
80
|
+
|
|
81
|
+
function currentBlockTimestamp() external view returns (uint32) {
|
|
82
|
+
return uint32(block.timestamp % 2 ** 32);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function getReserves() public view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast) {
|
|
86
|
+
_reserve0 = reserve0;
|
|
87
|
+
_reserve1 = reserve1;
|
|
88
|
+
_blockTimestampLast = blockTimestampLast;
|
|
89
|
+
}
|
|
90
90
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1-deploy-oracles.d.ts","sourceRoot":"","sources":["../../deploy/1-deploy-oracles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"1-deploy-oracles.d.ts","sourceRoot":"","sources":["../../deploy/1-deploy-oracles.ts"],"names":[],"mappings":""}
|
|
@@ -18,11 +18,13 @@ const hardhat_1 = __importDefault(require("hardhat"));
|
|
|
18
18
|
const ADDRESSES = {
|
|
19
19
|
bsctestnet: {
|
|
20
20
|
vBNBAddress: testnet_json_1.default.Contracts.vBNB,
|
|
21
|
+
WBNBAddress: "0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd",
|
|
21
22
|
pythOracleAddress: "0xd7308b14BF4008e7C7196eC35610B1427C5702EA",
|
|
22
23
|
binanceFeedRegistryAddress: "0x999DD49FeFdC043fDAC4FE12Bb1e4bb31cB4c47B",
|
|
23
24
|
},
|
|
24
25
|
bscmainnet: {
|
|
25
26
|
vBNBAddress: mainnet_json_1.default.Contracts.vBNB,
|
|
27
|
+
WBNBAddress: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
|
|
26
28
|
pythOracleAddress: "",
|
|
27
29
|
binanceFeedRegistryAddress: "",
|
|
28
30
|
},
|
|
@@ -32,10 +34,13 @@ const func = function ({ getNamedAccounts, deployments, network }) {
|
|
|
32
34
|
const { deploy } = deployments;
|
|
33
35
|
const { deployer } = yield getNamedAccounts();
|
|
34
36
|
const networkName = network.name === "bscmainnet" ? "bscmainnet" : "bsctestnet";
|
|
37
|
+
const vBNBAddress = ADDRESSES[networkName].vBNBAddress;
|
|
38
|
+
const WBNBAddress = ADDRESSES[networkName].WBNBAddress;
|
|
35
39
|
yield deploy("BoundValidator", {
|
|
36
40
|
from: deployer,
|
|
37
41
|
log: true,
|
|
38
42
|
deterministicDeployment: false,
|
|
43
|
+
args: [vBNBAddress],
|
|
39
44
|
proxy: {
|
|
40
45
|
proxyContract: "OptimizedTransparentProxy",
|
|
41
46
|
execute: {
|
|
@@ -49,6 +54,7 @@ const func = function ({ getNamedAccounts, deployments, network }) {
|
|
|
49
54
|
from: deployer,
|
|
50
55
|
log: true,
|
|
51
56
|
deterministicDeployment: false,
|
|
57
|
+
args: [vBNBAddress],
|
|
52
58
|
proxy: {
|
|
53
59
|
proxyContract: "OptimizedTransparentProxy",
|
|
54
60
|
execute: {
|
|
@@ -62,6 +68,7 @@ const func = function ({ getNamedAccounts, deployments, network }) {
|
|
|
62
68
|
from: deployer,
|
|
63
69
|
log: true,
|
|
64
70
|
deterministicDeployment: false,
|
|
71
|
+
args: network.live ? [vBNBAddress] : [],
|
|
65
72
|
proxy: {
|
|
66
73
|
proxyContract: "OptimizedTransparentProxy",
|
|
67
74
|
execute: {
|
|
@@ -70,17 +77,17 @@ const func = function ({ getNamedAccounts, deployments, network }) {
|
|
|
70
77
|
},
|
|
71
78
|
},
|
|
72
79
|
});
|
|
73
|
-
const vBNBAddress = ADDRESSES[networkName].vBNBAddress;
|
|
74
80
|
yield deploy("TwapOracle", {
|
|
75
81
|
contract: network.live ? "TwapOracle" : "MockTwapOracle",
|
|
76
82
|
from: deployer,
|
|
77
83
|
log: true,
|
|
78
84
|
deterministicDeployment: false,
|
|
85
|
+
args: network.live ? [vBNBAddress, WBNBAddress] : [],
|
|
79
86
|
proxy: {
|
|
80
87
|
proxyContract: "OptimizedTransparentProxy",
|
|
81
88
|
execute: {
|
|
82
89
|
methodName: "initialize",
|
|
83
|
-
args: [vBNBAddress],
|
|
90
|
+
args: network.live ? [] : [vBNBAddress],
|
|
84
91
|
},
|
|
85
92
|
},
|
|
86
93
|
});
|
|
@@ -90,6 +97,7 @@ const func = function ({ getNamedAccounts, deployments, network }) {
|
|
|
90
97
|
from: deployer,
|
|
91
98
|
log: true,
|
|
92
99
|
deterministicDeployment: false,
|
|
100
|
+
args: network.live ? [vBNBAddress] : [],
|
|
93
101
|
proxy: {
|
|
94
102
|
proxyContract: "OptimizedTransparentProxy",
|
|
95
103
|
execute: {
|
|
@@ -104,6 +112,7 @@ const func = function ({ getNamedAccounts, deployments, network }) {
|
|
|
104
112
|
from: deployer,
|
|
105
113
|
log: true,
|
|
106
114
|
deterministicDeployment: false,
|
|
115
|
+
args: network.live ? [vBNBAddress] : [],
|
|
107
116
|
proxy: {
|
|
108
117
|
proxyContract: "OptimizedTransparentProxy",
|
|
109
118
|
execute: {
|
|
@@ -114,5 +123,6 @@ const func = function ({ getNamedAccounts, deployments, network }) {
|
|
|
114
123
|
});
|
|
115
124
|
});
|
|
116
125
|
};
|
|
117
|
-
exports
|
|
126
|
+
module.exports = func;
|
|
127
|
+
module.exports.tags = ["deploy"];
|
|
118
128
|
//# sourceMappingURL=1-deploy-oracles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1-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,CAAC,eAAe,EAAE;YAC5B,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,mBAAmB;YAC9D,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE,IAAI;YACT,uBAAuB,EAAE,KAAK;YAC9B,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE;YACvC,KAAK,EAAE;gBACL,aAAa,EAAE,2BAA2B;gBAC1C,OAAO,EAAE;oBACP,UAAU,EAAE,YAAY;oBACxB,IAAI,EAAE,CAAC,0BAA0B,CAAC;iBACnC;aACF;SACF,CAAC,CAAC;IACL,CAAC;CAAA,CAAC;AAEF,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC;AACtB,MAAM,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2-configure-feeds.d.ts","sourceRoot":"","sources":["../../deploy/2-configure-feeds.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"2-configure-feeds.d.ts","sourceRoot":"","sources":["../../deploy/2-configure-feeds.ts"],"names":[],"mappings":""}
|