Skip to content

Commit 8a96ffd

Browse files
committed
feat: move USDe to standard oracle config and fix BTC Binance stale period for VIP-650
USDe is now treated as a RedStone-enabled asset alongside the others, moved from fallback oracle configs to standard oracle configs. BTC Binance stale period updated to 25 min to match its 1-min feed interval.
1 parent 2bb71b6 commit 8a96ffd

File tree

2 files changed

+36
-34
lines changed

2 files changed

+36
-34
lines changed

simulations/vip-650/bscmainnet.ts

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,19 @@ forking(80964126, async () => {
155155
bscmainnet.NORMAL_TIMELOCK,
156156
315360000,
157157
);
158-
await setMaxStalePeriodInBinanceOracle(bscmainnet.BINANCE_ORACLE, NAME, 315360000);
158+
159+
// USDe uses USDT_CHAINLINK_ORACLE as MAIN (not Binance)
160+
if (NAME === "USDe") {
161+
await setMaxStalePeriodInChainlinkOracle(
162+
USDT_CHAINLINK_ORACLE,
163+
ASSET,
164+
ethers.constants.AddressZero,
165+
bscmainnet.NORMAL_TIMELOCK,
166+
315360000,
167+
);
168+
} else {
169+
await setMaxStalePeriodInBinanceOracle(bscmainnet.BINANCE_ORACLE, NAME, 315360000);
170+
}
159171
}
160172

