PoolingStakingContractV2

notice

Contract acts as delegate for sub-stakers*

methods

BASIS_FRACTION()

notice

Defines base fraction and precision of worker fraction. E.g., for a value of 10000, a worker fraction of 100 represents 1% of reward (100/10000)

depositTokens(uint256)

notice

Transfer tokens as delegator

params

_value

Amount of tokens to transfer

getAvailableDelegatorETH(address)

notice

Get available ether for delegator

getAvailableDelegatorReward(address)

notice

Get available reward in tokens for delegator

getAvailableReward()

notice

Get available reward for all delegators and owner

getAvailableWorkerReward()

notice

Get available reward in tokens for worker node owner

getCumulativeReward()

notice

Get cumulative reward. Available and withdrawn reward together to use in delegator/owner reward calculations

getWorkerFraction()

notice

Calculate worker’s fraction depending on deposited tokens Override to implement dynamic worker fraction.

initialize(address)

params

_router

Interface router contract address

initialize(uint256,address,address)

notice

Initialize function for using with OpenZeppelin proxy

params

_router

StakingInterfaceRouter address

_workerFraction

Share of token reward that worker node owner will get. Use value up to BASIS_FRACTION (10000), if _workerFraction = BASIS_FRACTION -> means 100% reward as commission. For example, 100 worker fraction is 1% of reward

_workerOwner

Owner of worker node, only this address can withdraw worker commission

isDepositAllowed()

notice

deposit() is allowed

isFallbackAllowed()

notice

Calling fallback function is allowed only for the owner

isOwner()

returns

_0

true if msg.sender is the owner of the contract.

isWithdrawAllAllowed()

notice

withdrawAll() is allowed

owner()

returns

_0

the address of the owner.

renounceOwnership()

details

Allows the current owner to relinquish control of the contract.

notice

Renouncing to ownership will leave the contract without an owner. It will not be possible to call the functions with the onlyOwner modifier anymore.

router()

details

Returns address of StakingInterfaceRouter

setWorkerOwner(address)

notice

Set worker owner address

transferOwnership(address)

details

Allows the current owner to transfer control of the contract to a newOwner.

params

newOwner

The address to transfer ownership to.

withdrawAll()

notice

Withdraw reward, deposit and fee to delegator

withdrawETH()

notice

Withdraw available amount of ETH to delegator

withdrawTokens(uint256)

notice

Withdraw reward to delegator

params

_value

Amount of tokens to withdraw

withdrawWorkerReward()

notice

Withdraw reward in tokens to worker node owner