A raffle game on meter protocol where participants purchase a ticket by sending $MTR to the contract. Once it reaches the player limit, a random participant wins all $MTR (minus the house fee, which can be changed by the contract owner).

Our core goals for the project are: Help all types of users to increase their earnings choosing to participate in a raffle. To facilitate the increase of participant’s returns based on chance and probability To leverage the Meter protocol properties such as everyday payments, and its fast, decentralized network. To drive mainstream DeFi adoption through gamification.

Problems which may be solved by blockchain in this industry: Transparency issues: All transactions can be monitored publicly on the meter protocol by anyone. Geographical limits: Depending on the necessities of the raffle creator, there are technically no limitations in terms of geography. A raffle could be launched worldwide. Anonymity: You just need your wallet in order to participate, you do not need to give your personal information in order to participate. Decentralization: Anyone can start a raffle without the necessity of having an organization processing every step in the transaction. All these are given by the contract.

Any user can create a raffle. A use case would be influencers or NFT artists which may want to engage their communities. An user can participate in several raffles, and in each raffle have several tickets

How does it work?

A raffle owner register a new raffle, and edit the proper information related to it such as: name, amounts, price per ticket in $MTR, maximum number of distributed tickets, among others.

Participants can purchase a ticket for the proposed price. The assets collected from sold tickets are stored together. The raffle is then connected with randomness in order to get the winning number. After this process is finished one user is rewarded.

When someone create a raffle, the cost for these raffle is gonna be the ( AmountRewarded + 2 MTR ), this "2 MTR" is the cost for using the smart contract, this value can change in the future for less or higer values of MTR, may be less than 2 MTR

Benefits offered by a peer-to-contract raffle

Transparency. The process for picking a raffle is fully transparent and verifiable since all the code running the contract is publicly available. The terms of the raffle are determined in the contract by a random factor. It is decentralized. As a peer-to-contract raffle, any transaction can be monitored publicly by anyone on the meter network. Any user could create a raffle, no organization or individual would be managing the raffle but the contract.

How we built it

After analyzing the requirements from the Meter hackathon, defining our problem statements, we decided to create the raffle and the smart contract

We built an ERC20 Token for the raffle and the Seller smart contract for that Token.

The stack includes Node.js, Solidity, Hardhat, Remix IDE on Meter Protocol. The should work in several raffles at the same time

Challenges we ran into

Some challenges include: Nested data in solidity, Create a Raffle/Lottery system, Multi ticket and Multi raffle system creation, deleting data in an array in solidity, complex flows for update values

Accomplishments that we're proud of # What we learned

To explore the latest version of solidity ( ^0.8.0;), to understand how it works. One nice finding was how to retrieve data in a single public view function. At last, to learn and implement how to publish it in the meter chain. The solidity code was finished roughly in 1 or 2 days.

What's next for Beehive

To do some improvements on the generate random numbers functions, as we faced some limitations for the meter protocol. It is most likely that an Oracle should be needed. For the moment, we can use some things like airdrop flows with "X" random time and run the function ( with this gonna be more random, but the idea is to improve that part).

To build more products

To deploy the code to send the amount of the tickets tickets selled - reward amount

Hypothesis

If we offer an automated Lottery system for new users when raffles, they could offer more transparent and decentralized winning methods.

Built With

Share this project:

Updates