E-Shagun

E-Shagun

Empowering Envelopes - The Joy of Gifting

168
Built at Unfold 2023
E-Shagun

E-Shagun

Empowering Envelopes - The Joy of Gifting

The problem E-Shagun solves

As the festive season is banging on the door we wanted people to experience the joy of sharing “Shagun ke Lifafe” but on-chain. And this “Shagun ke Lifafe“ brings way more fun experience of sharing gifts to your loved ones. You can now share Gift Envelopes to your friends and family all-together in a 1-to-many fashion in a randomised way.

We also created a very engaging game that goes alongside. In this game a user can create an Envelope filled with amount of money specified the creator of that envelope. There is a Buy-In amount also specified by the creator of the envelope through which other users can participate in that Envelope Lottery game. The amount of the money inside the envelope keeps increasing as per the number of players who buys-in the envelope. A small cut of the buy-in amount per user is rewarder to the creator of the envelope for their initiative. And another incentive for the creator is to bring in more number of users to participate in the game as they will earn more as per the number of participants which in-turn is a great incentive for the platform, which also takes a very small cut from the buy-in amount.

We have created a loyalty points system for more user-retention and engagement. Their loyalty will in-turn incentivise them as their loyalty points will give them more odds of winning the envelope lottery based on our Weighted Random Distribution method of the amount of the envelope. You can refer to the flowchart attached below to understand more about the Weighted Random Distribution method.

Challenges we ran into

The main challenges which we ran into were smart contract based.

  1. We faced issues in creating the basic Red Envelope Smart Contract as we wanted to implement it in a 1-to-many fashion as well as the distribution of the Red Envelope’s Amount would be randomised. The biggest issue was to send a Red Envelope not just the amount to the receiver’s address.

    We solved this issue by enabling the user to create a Red Envelope and allow him to share it via mail or text message. The receiver will receive the Red Envelope and will be able to experience the joy of opening the envelope.

  2. Then we faced major issues in creating the game developed on top of the red envelopes. Major pain point was figuring out Weighted Random Distribution technique.

    We came across this issue and managed to code the logic on chain itself, please refer to https://github.com/issa-me-sush/unfoldhack/blob/main/contracts/source/PublicEnvelope.sol on how we targeted this issue.

  3. We wanted to incentivise the players to keep playing and promoting our game, so to figure out the strategy behind it was big task.

    We came up with loyalty points inside our game, which incentivises the player to keep playing more and more. Refer to the flowchart attached above.

Tracks Applied (2)

okto - Red Envelope Smart Contract Track

We built this projection by taking the inspiration from the OKTO - RED ENVELOPE SMART CONTRACT Track.

okto

Beginner: C-Chain EVM Track

We've chosen to use Avalanche's C-Chain (Contract Chain) for our project. This chain is specifically designed to host Et...Read More

Avalanche

Cheer Project

Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.

Discussion