Skip to content
No Loss Lottery System on Voi Network

No Loss Lottery System on Voi Network

Build a No Loss Lottery System Utilizing Multiple Yeild Generation Sources on Voi Network

Created on 1st March 2025

No Loss Lottery System on Voi Network

No Loss Lottery System on Voi Network

Build a No Loss Lottery System Utilizing Multiple Yeild Generation Sources on Voi Network

The problem No Loss Lottery System on Voi Network solves

The no-loss lottery offers higher-yield rewards compared to direct participation in yield-generating sources such as liquid staking tokens, liquidity pools, and lending protocols. Currently, liquid staking tokens generate yield through proof-of-stake validator block rewards, which incentivize token holders. The selection process was previously conducted offline using pseudo-random numbers to determine a winner based on token holdings. However, this solution leverages on-chain randomness to select a winner at the end of the deadline, ensuring transparency and fairness.

User Interaction and Data Flow

A user will interact with the project through a dapp or programmatically though the smart contracts. Interacting with project via dapp. 1. User connects wallet 2. User selects from available pool 3. User stakes the staking token in exchange for tickets which are ordered and used to determine the winner after the deadline. A TicketPurchased event is emitted and the contract state is updated. 4. At the end of the deadline a user may withdraw all of the staked tokens without affecting ticket positions. In addition, any user may initiate the winner selection transaction that is predetermined by a random number after the deadline but prior to the selection. 5. The user that is selected receives all of the predetermined rewards. Any yield generated throughout the process is used to fund a new pool. Interaction with project via smart contract 1. User makes interacts with smart contract through ABI

The project architecture and development process

The solution consists of a lottery system and randomnesss beacon smart contract implementations as well as a web interface with wallet connect. Core functionality include: non-custodial staking and on-chain randomness. The solution interacts with ERC20-like smart contract tokens (https://arc.algorand.foundation/ARCs/arc-0200) on Voi Network (https://ecosystem.voi.network/).

Product Integrations

None

Key differentiators and uniqueness of the project

The project primarily offers no-loss staking for rewards with a short-term lockup, such as pools lasting a week. While PoolTogether ecosystem apps were considered, this project differs in several key ways:

Lockup Period: Unlike other solutions, this project requires users to keep their deposits locked for a set duration.
Ordered Deposits for Winner Selection: Instead of purely randomized selection, deposits are structured in an ordered manner to influence the winner determination process.
Non-EVM Chain Focus: The project is designed for a non-EVM blockchain, with potential future expansion to EVM-compatible chains and beyond.
This approach ensures a unique and transparent mechanism while broadening accessibility across blockchain ecosystems.

Trade-offs and shortcuts while building

The primary trade-off during development was the decision to deploy first on Voi Network, leveraging familiarity with the ecosystem, despite the initial design being geared toward Solidity and the EVM.

Key considerations and optimizations:

Ticket Storage Efficiency: Instead of using Merkle trees for efficient ticket storage, a simpler range-based approach was implemented for expediency.
On-Chain Randomness: Unlike EVM-based networks that offer services like Chainlink VRF, Voi Network lacked built-in randomness providers. As a result, a custom randomness solution was developed.
Decentralizing the Randomness Beacon: While the current implementation is functional, future improvements could involve incentivizing validators to contribute to randomness generation, making it more decentralized.
UI and Cross-Chain Expansion: The user interface is planned to be enhanced with cross-chain capabilities, allowing seamless interaction across multiple blockchain networks.
These trade-offs allowed for a faster initial deployment while leaving room for future optimizations and decentralization improvements.

Additional Features

The project was started on the day before the deadline inspired by an exercise in CampBuidl.

Tracks Applied (1)

Best use of Chainlink CCIP

Use of on chain randomness for lotter selection
Chainlink

Chainlink

Technologies used

Discussion

Builders also viewed

See more projects on Devfolio