Skip to content

IPromiseSmartContract/TokemonGo

Repository files navigation

TokemonGo: Play, Support, Invest and Prosper

alt text

Introduction: A Game Integrating GameFi and SocialFi by Dyson Finanance & Mint Club

TokemonGo merges cryptocurrency and gaming, allowing players to bet on crypto combinations against others, with victories determined by asset value. It enhances earnings through Dyson Finance and incorporates SocialFi elements by engaging fans through Mint Club tokens, all within a secure USDC-based economy.

Game Process

  • Game Setup: The Master sets a game collateral threshold, such as 100 USDC, and the game's deadline.
  • Token Combination For Master: Master create a token combination equal to the value of 100 USDC (for example, 0.01 ETH and 0.001 BTC = Total 100 USDC).
  • Token Combination For Challenger Challengers can stake 100 USDC to propose a better token combination.
  • Who will Win? The winner is the one with the higher value asset combination when the game time ends.

Yield Generation:

  • Enhancing Yields with Dyson: the game duration exceeds one day, staked assets are invested in Dyson Finance through dual investment strategies.** This generates yields for GameFi, SocialFi, and NFT DApps, enhancing the overall value and engagement within the ecosystem.** alt text alt text

  • Test Insight: Test results from running AutoDepositDysonTest.ts illustrate that with a 10u stake from each player, TokemonGo successfully generates a yield of 💰0.293 USDC through Dyson Finance.

To run the test yourself and observe the yield generation in action, follow the instructions below:

For installation details and initial setup, please refer to the How To Run? section. Once setup is complete, execute the following command to run the specific test:

pnpm --filter tokemon-go-contracts exec hardhat test test/AutoDepositDysonTest.ts

SocialFi Integration:

  • Fan Tokens: Mint Club is used to create fan tokens for Masters and Challengers, allowing the community to purchase fan tokens of the players they support and bet on their game outcomes.
  • Betting Limit: There is a maximum betting limit for each match to prevent potential manipulation.
  • Mechnism For Fans Token: When the game concludes, TokemonGo contract will interact with the Mint Club contract, burning the losing side's fan tokens in exchange for ETH, which will then be used to purchase the winning side's fan tokens, thereby increasing their value. alt text Circle USDC Integration:
  • TokemonGo innovatively uses Circle's USDC, merging the stability of traditional finance with the dynamic world of GameFi and SocialFi, to create a secure and efficient gaming economy.

Architecture

alt text

How To Run?

git clone https://github.com/IPromiseSmartContract/TokemonGo.git
cd TokemonGo
cp .env.example .env
# After copying the .env.example file to .env, you'll need to fill in the following fields in the .env file:
# SEP_URL = "" - The URL for your Sepolia Endpoint.
# SEPOLIA_PRIVATE_KEY="" - Your private key for the Sepolia network wallet.
# ETHER_SCAN_API_KEY="" - Your API key for Etherscan,.
# to install packages
pnpm install -r
pnpm -w run test 

Important Testing Note:

Due to the nature of forking test networks, running all tests simultaneously can lead to interference between them. To ensure accurate and reliable test results, it's recommended to run tests individually. This approach prevents potential conflicts and guarantees the integrity of the testing process.

For a comprehensive test with a single command, you can use:

pnpm -w run test 

Alternatively, to run specific tests independently and avoid any overlap, use the following commands:

pnpm --filter tokemon-go-contracts exec hardhat test test/TokemoGoTest.ts 
pnpm --filter tokemon-go-contracts exec hardhat test test/AutoDepositDysonTest.ts 

These steps ensure that each test is executed in isolation, providing clear and precise outcomes.

Deploy Contract

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published