Inspiration
We searched and found that most of the lottery projects are either still using web2, or most of them are general-purposed lottery. We think "Win a Punk" is cool and fun for everyone to play!
What it does
It’s simple. The lottery is opened round by round, there is always one round available at a time with a targeted CryptoPunk (which needs to be for sale).
You can bet multiple times with any amount of ETH you want. The probability is calculated based on the total amount you bet with your wallet.
When the total bet amount of the round hits the target (1.1 * sales price of the punk), the punk is purchased and a winner is randomly picked to claim the punk.
If the round is passed, everyone gets a full refund.
How we built it
It's our first blockchain project, we have 3 members worked on the contract and 1 member handled the front-end work. Multiple languages and frameworks are involved: sol/react/hardhat/VRF and etc.
Challenges we ran into
We found it's tricky to write full coverage tests and it took us a lot of time to figure out. Until we found https://github.com/smartcontractkit/hardhat-starter-kit and it's super helpful and easy to use. We are confident of the contract finally.
The gas fee optimization is also a big challenge for us.
Accomplishments that we're proud of
We successfully to make this thing work, and we are also quite confident about the security of the contract. Also we've made a huge progress to make sure the contract is gas-effecient.
This is the first time we work on a blockchain project and it's really fun! A lottery project sounds cheezy at first. But so what, we all have the enthusiasm in web3 and a high quality Punk lottery project is a fun start.
What we learned
This is the first blockchain project of our team. A lot has been learned. Chainlink plays a big part in this. We watched tons of the sessions and sharing videos. This project couldn't be finished without those. Big shoutout to chainlink folks.
What's next for Punk Gacha
We will launch the thing on the main net soon and start to advocate and form community around it. We are also seeking for partners.
Built With
- hardhat
- react
- solidity
- typescript
- vrf

Log in or sign up for Devpost to join the conversation.