161173
// TWT: extend stale periods for RedStone and Binance (no Chainlink feed)
@@ -225,17 +237,6 @@ forking(80964126, async () => {
225237
315360000,
226238
);
227239

228-
// USDe uses USDT_CHAINLINK_ORACLE as MAIN (separate oracle instance)
229-
if (NAME === "USDe") {
230-
await setMaxStalePeriodInChainlinkOracle(
231-
USDT_CHAINLINK_ORACLE,
232-
ASSET,
233-
ethers.constants.AddressZero,
234-
bscmainnet.NORMAL_TIMELOCK,
235-
315360000,
236-
);
237-
}
238-
239240
// Extend Binance stale period (BTCB uses "BTC" after symbol override)
240241
const binanceSymbol = NAME === "BTCB" ? "BTC" : NAME;
241242
await setMaxStalePeriodInBinanceOracle(bscmainnet.BINANCE_ORACLE, binanceSymbol, 315360000);

vips/vip-650/bscmainnet.ts

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ export const TRX = "0xCE7de646e7208a4Ef112cb6ed5038FA6cC6b12e3";
2020
export const USDe = "0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34";
2121
export const USD1 = "0x8d0D000Ee44948FC98c9B98A4FA4921476f08B0d";
2222

23-
export const BINANCE_HEARTBEAT = 25 * 60 * 60; // 25 hours
23+
export const BTC_BINANCE_STALE_PERIOD = 25 * 60; // 25 minutes (1-min feed)
24+
export const BINANCE_HEARTBEAT = 25 * 60 * 60; // 25 hours (1-day feed)
2425

2526
export const OLD_FALLBACK_ORACLE_CONFIG = [
2627
{
@@ -39,14 +40,6 @@ export const OLD_FALLBACK_ORACLE_CONFIG = [
3940
FALLBACK: addressZero,
4041
CACHED: false,
4142
},
42-
{
43-
NAME: "USDe",
44-
ASSET: USDe,
45-
MAIN: USDT_CHAINLINK_ORACLE,
46-
PIVOT: CHAINLINK_ORACLE,
47-
FALLBACK: CHAINLINK_ORACLE,
48-
CACHED: false,
49-
},
5043
{
5144
NAME: "USD1",
5245
ASSET: USD1,
@@ -74,14 +67,6 @@ export const NEW_FALLBACK_ORACLE_CONFIG = [
7467
FALLBACK: BINANCE_ORACLE,
7568
CACHED: false,
7669
},
77-
{
78-
NAME: "USDe",
79-
ASSET: USDe,
80-
MAIN: USDT_CHAINLINK_ORACLE,
81-
PIVOT: CHAINLINK_ORACLE,
82-
FALLBACK: REDSTONE_ORACLE,
83-
CACHED: false,
84-
},
8570
{
8671
NAME: "USD1",
8772
ASSET: USD1,
@@ -282,6 +267,14 @@ export const OLD_ORACLE_CONFIG = [
282267
FALLBACK: addressZero,
283268
CACHED: false,
284269
},
270+
{
271+
NAME: "USDe",
272+
ASSET: USDe,
273+
MAIN: USDT_CHAINLINK_ORACLE,
274+
PIVOT: CHAINLINK_ORACLE,
275+
FALLBACK: CHAINLINK_ORACLE,
276+
CACHED: false,
277+
},
285278
];
286279

287280
/* ============ New Oracle Configs (post-VIP) ============ */
@@ -382,6 +375,14 @@ export const NEW_STANDARD_ORACLE_CONFIG = [
382375
FALLBACK: REDSTONE_ORACLE,
383376
CACHED: false,
384377
},
378+
{
379+
NAME: "USDe",
380+
ASSET: USDe,
381+
MAIN: USDT_CHAINLINK_ORACLE,
382+
PIVOT: CHAINLINK_ORACLE,
383+
FALLBACK: REDSTONE_ORACLE,
384+
CACHED: false,
385+
},
385386
];
386387

387388
// TWT: no Chainlink available, so Binance as MAIN, RedStone as PIVOT
@@ -404,19 +405,19 @@ export const vip650 = () => {
404405
405406
This proposal continues the Two-Vendor OEV Integration Framework adopted in [VIP-586](https://app.venus.io/#/governance/proposal/586) by expanding RedStone oracle coverage across the BSC Core Pool and adding fallback oracles for additional assets.
406407
407-
It registers new RedStone price feeds for 13 additional assets, updates their resilient oracle configurations, and adds fallback oracle redundancy for BTCB, TRX, USDe, and USD1.
408+
It registers new RedStone price feeds for 14 additional assets, updates their resilient oracle configurations, and adds fallback oracle redundancy for BTCB, TRX, and USD1.
408409
409410
**Actions:**
410411
411-
- **Register new RedStone oracle feeds** for: XVS, LTC, BCH, DOT, LINK, DAI, FIL, DOGE, AAVE, UNI, FDUSD, TWT, SOL
412+
- **Register new RedStone oracle feeds** for: XVS, LTC, BCH, DOT, LINK, DAI, FIL, DOGE, AAVE, UNI, FDUSD, TWT, SOL, USDe
412413
- **Update resilient oracle configurations:**
413414
- For XVS, LTC, BCH, DOT, LINK, DAI, FIL, DOGE, AAVE, UNI, FDUSD, SOL: Set MAIN=Chainlink, PIVOT=Binance, FALLBACK=RedStone
414415
- For TWT: Set MAIN=Binance, PIVOT=RedStone
416+
- For USDe: Set MAIN=USDT Chainlink, PIVOT=Chainlink, FALLBACK=RedStone
415417
- **Set BoundValidator config** for TWT (required since TWT previously had no PIVOT oracle)
416418
- **Add fallback oracles:**
417419
- BTCB: Add Binance as FALLBACK (MAIN=Chainlink, PIVOT=RedStone, FALLBACK=Binance)
418420
- TRX: Add Binance as FALLBACK (MAIN=Chainlink, PIVOT=RedStone, FALLBACK=Binance)
419-
- USDe: Update FALLBACK to RedStone (MAIN=USDT Chainlink, PIVOT=Chainlink, FALLBACK=RedStone)
420421
- USD1: Update FALLBACK to Binance (MAIN=RedStone, PIVOT=Chainlink, FALLBACK=Binance)
421422
- **Configure Binance Oracle** for BTCB (symbol override BTCB→BTC), TRX, and USD1 feeds`,
422423
forDescription: "I agree that Venus Protocol should proceed with this proposal",
@@ -471,7 +472,7 @@ It registers new RedStone price feeds for 13 additional assets, updates their re
471472
{
472473
target: BINANCE_ORACLE,
473474
signature: "setMaxStalePeriod(string,uint256)",
474-
params: ["BTC", BINANCE_HEARTBEAT],
475+
params: ["BTC", BTC_BINANCE_STALE_PERIOD],
475476
},
476477
{
477478
target: BINANCE_ORACLE,
@@ -484,7 +485,7 @@ It registers new RedStone price feeds for 13 additional assets, updates their re
484485
params: ["USD1", BINANCE_HEARTBEAT],
485486
},
486487

487-
/* ============ Resilient Oracle: Update fallback configs for BTCB, TRX, USDe, USD1 ============ */
488+
/* ============ Resilient Oracle: Update fallback configs for BTCB, TRX, USD1 ============ */
488489

489490
...NEW_FALLBACK_ORACLE_CONFIG.map(oracleData => {
490491
return {

0 commit comments

Comments
 (0)