An external Whitelist module that Ion's system-wide contracts can use to verify that a user is permitted to borrow or lend. A merkle whitelist is used to allow for a large number of addresses to be whitelisted without consuming infordinate amounts of gas for the updates. There is also a protocol whitelist that can be used to allow for a protocol controlled address to bypass the merkle proof check. These protocol-controlled contract are expected to perform whitelist checks themsleves on their own entrypoints.
The full merkle tree is stored off-chain and only the root is stored on-chain.
State Variables
protocolWhitelist
mapping(address protocolControlledAddress => bool) public protocolWhitelist;
borrowersRoot
mapping(uint8 ilkIndex => bytes32) public borrowersRoot;