A yield farming project backed by a fully integrated NFT gamification system with randomised traits


This project solves the problem of the lack of real value behind most yield farming projects' native reward token, through the power of NFTs. Featuring a carefully-designed collectible system with random traits using a variety of Clams that can in turn generate different types of Pearls, these NFTs can only be minted by burning the native reward token. The collectible system is itself designed to be robust enough to be a standalone game. The mechanics are designed to entice people to continuously mint new NFTs, and the game encourages people to continue staking in the yield farming pools. The aim of the project is to become a lucrative yield farm and an addictive NFT game at the same time. The platform is built on Binance Smart Chain due to significantly lower gas costs. Like all yield farms, the ecosystem begins with an initial distribution of the native tokens, which can then be staked in pre-determined pools for rewards. This is accessible through the "bank" building on our main interface. To simply things for the hackathon MVP, we have simply minted $PEARL BEP-20 tokens in order to demonstrate functional yield farming features. You can deposit $PEARL tokens into the $PEARL pools for inflationary $PEARL rewards. Most existing yield farms stop there, without finding a real use case for the inflationary reward token. With ClamSwap, the $PEARL tokens are the crucial in-game currency for the NFT game. Accessible through the "Clam Farm" building is an interface through which the user can spend 500 $PEARL to mint a Clam NFT with randomised traits (and matching artwork). That Clam NFT can itself be attached with another 50 $PEARL and staked into a farming pool to generate Pearl NFTs, which also have randomised traits. These Pearls drop randomly within a given time range when the Clam is staked. To claim generated Pearls, you need to spend the 50 $PEARL attached to the Clam. In this way, if you want to play the NFT game, you must spend $PEARL. However, unlike traditional games, the Clams and Pearls generated have direct value tied to yield farming, and can be sold / traded. 90% of the $PEARL spent on minting Clams or Pearls is burned, while 10% is forwarded to a treasury wallet as an income stream. In this way the project will have a regular income to fund further development and marketing while most of the inflationary supply in the $PEARL token is being burned as people play the game. Clam NFTs have a limited lifespan expressed in the number of Pearls it is able to produce. Once the last Pearl is produced, it is considered dead, but will remain tradeable as an NFT. The Clam and Pearl NFTs currently in the user's wallet can be viewed in the "Storage Vault" interface. Clam NFTs staked into the Clam Farm can be viewed from the Clam Farm interface. There are other mechanics in the game that will likely not make it into the hackathon MVP simply due to time restraints. These include things such as: - ability to purchase booster items that affect the chances of getting particular traits, extends clam lifespan, reduces Pearl production time etc - ability for the yield farming pools to affect the Clam pools in terms of Pearl generation speed, traits etc; - ability for the Clam pools to affect the yield farming pools in terms of the yield generated; - rare additional traits (such as glow) that have a very small chance of manifesting in any Clam / Pearl; There is also a plan for a built-in marketplace to directly trade Clams / Pearls with each other or purchase them with $PEARL.

ClamSwap showcase

How it's made

We used the hardhat framework to leverage smart contract development. Smart contract code is written in solidity, using the standard BEP-20 and theBEP-1155 token standards from the Open Zeppelin library. We have been inspired and reference the smart contract code architecture from Goose Finance and Alpaca City. The frontend is built with React and hosted on Firebase. The map and clam / pearl models are made using Unreal Engine.

Technologies used