InstantPool

Link to InstantPool source code on Ethereumarrow-up-right

InstantPool contract is responsible for the instant BONE payout. When user requests such instant payout, this contracts allows user to receive their BONE tokens instantly without creating a withdrawal request. The fee instantPoolUsageFee is applied to such payout.

Variables

bytes32 public constant PAUSE_ROLE = keccak256("PAUSE_ROLE"); - pauser role identifier bytes32 public constant UNPAUSE_ROLE = keccak256("UNPAUSE_ROLE"); - unpauser role identifier bytes32 public constant WITHDRAWER_ROLE = keccak256("WITHDRAWER_ROLE"); - withdrawer role identifier

Methods

initialize

function initialize(address _dao, address _knBONE) external initializer

Initializer function, not called after initialization. The following roles are granted:

  • DEFAULT_ADMIN_ROLE - DAO (admin)

  • WITHDRAWER_ROLE - KnBONE contract

withdraw

function withdraw(IERC20Upgradeable token, address receiver, uint256 amount) 
     external 
     whenNotPaused 
     onlyRole(WITHDRAWER_ROLE) 

Transfers the specified amount of the specified token (BONE) to receiver.

pause

Pauses the InstantPool contract.

unpause

Unpauses the InstantPool contract.

Last updated