Submitted by Rhaydden
In keepers.go, the GetAllCurrencyPairs query endpoint is misconfigured with an incorrect request type:
The root cause is that the request type is incorrectly set to GetAllCurrencyPairsResponse when it should be GetAllCurrencyPairsRequest. This mismatch between the expected and actual request types causes a protocol buffer deserialization error when clients attempt to query the supported currency pairs.
The GetAllCurrencyPairs endpoint is used during market data initialization and price oracle operations. Looking at the imports and genesis setup, we can see that this is part of the Skip Protocols oracle system (from github.com/skip-mev/connect/v2/x/oracle/types).
A specific use case that would be broken by this bug is the initialization of market data during genesis, as seen in the AddMarketData function in genesis.go. The oracle genesis state is configured here, and the currency pairs are essential for setting up initial price feeds for trading pairs; configuring which currency pairs can be queried for prices and establishing the baseline for the auction modules pricing functionality.
This would prevent any client (including the app itself) from querying the list of supported currency pairs; which is critical for validators who need to know which pairs they should be providing price data for, trading interfaces that need to display available trading pairs and the auction module which needs to verify valid currency pairs for pricing assets.
This is particularly impactful because while individual price queries (via /connect.oracle.v2.Query/GetPrice) would still work, the ability to discover what pairs are actually supported is completely broken; making it impossible to programmatically determine which pairs are valid without hardcoding them.
Issue is in the query whitelist configuration in app/keepers/keepers.go:
The genesis state initialization in app/genesis.go that depends on this functionality:
When clients attempt to query /connect.oracle.v2.Query/GetAllCurrencyPairs, the request will fail because:
Correct the request type in the query whitelist configuration:
hoon (Initia) commented:
beer-1 (Initia) confirmed, but disagreed with severity and commented:
LSDan (judge) commented:
For this audit, 4 reports were submitted by wardens detailing low risk and non-critical issues. The report highlighted below by Rhaydden received the top score from the judge.
The following wardens also submitted reports: 0xluk3, Heavyweight_hunters, and SadBase.
Note: C4 excluded the invalid entries determined by the judge from this report.
