POA Mania is a no-loss and non-custodial lottery where POA hodlers can win an extra slice of POA emission reward. Prizes are distributed to the winners every round.
- Read POA Mania Docs to understand the game rules.
- Read about POA randomness to see how cool it is.
Contract | Address |
---|---|
Proxy | 0xD9505dc188d0f6dC583143e5A97D8e8cF7c107e0 |
Implementation | 0x2300e0cd5d065d285236D7f55f6E2a19EB090C50 |
Contract | Address |
---|---|
Proxy | 0x9fa644CCF16cE358AFf9A86Cc2046a6C601b8F71 |
Implementation | 0x6f04Cf809fe42aa1a05d5B65B42540EF52aDBf5B |
Poa Mania was audited by Quantstamp. You can find the audit report here.
Clone the repo and then install dependencies:
$ npm i
$ npm i -g npx
To run the entire test suite:
$ npm test
To run deployment in interactive mode:
$ npx oz deploy
More about oz
commands here.
After deployment and initialization the 1st round is started.
Anyone can deposit()
and withdraw()
POA tokens during each round.
When the round time is over anyone can call nextRound()
: the winners of the current round will be selected and rewarded,
and the next round will be started. More details you can find in POA Mania Docs.
deposit()
withdraw()
withdraw(uint256 _amount)
nextRound()
The owner can only change the game parameters.
setRoundDuration(uint256 _roundDuration)
setFee(uint256 _fee)
setFeeReceiver(address _feeReceiver)
setJackpotShare(uint256 _jackpotShare)
setJackpotChance(uint256 _jackpotChance)
setExecutorShare(uint256 _executorShare)
setPrizeSizes(uint256[2] calldata _prizeSizes)
setBlockTime(uint256 _blockTime)
setMinDeposit(uint256 _minDeposit)
setMaxDeposit(uint256 _maxDeposit)
Proxy Admin (abolished, see renounceOwnership
transaction)
The Proxy Admin can upgrade the logic of the contracts. This role will be abolished after an audit and some testing time.
Note: All methods are described in code.
The project uses the modified library SortitionSumTreeFactory
with added total()
and numberOfNodes()
functions. You can find the modified implementation here: @poanetwork/kleros. These changes were not audited but they add minimal risk.