Inspiration

The inspiration comes from other projects, mainly from the Famous Fox Federation on Solana. This idea of providing several useful/funny dApps to the whole community while benefiting to NFT holders.

What it does

Currently a user can mint an Obake NFT, stake it, claim rewards, unstake the NFT. A user can also start a raffle to sell an NFT (ERC721), by selling tickets at a given price, or join an existing raffle and try to win an NFT. Besides a user can play the coin flip game to try to double its bet.

From every win and successful raffle (all tickets sold out), a small fee is collected. This fee will be handled by a funds manager contract. This contract is in charge of swapping FTM to LINK using SpookySwap, but also fund the staking contract.

You can find more info in the dedicated gitbook here

There is a demo website, but I must warn you that this app is not responsive yet, it is better on a computer.

How we built it

The smart contracts were written in Solidity, one at a time, using Hardhat. Testing simple code at first, running mocha tests in javascript. Progressively all smart contracts were joined together, and integration tests were performed.

For the frontend, I used useDapp (with React) which is very convenient and helped me a lot for the wallet connection, the transactions and the queries. From time to time, the transactions and queries were coded without hooks to not break the rule of hooks. To list NFTs of an account I used covalent, which is not very convenient since it's not an NFT API. However on the mainnet we can use Moralis, I am happy about it.

Challenges we ran into

The main challenges for me were related to the frontend development. I had no real experience before, so I didn't know much of CSS, React and Typescript.

The challenge for the smart contracts were mainly related to question : How do I make it the most decentralize as much as I can ? There were so many ideas, but few time to implement, I had to choose just a few in order to have an MVP.

Accomplishments that we're proud of

I am mainly proud to have built the dApp almost from scratch, learning every day. It was a challenge for me to code the frontend part, and there are still many improvement that can be done, yet I am proud of all those hours learning and coding.

I am proud that the dApp can run by itself. No intervention from the contract owner is needed, and this is the main goal I wanted to achieve, to have a decentralized distribution to holders. Of course, more tests are needed to ensure it can last as much time without any owner intervention (I am thinking about the Link balance in the random contract mainly)

What we learned

I have learned to use :

  • ChainLink in smart contracts
  • Typescript
  • React (even tough I am still a beginner)
  • Styled components
  • Covalent API

What's next for Obake

Currently the UI is very simple. So the main short-term goal would be to update the UI. Additionally some bugs in the frontend need to be corrected. Also the app needs to be responsive.

Secondly more integration tests are needed for both the smart contracts and the frontend. Probably audits would be necessary.

Then, the long-term purpose is to add other dApps such as auctions, games, .. All this to attract users and generate more revenues for Obake NFT holders. The contracts will need to be modular in that sense.

I am also thinking about a DAO, to make it the most decentralized way possible. But let's do all that one step at a time. :)

Built With

Share this project:

Updates