Built to Last. Built for Play.
LithosProtocol is a comprehensive Web3 gaming ecosystem that combines NFTs, on-chain assets, and Play-to-Earn (P2E) mechanics. Built with security, scalability, and modularity in mind, the platform leverages industry-standard patterns and battle-tested libraries to create an immersive blockchain gaming experience.
LithosProtocol represents the next generation of blockchain gaming, where players truly own their in-game assets and can earn real value through gameplay. The ecosystem features a dual-token economy, comprehensive NFT systems, and sophisticated game mechanics all secured by smart contracts on the Ethereum blockchain.
- Dual Token Economy: Governance ($GOV) and Utility ($PLAY) tokens for balanced economics
- NFT Asset System: ERC-721 unique assets and ERC-1155 semi-fungible resources
- Play-to-Earn Mechanics: Quest system, PvP rewards, and staking incentives
- Decentralized Marketplace: Peer-to-peer trading with auction capabilities
- Upgradeable Architecture: UUPS proxy pattern for future enhancements
| Contract | Type | Description |
|---|---|---|
GovernanceToken |
ERC-20 | Governance token with voting capabilities ($GOV) |
UtilityToken |
ERC-20 | Utility token for in-game transactions ($PLAY) |
GameAssetNFT |
ERC-721 | Unique game assets (characters, weapons, land, armor, accessories) |
GameResourceNFT |
ERC-1155 | Semi-fungible resources (crafting materials, potions, consumables) |
GameLogic |
Core | Play-to-earn mechanics and game state management |
Marketplace |
Trading | Decentralized asset marketplace with fixed price and auction support |
StakingContract |
DeFi | Token and NFT staking with rewards |
- Smart Contracts: Solidity 0.8.19 with OpenZeppelin libraries
- Development Framework: Foundry for testing and deployment
- Frontend: React with Web3 integration
- Blockchain: Ethereum (Mainnet) and Sepolia (Testnet)
- Proxy Pattern: UUPS for upgradeability
- Security: Comprehensive access controls and reentrancy protection
- Node.js 18+ and npm/pnpm
- Foundry toolkit
- Git
# Clone the repository
git clone https://github.com/DevelApp-ai/LithosProtocol.git
cd LithosProtocol
# Install dependencies
forge install# Compile contracts
forge build
# Run tests
forge test
# Start local blockchain
anvil
# Deploy to local network
forge script script/DeployContracts.s.sol --rpc-url http://localhost:8545 --broadcastLithosProtocol implements a sustainable P2E economy through multiple reward mechanisms:
- Daily Quests: Complete objectives to earn $PLAY tokens
- PvP Battles: Compete against other players for ranking rewards
- Crafting System: Create valuable items using resources
- Staking Rewards: Earn passive income by staking tokens and NFTs
Game assets evolve through gameplay:
- Experience Points: Assets gain XP through use
- Level Progression: Higher levels unlock new abilities
- Rarity Upgrades: Combine resources to increase rarity
- Customization: Modify appearance and attributes
The dual-token model ensures economic sustainability:
$GOV (Governance Token)
- Total Supply: 1,000,000 tokens (1M * 10^18 wei)
- Use Cases: Governance voting, premium features, staking rewards
- Symbol: GOV
- Name: "Aetherium Governance" (as per deployment configuration)
$PLAY (Utility Token)
- Dynamic Supply: Initial supply 0, minted through gameplay
- Use Cases: In-game purchases, repairs, marketplace fees
- Symbol: PLAY
- Name: "Aetherium Play" (as per deployment configuration)
- Mechanics: Deflationary through token sinks
- Smart Contract Audit: Pending (prepared for professional audit)
- Security Features: Reentrancy guards, access controls, pausable contracts
- Testing Coverage: Comprehensive test coverage for core contracts (GovernanceToken, UtilityToken, GameAssetNFT, GameResourceNFT, GameLogic)
- Upgrade Safety: UUPS proxy pattern with admin controls
- OpenZeppelin security standards
- Comprehensive input validation
- Role-based access control (RBAC)
- Emergency pause functionality
- Multi-signature wallet integration
The LithosProtocol marketplace enables seamless trading of game assets:
- Fixed Price Sales: List assets at set prices
- Auction System: Time-based bidding for rare items
- Bulk Operations: Trade multiple assets efficiently
- Fee Structure: 2.5% marketplace fee with revenue sharing
- Search & Filter: Advanced discovery tools
import { LithosProtocolSDK } from '@lithosprotocol/web3-sdk';
const sdk = new LithosProtocolSDK({
network: 'sepolia',
rpcUrl: 'https://sepolia.infura.io/v3/YOUR_KEY'
});
// Initialize SDK with MetaMask
await sdk.initialize(window.ethereum);
// List an NFT for sale
await sdk.marketplace.listItem({
nftContract: '0x...',
tokenId: 1,
amount: 1,
listingType: 0, // Fixed price
paymentToken: '0x0000000000000000000000000000000000000000', // ETH
price: ethers.parseEther('0.1'),
endTime: 0 // No end time for fixed price
});The LithosProtocol SDK provides easy integration:
// Initialize SDK
const lithos = new LithosProtocolSDK({
network: 'sepolia',
contracts: {
marketplace: '0x...',
utilityToken: '0x...',
gameLogic: '0x...'
}
});
// Initialize with provider
await lithos.initialize(window.ethereum);
// Get player data
const playerData = await lithos.gameLogic.getPlayerData(address);For Unity game developers:
using LithosProtocol.Web3;
public class GameManager : MonoBehaviour
{
private LithosWeb3Manager web3Manager;
void Start()
{
web3Manager = GetComponent<LithosWeb3Manager>();
// Configure contract addresses in inspector
// The manager will initialize automatically
}
async void OnPlayerAction()
{
// Complete a quest
await web3Manager.CompleteQuest(questId);
}
}$GOV Token (Governance)
- Total Supply: 1,000,000 tokens
- Initial Distribution: To deployer/admin address
- Future Distribution: Through governance proposals and voting mechanisms
$PLAY Token (Utility)
- Initial Supply: 0 tokens
- Minting: Controlled by game mechanics and authorized roles
- Distribution: Through gameplay, quests, and staking rewards
Token Sinks (Deflationary)
- Crafting and repairs: 10% of $PLAY supply annually
- Marketplace fees: 2.5% per transaction
- Premium features: Subscription model
Token Sources (Inflationary)
- Quest rewards: Dynamic based on player activity
- Staking rewards: 5-15% APY depending on lock period
- Tournament prizes: Weekly and monthly events
We welcome contributions from the community!
- Fork the repository
- Create a feature branch
- Write tests for new functionality
- Ensure all tests pass
- Submit a pull request
- Follow Solidity style guide
- Maintain 95%+ test coverage
- Document all public functions
- Use conventional commit messages
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Built with ❤️ by the LithosProtocol Team
