function isWhiteListed(address pool) internal {
if (!whitelistedPools[pool]) {
require(masterDeployer.pools(pool), "INVALID POOL");
whitelistedPools[pool] = true;
}
}
The name isWhiteListed(pool) implies that it returns a bool value that indicates whether the pool is whitelisted. However, it actually reverts when it's not whitelisted.
Consider changing the name to requireWhiteListed(pool).
Handle
WatchPug
Vulnerability details
https://github.com/sushiswap/trident/blob/9f949d9bddf7f12775e0c6ae641e9305c4762ea2/contracts/TridentRouter.sol#L357-L362
The name
isWhiteListed(pool)
implies that it returns a bool value that indicates whether the pool is whitelisted. However, it actually reverts when it's not whitelisted.Consider changing the name to
requireWhiteListed(pool)
.