Inspiration
This project is inspired by common and viral social phenomenon of friendly wagers. Especially, this recent one by former Coinbase CTO Balaji's 1M BTC prediction: Balaji's tweet
It is hard to manage wagers in a decentralized trustless way. This kind of use case deserves to be facilitated by Defi. Hence, Fruit Bowl is built on Flow blockchain to solve this massive pain point.
What it does
Fruit Bowl enables hosts to start a BOWL (friendly wager), then to set an entry fee (flow fungible token) and potential outcomes for participants to choose from.
Then users pay the entry fee and make picks. All entry fees are added into a safe vault.
Later, host or judges decide the outcome. And smart contract distributes the vault split equally to the winners.
Fruit Bowl keeps the wagers in the vault safely and smart contract keeps track of the interactions transparently on-chain. Upon host / judges decision, smart contract distributes the vault split equally to the winners.
How we built it
We built on Flow blockchain with Candence smart contract to keep wagers in a safe vault and distribute prizes to the winners accordingly. Frontend is built using NextJS and Flow fcl.js to interact with the contracts.
Challenges we ran into
It took a bit of debugging to learn about types when interacting with fcl.js for scripts and transactions. Types are great for early detections of errors.
Needed to learn how to setup vault dynamically for a specific token by skimming through a few Flow codebases on github.
Accomplishments that we're proud of
We were able to pick up Cadence quickly to built a working POC with reference to various Flow learning materials available.
Starting with rapid prototyping in the Flow playground and emulator, playground link which is awesome for beginners like us ... contracts are now published to testnet Fruit contract on testnet
What we learned
- Importance of trustlessness in P2P interactions
- Power of escrow capabilities using Flow vaults
- Flow's potential to onboard massive userbase to blockchain power with its walletless onboarding
What's next for Fruit Bowl - fun social defi dapp for friendly wagers
- Streamline and improve the UX
- Add test coverage
- Get ready for mainnet launch.
Built With
- cadence
- flow
- nextjs
Log in or sign up for Devpost to join the conversation.