description |
---|
Whitelist is a module that manages all restrictions set by the system admin. |
Whitelist is a module that manages all restrictions set by the system admin. These restrictions include:
- Product type: manages if a unique combination of strike - asset - collateral - put/call type is valid to be created and register in the system
- Collateral type: manages if a collateral asset is whitelisted to be used in the system.
- oToken address: manages if a oToken contract is created by our factory and valid to be used as collateral (or longOToken) in a position.
- Callee address: in the operate function of Controller, users can pass in multiple actions and do all in one single transaction. The Call action type allows the user to do arbitrary contract calls to external contracts. In the early stage of the protocol we will maintain a whitelisted callee address mapping that determines if the external contract is safe to call. This restriction can later be removed by turning off the restricted mode in the Controller.
check if a product is whitelisted.
Parameters:
_underlying
: asset that the option references_strike
: asset that the strike price is denominated in_collateral
: asset that is held as collateral against short/written options_isPut
: is this a put option, if not it is a call
Return Values:
- true if product is whitelisted
check if the collateral is whitelisted
Parameters:
_collateral
: asset that is held as collateral against short/written options
Return Values:
- true if the collateral is whitelisted
check if an otoken is whitelisted
Parameters:
_otoken
: otoken address
Return Values:
- true if otoken is whitelisted
check if a callee address is whitelisted for call acton
Parameters:
_callee
: destination address
Return Values:
- true if address is whitelisted
allow owner to whitelist product. Can only be called from owner address
Parameters:
_underlying
: asset that the option references_strike
: asset that the strike price is denominated in_collateral
: asset that is held as collateral against short/written options_isPut
: is this a put option, if not it is a call
allow owner to blacklist product a product. Can only be called from owner address
Parameters:
_underlying
: asset that the option references_strike
: asset that the strike price is denominated in_collateral
: asset that is held as collateral against short/written options_isPut
: is this a put option, if not it is a call
whitelist a collateral address, can only be called by owner. Can only be called by owner
Parameters:
_collateral
: collateral asset address
whitelist a collateral address, can only be called by owner. Can only be called by owner
Parameters:
_collateral
: collateral asset address
allow Otoken Factory to whitelist a new option. can only be called from the Otoken Factory address
Parameters:
_otokenAddress
: otoken
allow owner to blacklist a new option. can only be called from the owner's address
Parameters:
_otokenAddress
: otoken
allow Owner to whitelisted a callee address. can only be called from the owner address
Parameters:
_callee
: callee address
allow owner to blacklist a destination address for call action
can only be called from the owner's address
Parameters:
_callee
: callee address
ProductWhitelisted(bytes32 productHash, address underlying, address strike, address collateral, bool isPut)
emitted when owner whitelist a product
ProductBlacklisted(bytes32 productHash, address underlying, address strike, address collateral, bool isPut)
emitted when owner blacklist a product
emits an event when a collateral address is whitelisted by the owner address
emits an event when a collateral address is blacklist by the owner address
emitted when Otoken Factory module whitelist an otoken
emitted when owner blacklist an otoken
emitted when owner whitelist a callee address
emitted when owner blacklist a callee address