Vibe
  • introduction
    • What is Vibe Launchpad?
    • Fees
  • protocol
    • Deployed Contracts
    • Contracts
      • Factory
      • FeeHandler
      • LPTokenHolder
    • Lottery Mechanism
    • Security
  • DISCLAIMER
    • Terms of Service
    • Privacy Policy
Powered by GitBook
On this page
  1. protocol
  2. Contracts

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:

  1. A token creator has earned a portion of trading fees.

  2. A user wins the lottery.

This function will transfer all accrued ETH to the caller.

function collectETH() external returns (uint256 ethReceived)

buyTickets

Buy tickets for the ongoing lottery in exchange for ETH.

function buyTickets() external payable

donateToPot

Donate ETH to the ongoing lottery.

function donateToPot() external payable

commitCrowdEntropy

Commits one source of entropy for the specified jackpotId. Can be called by anyone.

function commitCrowdEntropy(uint256 jackpotId) external

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.

function awardJackpot(uint256 jackpotId, bytes32 adminEntropy) external

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.

function forceAwardJackpot(uint256 jackpotId) external

PreviousFactoryNextLPTokenHolder

Last updated 5 months ago