Compound V2 - New Market with Zero Liquidity
use Call, Events, Len from hexagate;
source unitroller: address = <provide the unitroller address>;
source newMarket: list<tuple<address>> = Events {
contract: unitroller,
signature: "event MarketListed(address rToken)"
};
source rToken: address = newMarket[0][0];
source supply: integer = Call {
contract: rToken,
signature: "function totalSupply() returns (uint256)"
};
rule {
description: "New market listed but supply is zero - CRITICAL: add supply",
condition: Len { sequence: newMarket } > 0 ? supply > 0 : true
};Last updated