Table of Contents
Perp* Raffle is an alternative take on NFT Raffle, which provides fair value to all the parties in the Raffle. People can get slots in the Raffle by just staking their ETH for a certain period of time which is a far cry from the traditional Raffles in which the Raffle operator makes away with huge payday without providing much value to the process. In Perp*, the operator's revenue source comes from lending the ETH provided by the people, which is returned to them fully or partially at the end of the staking period.
Instead of the Raffle being a one-off for a single NFT, there are multiple rounds i.e it is Perpetual! Each round has a single NFT with a single winner. And if the person stakes the ETH for more than one round, they are eligible for free slots in each subsequent round (compund interest? but for slots in the raffle).The free slots are not eligible for refunding/unstaking, the best part about these slots are that they can be carried on for further rounds even if they completely unstake their initial ETH. (win-win situation)
Each round is divided into phases:
-
Waiting Period:
- For the first round, this only involves sending an NFT to the Raffle contract which initializes all the parameters needed for its functioning.
- In the next rounds, making a VRF coordinator call to Chainlink, waiting for the result and picking a winner is all part of this phase.
- A winner is chosen based on the random string returned by Chainlink oracle and a new round is started by an NFT drop to the contract and the process continues...
-
Funding Period:
- This is the phase in which the users' can stake/unstake their ETH and get slots.
- Reedeming of free slots takes place in this phase.
-
Lock Period:
- This is the part which is totally upto the Raffle operator to decide on. They can generate income by sending the staked funds to Lending platforms or any DeFi app that can give sufficient yield to offset the initial cost of setting up the Raffle.
- The users' cannot stake/unstake their funds during this phase, they need to wait until the next funding phase.
Currently the timeframe for each phase is implemented as shown in the above diagram, with the exception being that waiting period depends on the delay introduced by the operator.
Perp* Raffle is made using open-source projects that you know and trust
To get a local copy up and running follow these simple example steps.
- brownie
python3 -m pip install --user pipx python3 -m pipx ensurepath # restart your terminal pipx install eth-brownie
-
Clone the repo
git clone https://github.com/merkle-groot/blockchain-developer-bootcamp-final-project.git
-
Install dependencies
cd blockchain-developer-bootcamp-final-project pip install -r requirements.txt
-
Get Ganache-gui/cli and run it it separately on port :8545
-
Run the tests
brownie test
- Navigate into the client folder
cd client
- Install all the required npm packages
yarn install
- Run the React Project
yarn start
- The current deployed site is accessible from this vercel deployment
- Make sure to switch your network to Kovan Testnet in Metamask before interacting with the project!
- Write Smart-Contracts
- Test the code
- Deploy it to Kovan
- Add a front-end to interact with it
- Improve the UX/UI
- Write Treasury function for blue chip lending platforms
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the GNU GPL License. See LICENSE.txt
for more information.
Vishnu Prakash - @0x1379 - [email protected] Ethereum Address - 0xFcC5C92C49730EA2de4911EFEc6a6B8Cec229575
Inspired by Waffle Project