Vite Hackathon · View Demo · Request Feature
Table of Contents
Sunk Cost Game is a fun DAPP similar to Fomo3D for rewarding lucky Vite users.
It's a Work In Progress.
- Solidity++
- ViteJS
- Mocha
- Chai
- React
At the time of contract deployment the owner/creator sets a PotCreation Fee (Amount to be given to create a Pot). This fee can be seen as the protocol incentives.
The contract consists of mainly 3 restricted owner functions
The game mainly consists of 3 functions
struct Pot {
address PotOwner; //Pot Creator address
uint256 maxTimerLimit; // max limit by which players can extend the expiration time of Pot by buying in the pot
uint256 buyInIncrementAmount; //Increment Amount of pot value at each buy in
uint256 burnAmount; //amount of token burned at each buy in
uint256 extensionAmount; //Time period extension at each buy in
address winner; //current winner or buyer of Pot
uint256 potAmount; //Current Pot Reward
uint256 currentPrice; //Current Amount required to buy the pot
vitetoken tokenId; //Token Used for buying the pot
uint256 start; //start timestamp og Pot
uint256 end; //end or expiration timestamp of pot
bool claimed; //claimed status of pot which tells if its reward has been claimed by winner or not
}
Clone the repo
git clone https://github.com/nilesh46/Sunk-Cost-Game-Vite.git
npm install
npm test
cd frontend
npm install
npm start