Smart Contracts
The Engine of Project X: Secure, Modular, and On-Chain.
Project X operates on a suite of specialized smart contracts built on the Solana blockchain. Each contract is designed for a specific purpose, ensuring clarity, security, and upgradability. This modular architecture allows for independent development, testing, and auditing of each component.
The core token contract for $XGODS, built on Solana's Token-2022 standard. It manages token issuance, transfers, and incorporates extensions like transfer fees (for revenue generation, buybacks, and staking rewards) and freeze authority (for NFT leasing integration).
Key Features:
- Token-2022 Standard with Extensions
- Transfer Fee Mechanism for Protocol Revenue
- Freeze Authority for Leasing Integration
- Metadata and Supply Management
This contract acts as the secure custodian for all DeGods NFTs and SOL reserves held by Project X. It utilizes Program Derived Addresses (PDAs) for NFT storage and manages all inflows and outflows based on DAO-approved proposals, swaps, or leasing activities. It also enforces the quarterly budget cap.
Key Features:
- Secure NFT Custody via PDAs
- SOL Treasury Management
- Automated Execution of Governed Actions
- Quarterly Budget Cap Enforcement
- Redemption Logic for $XGODS
The backbone of Project X's decentralized governance. This contract manages the entire lifecycle of proposals, from submission by High Councillors, through multi-sig consensus, to Councillor voting. It also handles quarterly elections and emergency action protocols.
Key Features:
- On-Chain Proposal Lifecycle Management
- Councillor & High Councillor Elections
- Voting Power Integration with Staking Contract
- Execution of Passed Proposals via Vault Contract
- Emergency Protocol Management
Enables $XGODS token holders to stake their tokens to earn rewards and participate in governance. This contract calculates voting power based on the amount staked and the duration, rewarding long-term commitment.
Key Features:
- $XGODS Token Staking & Unstaking
- Time-Weighted Voting Power Calculation
- Distribution of Staking Rewards
- Interface for Governance & Utility Checks
Facilitates the temporary lending of DeGods NFTs from the vault to users. It leverages Token-2022's freeze delegation for secure, non-custodial leases, managing terms, payments (SOL or $XGODS), and automatic returns.
Key Features:
- Secure NFT Leasing via Freeze Delegation
- Time-Locked Lease Durations
- On-Chain Escrow for Lease Payments
- Automated NFT Return Mechanism
Allows users to directly swap their own DeGod NFTs with those held in the Project X vault. The contract handles fair value assessment, balancing payments in SOL, protocol fee collection, and ensures atomic execution of swaps.
Key Features:
- Peer-to-Protocol NFT Swaps
- Value Assessment & Balancing Logic
- Protocol Fee Collection
- Atomic NFT Transfers
Provides a decentralized marketplace for DeGods NFTs using an Automated Market Maker (AMM) model. Users can provide liquidity by depositing NFTs and/or SOL, and trade NFTs with price discovery determined by the pool's algorithm.
Key Features:
- NFT Liquidity Provision (NFTs/SOL pairs)
- Automated Price Discovery for NFTs
- Trading Fees for Liquidity Providers
- Support for Specific Trait-Based Pools (Optional)
Powers the decentralized exchange (DEX) functionality for $XGODS tokens. This contract enables users to provide liquidity for $XGODS pairs (e.g., $XGODS/SOL) and trade tokens with prices determined by a constant product or similar AMM formula. Integrates with platforms like Raydium or Orca, or can be a bespoke solution.
Key Features:
- Token Liquidity Provision ($XGODS/SOL, etc.)
- AMM-Based Token Swaps
- Trading Fee Accrual for LPs
- Potential Integration with External DEXs
Beyond these core contracts, functionalities like revenue distribution (from transfer fees, leasing, etc.) and token liquidity via DEXs are integral to Project X. These may be handled by dedicated functions within the core contracts (e.g., the Vault or Token Contract) or through secure integrations with specialized external protocols, always governed by DAO approval.
The key is a cohesive system where each part contributes to the overall health and utility of the Project X ecosystem.
Each smart contract listed is developed as a distinct, standalone module. This separation is crucial for:
- Targeted Audits: Allowing for focused security audits on individual contracts.
- Upgradability: Enabling more manageable and safer upgrades to specific parts of the system (subject to DAO governance).
- Clarity: Simplifying the understanding of each component's specific role and responsibilities.
Project X is committed to rigorous testing and multiple independent audits for all its smart contracts before mainnet deployment.