This isListedPool check implemented by isPool() is missing in many functions of the contract that accept pool/token addresses from users. getPool() returns the default mapping value of 0 for token that do not have valid pools. This lack of input validation may lead to use of zero/invalid pool addresses in the protocol context and reverts in the best case or burn/loss of user funds in the worst case.
Recommend combine isPool() isListedPool check to getPool() so that it always returns a valid/listed pool in the protocol.
verifyfirst (Spartan) acknowledged and confirmed:
