FeeHandler
The FeeHandler
contract handles all fees earned by the protocol. Additionally, the protocol's lottery mechanism also resides in this contract.
Public Functions
collectETH
Called by users to collect ETH from the protocol. ETH can accrue to users in two ways:
A token creator has earned a portion of trading fees.
A user wins the lottery.
This function will transfer all accrued ETH to the caller.
buyTickets
Buy tickets for the ongoing lottery in exchange for ETH.
donateToPot
Donate ETH to the ongoing lottery.
commitCrowdEntropy
Commits one source of entropy for the specified jackpotId
. Can be called by anyone.
awardJackpot
Pays out the lottery to the winner for the specified jackpotId
. Should only called by the protocol admin as users will not know the value of adminEntropy
.
forceAwardJackpot
Forcefully pays out the lottery to the winner for the specified jackpotId
. Can be called by anyone if awardJackpot()
is not called after an extended period of time.
Last updated