Skip to content

feat: add APRO oracle as PIVOT for BStocks markets on BNB Chain - #746

Draft
GitGuru7 wants to merge 2 commits into
mainfrom
feat/apro-oracle-config-for-bstock
Draft

feat: add APRO oracle as PIVOT for BStocks markets on BNB Chain#746
GitGuru7 wants to merge 2 commits into
mainfrom
feat/apro-oracle-config-for-bstock

Conversation

@GitGuru7

Copy link
Copy Markdown
Contributor

Add APRO oracle as PIVOT for BStocks markets on BNB Chain

Adds a VIP that gives the four BStocks markets (SKHYB, NVDAB, SPCXB, TSLAB) a second, independent price source. Today they price from a single source — Atlas as MAIN, no PIVOT, no FALLBACK.

The VIP:

  1. Accepts ownership of the newly deployed APRO oracle (Normal Timelock is pendingOwner)
  2. Grants the Normal Timelock setTokenConfig + setDirectPrice on it via the ACM
  3. Configures the four APRO feeds (3800s max stale period, matching Atlas)
  4. Inserts APRO as PIVOT in the ResilientOracle — [Atlas, APRO, 0] / [true, true, false]; Atlas unchanged as MAIN
  5. Sets the BoundValidator band to ±1% (1.01 / 0.99)

With a PIVOT and no FALLBACK, the Atlas price must fall inside the band around the APRO price or pricing reverts.

⚠️ Pre-execution requirement: the APRO feeds are access-controlled aggregators — APRO must whitelist 0x04480f1Ba2252CDF89deB022B58d0a03d1B4cF91 on all four access controllers before execution, or getPrice() reverts for these markets.

Simulation (simulations/vip-999/bscmainnet.ts, block 112419380) covers pre-VIP state, execution events, post-VIP config, and a behavioral proof: pricing reverts while un-whitelisted, then resolves to the pre-VIP price once whitelisted.

npx hardhat test simulations/vip-999/bscmainnet.ts --fork bscmainnet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant