Summary
MetavaultsRegistry::unregisterMarketByIndex() don't check that the index matches the expected market, which may lead to issues if called twice in a row.
Vulnerability Detail
As MetavaultsRegistry::unregisterMarketByIndex() doesn't check the market, if 2 calls are made consecutively, they may arrive at the blockchain in different order, and remove the wrong markets (array popping changes order).
Impact
Code Snippet
Tool Used
Manual Review
Recommendation
Send the expected market as argument to verify.