project screenshot 1
project screenshot 2
project screenshot 3

Mine your eggs

Mine your eggs idle gaming with blockchain, letting players mine unique ERC-403 NFTs. Use your PC's power to discover and trade rare eggs on nft marketplaces like OpenSea or dexes using the power of the ERC403.

Mine your eggs

Created At

ETHGlobal Brussels

Winner of

Morph - Innovation Track 2nd place

Project Description

An innovative idle mining game that merges the engaging mechanics of idle games with the transformative potential of blockchain technology. At its core, Mine your Eggs allows players to use their PC's processing power to mine unique and rare eggs, each represented as ERC-403 NFTs, a new Ethereum token standard combining features of ERC-1155 and ERC-20 that we have made for this hackaton.

How it's Made

Project Overview: Mine your eggs is a sophisticated integration of blockchain technology and idle gaming mechanics. It leverages several modern technologies to provide a seamless, scalable, and engaging user experience. Here’s a detailed breakdown of how we built this project:

Technologies Used:

1.	Smart Contracts:
•	Solidity: We used Solidity to write the smart contracts for the ERC-403 token standard. These contracts handle the minting, transferring, and burning of the ERC-403 tokens, which represent the unique eggs.
•	ERC-403 Standard: This custom standard combines features of ERC-1155 and ERC-20 to allow for flexible and efficient management of both fungible and non-fungible tokens.
2.	Backend:
•	Fleek Functions: We utilized Fleek Functions for serverless backend operations. Fleek provides seamless integration with the Ethereum blockchain, allowing us to interact with smart contracts efficiently.
•	Node.js: Node.js was used to build the backend services that manage user sessions, handle API requests, and communicate with the blockchain.
3.	Frontend:
•	Svelte: The frontend of Eggs Idle Miner is built using Svelte, a modern JavaScript framework. Svelte’s reactivity and compile-time optimizations ensure a fast and responsive user interface.
•	WebAssembly (Wasm): We integrated WebAssembly in service workers to handle the mining process. This allows us to offload heavy computations to the user’s machine, efficiently using their idle processing power.
4.	Blockchain Integration:
•	Ethereum: The core blockchain platform used for managing and verifying all transactions and minting of ERC-403 tokens.
•	Web3.js: A JavaScript library used to interact with the Ethereum blockchain from the frontend, allowing us to send transactions, read contract data, and manage user accounts.
5.	Decentralized Marketplace:
•	OpenSea Integration: We integrated with OpenSea to enable players to trade their eggs on a decentralized marketplace.
•	Uniswap Integration: We also set up liquidity pools on Uniswap, allowing for the trading of fractionalized egg tokens.

Architecture and Workflow:

1.	Mining Process:
•	Players initiate the mining process via the frontend.
•	WebAssembly modules run in service workers, utilizing the user’s CPU to solve cryptographic hashes.
•	Upon finding a valid hash, the frontend sends a transaction to the Ethereum blockchain to mint a new ERC-403 token.
2.	Token Management:
•	The ERC-403 smart contract handles the minting, transferring, and burning of tokens.
•	Each egg mined is represented as a unique ERC-403 token, with its rarity determined by the complexity of the hash solved during mining.
3.	User Interface:
•	Built with Svelte, the UI provides a responsive and interactive experience.
•	Players can view their egg collection, start/stop mining, and manage their account.
•	Real-time updates are fetched from the blockchain to display the latest data.
4.	Decentralized Trading:
•	Players can list their eggs on OpenSea directly from the game.
•	Integration with Uniswap allows players to trade fractionalized tokens, enhancing liquidity and providing more trading options.

Challenges and Solutions:

•	Efficient Mining: Leveraging WebAssembly in service workers allowed us to efficiently use the user’s idle CPU power without disrupting their main tasks.
•	Scalability: Using Fleek Functions for the backend ensured that our infrastructure could scale seamlessly with user demand.
•	Blockchain Costs: By combining ERC-1155’s batch transfer capabilities with the ERC-20 standard, we minimized gas costs and optimized transaction efficiency.

This project is a testament to the power of modern web and blockchain technologies, providing a unique and engaging gaming experience while leveraging decentralized principles.

background image mobile

Join the mailing list

Get the latest news and updates