Pool factory


this implements the Pool factory contract which allows any user to easily configure and deploy their own Pool

it relies on a system of sub-factories which are responsible for the creation of underlying staking and reward modules. This primary factory calls each module factory and assembles the overall Pool contract.

this contract also manages the module factory whitelist.

constructor(address gysr_, address config_) (public)


  • gysr_: address of GYSR token

  • config_: address of configuration contract

create(address staking, address reward, bytes stakingdata, bytes rewarddata) → address (external)

create a new Pool


  • staking: address of factory that will be used to create staking module

  • reward: address of factory that will be used to create reward module

  • stakingdata: construction data for staking module factory

  • rewarddata: construction data for reward module factory


  • address of newly created Pool

setWhitelist(address factory_, uint256 type_) (external)

set the whitelist status of a module factory


  • factory_: address of module factory

  • type_: updated whitelist status for module

count() → uint256 (public)


  • total number of Pools created by the factory


PoolCreated(address user, address pool)

WhitelistUpdated(address factory, uint256 previous, uint256 updated)