The problem Lacheio solves
- Currently, the PoolTogether protocol only accepts USDC as a deposit to buy lottery tickets or have a chance to win prizes.
- In my project , The user can deposit ETH and stand a chance to win a lottery with his total amount deposited in the protocol till that time.
- At the time of staking money,the user can also set a goal for itself and unless that goal is satisfied, the user won't be able to withdraw his initial deposit.
- The Eth Deposited by the user will be added to a Vault/Pool and he/she can see his deposited eth on the profile section.
- For withdrawing, the user can directly withdraw his ETH .
- This is a no-loss protocol, in which users can save on their investments while standing a chance to win prizes each week.
- we get data of all the users who are participants of the pool and then using a random function we find 4 lucky winners,then we consider two parameters to choose the prize money for the winners i.e:
- To calculate prizes, we will consider two parameters:
- The number of days the user has deposited the ethers.
- The number of ethers deposited.
- The prizes will be given from the interest (APR) generated by the Eth Pools/Vaults.
- The prizes can be withdrawn from the Aave platform itself in which the user can exchange AWeth tokens for Eth Tokens.
- The prizes are kept in the pool itself unless the user withdraws hence,the initial deposit of the user + the interest generated will remain in the Pool/Vault itself which will continue generating more and more interest because once a rabbit falls in a hole, it’s very unlikely that it will get out of it and it’s very unlikely that a users will actually cashout their winnings.
Challenges I ran into
The prize calculations are done of-chain and dealing with BigNumbers is a bit pain,even still I can facing some issues.