InstantPool

link to InstantPool source code (will update when protocol goes live)

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

function pause() external onlyRole(PAUSE_ROLE)

Pauses the InstantPool contract.

unpause

function unpause() external onlyRole(UNPAUSE_ROLE) 

Unpauses the InstantPool contract.

Last updated