Nezha
  • 🏠Introduction to Nezha
  • How nezha works
    • Stake to Win
    • Nezha Epochs
    • Yield Farmer
  • Tickets
    • Stake per Ticket
    • Tickets
    • Bonus Tickets
    • Ticket Generation
  • The Draw
    • The Draw
    • Winning Sequence
    • No Draw Scenario
  • Prizes
    • Prize Tiers
    • Prizes
  • Fees
    • Staking
    • Unstaking
    • Claiming Prizes
  • Risks & Mitigations
    • Smart Contracts
    • Low Yield Returns
    • Negative Yield Returns
    • Tickets Outside Solana
    • Insurance Costs
  • Architecture
    • Overview
    • Game Contract
      • Epoch States
      • Token Accounts
      • State Accounts
      • Initialisation Instructions
      • State Transition Instructions
      • Other Instructions
      • Roles & Capabilities
      • Derived Account Roles
    • Draw Contract
      • State Accounts
      • Instructions
      • Roles & Capabilities
      • Derived Accounts
Powered by GitBook
On this page
  • Epochs
  • At the start of each epoch:
  • During the epoch:
  • At the end of the epoch:
  • After the end of the last epoch and before the next epoch
  • At the start of the next epoch:
  1. How nezha works

Nezha Epochs

Epochs are the weekly cycle at the heart of Nezha.

PreviousStake to WinNextYield Farmer

Last updated 1 year ago

Epochs

To enter an epoch, participants must have earlier staked USDC into Nezha. Staked USDC automatically enters each weekly epoch.

An epoch is a period of time when Nezha locks stakes and transfers them to a yield farm to generate yield. A new epoch starts once a week and lasts just under a week.

At the start of each epoch:

Nezha generates a number of ticket according the ticket price and the amount staked. Tickets are a sequence of numbers of 6 numbers which are randomly generated for a participant. Alternatively, participants can chose the numbers for one of their tickets.

  • Tickets are stored on-chain in so participants can check the tickets against their wallet address. The tickets are locked at the start of the epoch and cannot be changed.

  • The Nezha smart contract transfers staked USDC to a yield farming pool

During the epoch:

Staked USDC is locked for the duration of the epoch and earns interest in a yield farming protocol.

Participants may submit request unstake their USDC. As stakes are locked during the epoch, unstake requests are queued and automatically actioned by Nezha at the end of the epoch.

You can stake additional USDC but you will not be allocated tickets until the next epoch.

At the end of the epoch:

Nezha retrieves the staked USDC and interest from the yield farmer and uses it to fund a prize pool.

Nezha then compares participants tickets against the winning sequence to determine who has fully or partially matching tickets (“winning tickets”). The Nezha prize pool is distributed according to the Nezha Distribution Rules.

Following distribution, participants can claim their prizes immediately. Prizes can be claimed at any time and can only be claimed by the wallet owner.

After the end of the last epoch and before the next epoch

Unstake requests queued during the epoch are now automatically processed.

At the start of the next epoch:

All staked USDC automatically enters the new epoch. Nezha generates new tickets for all participants and the epoch cycle resumes.

The Nezha smart contract then uses (a Solana on-chain source of verifiable randomness) to generate the winning number sequence.

Arweave
Switchboard