Repository navigation
Conversation
…D pricing - Added priceFeedRegistry and ronUsdFeedId to ISharedArgument interface. - Updated Migration script to initialize new price feed configuration. - Implemented PriceFeedRegistryConsumerUpgradeable for handling price feeds. - Modified RNSDomainPrice contract to support new price feed initialization and conversion methods. - Added tests to validate new price feed functionality and ensure correct price conversions.
- Added "dependencies" to the libs array. - Updated RPC endpoint URLs for Ronin mainnet and testnet.
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Problem. Chainlink deprecated the RON/USD AggregatorV3 proxy (
0x0B6074F21488B95945989E513EFEA070096d931D) on 2026-08-26.RNSDomainPricestill reads it, soconvertUSDToRONreverts and every registration and renewal quote on mainnet fails. Saigon has the same problem with its aggregator.Fix. Read RON/USD from the Ronin
PriceFeedRegistry(Chainlink Data Streams) instead. Mainnet: registry0x7D21f62Da4ab252159bD865F3E3144B1D94E544D, feed0x0003892129eeb6c0d5d33bd734b0ca0d409130f5984d6051452a777f103ce628, 18 decimals, 24h max age. Saigon: registry0xd3Aa8f60553cE9Cb9FDE7dDC3F796D15dc8B87B3, feed0x000348db760241ba2b0c3a81e6da756208d658ac20ebd82e291c2f08d1d33f96.Contract changes
RNSDomainPriceinheritsPriceFeedRegistryConsumerUpgradeableinstead of contract-libs'ChainlinkPriceFeedConsumer.convertUSDToRONandconvertRONToUSDnow go through the registry; nothing else in the pricing logic changes.initializeV3(registry, feedId, maxAcceptableAge)underreinitializer(3).initializeV2stays as an empty stub so the deployment kit's initializer count matches the version; it cannot be called on the live proxies.setPriceFeedData/getPriceFeedDataare replaced bysetPriceFeedRegistry(...)(admin only) and the inheritedpriceRegistryData()getter. EventChainlinkPriceFeedUpdatedis replaced byPriceFeedRegistryUpdatedandPriceFeedUpdated. Off-chain readers of the oracle config need to switch.src/extensions/PriceFeedRegistryConsumerUpgradeable.sol,src/libraries/LibChainlinkDataStreamFeed.sol,src/interfaces/IPriceFeedRegistryConsumer.sol) are copied unchanged fromaxieinfinity/chainlink-data-stream-relayerataee68ba, apart from import paths.Migration.
script/20260904-upgrade-rns-domain-price-adopt-price-feed-registry/upgrades the proxy throughProxyAdmin.upgradeAndCallwith theinitializeV3calldata. Pre-check: feed whitelisted and price positive. Post-check: registry config, both conversions andrentPriceagainst the live price. Shared arguments gainpriceFeedRegistryandronUsdFeedIdfor both networks.Verification
test/RNSDomainPrice/RNSDomainPrice.priceFeedRegistry.t.sol: unit tests for init, replay protection, conversions at 18 and 8 decimals, stale and missing price reverts, admin gating.test/RNSDomainPrice/RNSDomainPrice.upgradeFork.t.sol(RUN_FORK_TESTS=true): runs the Safe-executedupgradeAndCallon mainnet and Saigon forks; passes on both.rentPricereverts before the upgrade and returns 5.00 USD / 91.93 RON for a 1-year 5-letter name after it. Roles and renewal fees are unchanged.RNSCommission.test_setCommissionInfo_Success) is a pre-existing fuzz test that also fails onmainnet.Deployment. Execute the upgrade as a single
upgradeAndCallfrom the Safe.initializeV3has no caller check (the Transparent proxy pattern, asinitializeV2before it), so a separateupgrade()followed byinitializeV3()would leave a window in which anyone could set the registry.Checklist