Skip to Content
X404 Protocol docs
Official documentation/ X404 Social Games
X404 · Official documentation v1

mining power, accounts and treasury

Separate accounts, pending balances and repurchase fault isolation.

Platform Protocol Fee#

Game modes: Choose 1 / 3 / 9 (no elder), 1 / 3 / 9 / 27, or 1 / 2 / 4 / 8 (with elders) at creation. The mode cannot change afterward. Three-way modes require three recruits per warrior and split into three tribes; the two-way mode requires two recruits per warrior and splits into two tribes. Counts and rewards below illustrate the default 1 / 3 / 9 mode. Elder modes also award elder promotion mining power (900 by default), totaling 12,100 mining power from paid admission through retirement at default settings. Always check the selected game’s configuration.

Game administration uses three distinct accounts: creator for initialization, operations for proposals and reviewer for approval. After initialization, every parameter, recipient, issuance, budget and role change requires operations to propose and the reviewer to approve. Platform Safe/timelock governance remains separate.

Current mining power reward rules: Recruit 100 (default admission mining power, configurable per game) → Warrior 300 → Chief 2,700 → Retirement 8,100 mining power, paid on each actual milestone, totaling 11,200 per full cycle at the default. Later paid cycles earn real promotions again. Free seed warriors receive no admission or initial warrior reward. Taking over a seat (paid takeover or accepted transfer) pays the admission and warrior amounts on that seat's first handover (after an accepted transfer, once the new holder fills the seat); later paid takeovers pay only admission and later transfers pay nothing. Replacement is not retirement.

All mining power uses this game’s 6-decimal Honor.goldBalance ledger. Admission, promotion, retirement and the once-only profile reward increase lifetime combat power. Tasks, wars, sales and ordinary extensions only credit mining power. Spending never reduces power. Country creation/joining cost 10,000 / 20 mining power. Initial prestige imports lifetime power; leaving removes it and rejoining imports it once again.

Each game has its own mining power redemption pool. Availability, claim times and actual redemption results are determined by the game page and on-chain transactions.

Entry, Warrior, Chief and retirement rewards are editable during creation, defaulting to 100 / 300 / 2,700 / 8,100 whole mining power. Each must be 1–1,000,000. The factory promotionRewards tuple uses Warrior, Chief, retirement order. After creation, the game operation wallet changes those four with setPromotionRewards and entry rewards with setGameConfig. Changes affect future awards only; existing balances and combat power are not recalculated.

Game tokens default to 6 decimals. The creator may select an integer from 0–18, including 0; decimals cannot change after issuance. One token equals 10^decimals base units: at 6 decimals, 1 token = 1,000,000 base units. Calculations use exact base units and the UI formats actual precision. mining power uses 6 decimals and BNB keeps 18 decimals; rates use bps and lifetime combat power uses integers.

Allocations, V2 trading taxes and airdrop outputs round down in token base units. V2 tax-conversion thresholds, maximum batches and TAX_QUOTE_UNIT scale with 10^decimals. minBNBPerMillionTaxTokens always means minimum BNB in wei per one million whole tokens, not per one million base units.

Normal entry payments are distributed as shares of the gross payment in every game: players always receive 85% (recruiting warrior 50%, chief 35%), which creators and administrators cannot change. The remaining 15% is configured through a platform operations proposal approved by the platform reviewer, defaulting to social protocol fee 1%, platform service fee 1%, game team 4%, game Treasury 2% and the inviter's kingdom 7%. The fees are included in the original payment and do not dilute player shares. Without a chief, the entire 35% chief share goes to the team. When the inviter has no kingdom, the kingdom share goes to the project revenue wallets, bringing the default team total to 11% with a chief or 46% without one. The positive entry fee must be a multiple of 200 wei so every share is exact. Paid warrior replacement costs the current entry amount of the zone the seat is in (0.2 BNB by default in the entry zone); it first deducts the protocol and service fees (2% in total by default) and splits the remainder equally between the team and the Treasury (49% each by default). Gas, token trading taxes and DEX fees are separate.

X404GameFactory Must be specified when deploying protocolFeeRecipientand create a non-upgradeable X404ProtocolFees. All new games are atomically bound to the same collection contract before opening, and creators cannot choose the rate or change the collection contract. The fees are directly included in the platform collection contract and are independent of the game treasury, repurchase budget, and the game team’s unclaimed funds.

Admission does not call the platform wallet, so a rejecting recipient cannot block entry. Anyone may call withdraw(recipient) without recipient signatures, but the argument must equal the currently approved recipient. Only platform Safe multisig and a timelock of at least 1 hour may change that address. Unpaid fees then go to the new address; completed payments are not recovered. Receiving into a Safe requires no signatures; later spending follows the Safe rules. Failed withdrawal preserves the balance, and forced donations are excluded. gameFees(game) and totalCollected are cumulative; claimable is the unpaid balance across games. Index ProtocolFeeCollected, ProtocolFeesWithdrawn and ProtocolFeeRecipientChanged on the collector.

Game administrators cannot reset the binding, but platform governance can upgrade the game core through its multisig timelock. Creators have no upgrade right. Malicious platform upgrades or separately created third-party factories could bypass fees; this remains a governance and code-provenance trust boundary. Local validation uses separate test wallets; formal deployment must use the real platform recipient.

Entry distribution#

PurposeShare of gross entry paymentAmount for 0.2 BNB
Recruiting warrior50%0.1
Chief at entry35%0.07
Social protocol fee1%0.002
Platform service fee1%0.002
Game team wallets combined4%0.008
This game's Treasury2%0.004
Inviter's kingdom7%0.014

Amounts use the EVM chain's native currency; demo-chain currency has no real BNB value. Entry fees are multiples of 200 wei, so the shares have no rounding remainder. Individual team wallets may differ by at most 1 wei. The final entry before tribe succession uses the seats that existed before that succession.

Only the initial tribe has no chief, for its first 9 admissions. At the default rates, the team receives 39% of each such payment if the inviter belongs to a kingdom, or 46% if the inviter has no kingdom. Every child tribe has a chief after the first split. The final admission pays the seats held before the split.

Collection fault isolation#

The official notification center labels a warrior's own BNB recruitment share Recruitment income and a chief's share from recruitment within the tribe Tribe recruitment income. Classification uses the recipient's role in the historical transaction; later promotions do not rename earlier entries. A receipt combining multiple roles keeps Distribution received so team payments are not mislabelled as personal recruitment rewards. UI amounts use at most six decimal places; on-chain accounting and the calculations here retain their full precision.

When the payee refuses to accept payment, the share belonging to the account will be recorded in pendingPayments, and other sub-accounts and additions will continue to be completed. The account uses withdrawPendingPayments(recipient) to receive its own pending payment, and can specify an alternative receiving address. Failure to enter the core treasury still results in the entire transaction being rolled back.

PaymentDistributed / ProjectPayment means distribution, PaymentDeferred means payment has not yet been received, and PaymentWithdrawn means successful receipt. The index cannot treat every allocation event as instant arrival.

Vaults and Repos#

First-launch game LP is permanently locked by default. When the platform has enabled timed locks and the game chose a lock term before launch, that LP is time-locked instead: after the unlock time only the game creator wallet can claim it, and the public game page shows the unlock time. Buyback-added LP is always permanently locked. Test deployments (BSC testnet and local chains only) let the creator wallet reclaim LP and are labelled as test deployments on public pages. termLiquidityLocksEnabled only controls new term or installment locks for personally deposited LP and starts enabled. It cannot change game LP or existing locks. Ordinary and team-token vesting is unaffected.

Open Finance and follow the current on-chain state and approval steps. After initialization, operations proposes and the reviewer approves. Check the game, network and wallet before submitting, and wait for confirmation before continuing.

Initial liquidity uses BNB already held by this game’s treasury. If needed, game governance funds the treasury first through fundReserve; issuance activation must carry value=0. Saving allocations or pool configuration does not transfer assets or create the token. Administrator funding does not automatically become a pending buyback budget, and any issuance or liquidity failure reverts the entire activation.

The failed portion remains as a pending buyback budget; retries use only the markup budget, leaving untouched other balances accumulated during administrator funding, forced transfers, or shutdowns. The circuit breaker only suspends repurchases, but does not suspend social networking and game participation. Policy changes are handled by formal governance.

mining power and Tokens#

mining power is game-ledger data, not transferable tokens. During an open live airdrop round they may be actively spent for game tokens, with no fixed exchange price or claim at expiry. The mining power pool is calculated independently. See Timed live airdrops. Finance-issued tokens are separate from onchain social identity. Third parties may use their own tokens and economics; the social protocol does not automatically charge, distribute or exchange funds.

Game governance, backend permissions, MEV, price sources and upgradeable implementations remain trust boundaries. A small trade does not guarantee safe execution. Execution follows approved policy; a zero net-output floor provides no price or quantity guarantee.

Custom Game#

The player share is fixed at 85% in every game and the remaining 15% is configured through platform review; createCustomGame has no entry-share parameters. Game creation sets the token name, symbol, supply and decimals. Trading rates require game-governance approval before issuance. Pages read the actual token terms and buyback state. Token budgets use integer base units; positive entry fees must be multiples of 200 wei. Buyback limits and floors can be changed through an operations proposal approved by the reviewer. Both floors default to 0, with no corresponding minimum quantity requirement. V2 native pool fees are determined by the DEX.

Configurable buyback mode#

The buyback mode is selected when creating the game. Later, operations can propose setBuybackMode(mode, minimumLPPerBNB) and the reviewer approves its execution.

ModeBudget UsageFinal destination
0 / Burn(default)Purchase game tokensTokens are transferred directly to the black hole; not executed ERC20 _burn, totalSupply unchanged
1 / LiquidityPartial purchase of coins, remaining BNB added to the pool by matchingBuyback-added LP is always permanently locked.

V2 The reserve ratio after exchange will match the after-tax currency actually received by the pool BNB, and the budget will not be divided in half. Sales taxes on purchases and re-transfers to the pool are still charged according to the game configuration; during the transfer of the vault into the pool, automatic tax exchange is only postponed to avoid changing the pool price during the process of adding to the pool. Unused BNB remains in the ledger to be repurchased, and the original treasury reserve tokens, WBNB and other BNB do not participate.

Both modes retain the per-buyback budget and pool-share limits. The LP floor applies only in liquidity mode and is calculated from the actual total BNB spent on buying and pairing. Actual token and LP receipts must remain positive; balance and budget checks still apply. Both minTokensPerBNB and minimumLPPerBNB default to 0. Zero disables the corresponding minimum quantity requirement, with no guaranteed minimum; positive values enforce that floor. After issuance, either value can still be changed by an operations proposal approved by the reviewer. V2 LP uses 18-decimal base units; V4 uses core liquidity units. These LP floors cannot be copied directly between protocols. Tokens use their own decimals() base units. Changing modes spends no funds and does not reset the circuit breaker; pending budgets follow the approved mode and recovery still requires setBuybackPolicy.

BuybackModeChanged Recording mode and LP Bottom line, BuybackLiquidityAdded Record each coin purchase BNB, pairing BNB, net credit of the purchased coin, net credit of the pool and lock LP. BuybackStateUpdated Issue pending budget, accumulated expenditure, black hole tokens, new liquidity, circuit breaker, number of failures and last attempt time; combined with policies and limit events, financial status can be maintained through logs. Share Go index in game summary

This projection is provided in finance .

V2 and V4 Transaction Tax#

Regular rates default to 2% and can be configured before issuance from 0–5% (0–500 bps), in steps of 0.01%. V2 token.buyTaxBps and token.sellTaxBps are independent; token.poolFeeBps must be 0. The token collects these taxes and the DEX native pool fee is additional. V4 / Infinity CL ordinary buy/sell taxes must be 0; token.poolFeeBps can be 0–500 and is the LP pool fee, collected directly by the DEX core.

Initial rates are selected during creation. After initialization, rate changes require operations proposals and reviewer approval; the creator cannot bypass approval. Rates may be reconfigured before issuance. A rate change increments launchNonce, invalidating old activation requests; an activation proposal must reference the latest approved version and be approved by the reviewer. Rates are immutable after issuance and both pools share the same set. X404GameConfig holds the initial creation terms; read the treasury’s getTokenConfig() for effective current rates.

V2 collects only its configured buy and sell taxes. Uniswap V4 / Infinity CL uses native static pool fees with a zero Hook address. There is no opening anti-sniping tax or waiting period.

CL pools allow permissionless initialization. Issuance accepts an existing pool only when its initial price exactly matches the approved budgets and current active liquidity is zero; otherwise the entire issuance reverts. Zero active liquidity does not prove there are no out-of-range positions. An attacker who predicts the token address can still initialize at a wrong price and block issuance. A pool without Hooks does not eliminate this denial-of-service risk.

Transfers and airdrop claims have no trading tax, and adding or removing CL liquidity has no token buy/sell tax. Transfers from a bound V2 pair follow the buy path, including liquidity withdrawals; other pools are outside tax coverage. V2 requires fee-on-transfer-compatible routers. CL swaps may fill partially; minimumOut still applies and unused input is refunded to the payer. Trading fees do not eliminate front-running or MEV.

Quotes include configured trading fees and additional DEX charges before applying slippage to net output. Considering only a selected 2% rate, 100 units yields 98; a 1% slippage allowance gives a 97.02 minimum. Actual output also depends on price impact, protocol fees and base-unit rounding.

LP income follows active-liquidity share and then each position’s beneficiary shares; one beneficiary can hold 100%. The following example uses a selected 2% LP pool fee. Without a DEX protocol fee, that pool fee goes to active LPs. With Uniswap V4 protocol fees at 0.1% of input, LPs receive about 1.998% and total fees are about 2.098%; at Infinity CL protocol fees of 0.4%, those figures are about 1.992% and 2.392%. Actual amounts depend on core configuration, active liquidity and rounding. The configured LP pool fee excludes external protocol fees.

Buybacks follow the approved mode, minimum net output, budget and cooldown. Marked budgets that fail or exceed limits remain in pendingBuybackBNB. Any wallet may call executeBuyback() under that policy, and later entries may also trigger buybacks. executeBuyback() has its own 5-minute interval, which a successful entry buyback does not delay; after a shortfall both wait for the cooldown. When the minimum net output is 0, only a plain wallet sending the transaction directly can execute it; calls made through a contract are skipped. The same applies to the immediate buyback at entry: an entry by a contract member only adds to the pending budget.

Fixed terms after issuance#

Approved game buy/sell tax rates and pool fees are fixed after issuance; the game operation wallet may change the tax wallet; the platform trading-income share remains adjustable by platform governance. The token enforces V2 buy/sell taxes; the DEX core enforces CL pool fees.

TermFixed whenAfter issuance
Trading protocol and regular ratesProtocol at creation; rates at issuanceV2 buy/sell taxes each 0–5%; CL ordinary taxes zero and LP fee 0–5%; default 2%, governance can reconfigure before issuance, both pools share the same rates
Tax walletInitial address chosen at issuanceMay be changed through the game operation wallet
V2 Router / Pair; V4 Manager / Settlement / poolIdAtomic issuance and pool creationCannot replace; the token and permanent liquidity adapter cannot be upgraded
V4 LP feeStatic pool creationNative static pool fee of 0–5% approved before issuance (default 2%), tickSpacing 60, zero Hook
DEX protocol feeExternal DEX rulesControlled by PancakeSwap / Uniswap protocol fee governance, outside game administrator control and this protocol’s fixed-term commitment

Only platform governance can upgrade the game core. Existing treasuries, tokens, and permanent liquidity adapters are immutable. Fixed trading terms do not guarantee prices or remove game and DEX governance risk.

Governance may adjust buyback modes and execution limits without changing the issued token’s buy or sell tax rates. A separate game governance operation changes the tax wallet.

The V2 tax conversion floor is a minimum execution price, not a buy or sell tax rate. Only this game's owner may change it with setTaxMinimum, through the game operation wallet in production. The tax wallet may use processTax only at the configured floor or a stricter minimum output. Setting the floor too low can still lead to unfavorable execution.

V4 buybacks sent to the burn address also do not reduce totalSupply. Liquidity buybacks compute swaps and pairing from current full-range liquidity and budgets using only this operation's funds. Unused native currency returns to the treasury, and small unused newly acquired token amounts remain there. Existing treasury assets are excluded. LP fees crystallized during liquidity additions enter Lock's separate allocation ledger and are paid by the fixed beneficiary shares to the currently approved official project payout addresses; they cannot subsidize this budget. Floors, scale, circuit breakers and formal governance follow the same rules as V2.

Team assets and liquidity lock-up#

The team issuance budget moves directly from X404Issuance into the Lock. Approve its exact amount, beneficiaries and schedule under Team token locks, then execute separately; it is not paid to team wallets first. A single plan supports a cliff followed by daily, monthly, quarterly or yearly releases. Each beneficiary may only extend their own unclaimed allocation, never shorten it or change another wallet’s schedule.

The platform tokens held separately by the team, registration V2 LP, official V4 NFT and newly invested platform CL liquidity can be passed Asset locks Fixed benefit wallet and unequal shares, choose permanent or installment token principal, with LP installments requiring platform policy approval, and separately configure V4 LP handling fee collection.

Trading-tax wallets, game payment recipients, platform protocol-fee wallets, lock principal beneficiaries and LP fee beneficiaries belong to separate fund flows. Lock shares do not change game payment allocation or tax rates. V2 trading revenue is embedded in LP value; V4 vaults separately record principal and actual feesAccrued. Initial and buyback liquidity is automatically deposited into the current Lock.

Protocol share of trading income and LP lock policy#

The protocol share of trading income defaults to 25% and may be changed only by platform governance through setTradingFeeShareBps. Each V2 tax conversion and V4/Infinity LP fee claim uses the current rate, including existing games and income accrued before the change but still unclaimed. Already paid income is not recalculated. The share is deducted from trading income, separately from the fixed 1% entry fee; locked principal is never charged. The protocol portion is paid directly to the currently approved Treasury.protocolFees().recipient. Platform Safe multisig and a timelock of at least 1 hour may change it through X404GameFactory.setProtocolFeeRecipient(expectedRecipient, newRecipient). All unpaid protocol BNB, subsequent trading-income payouts and future token tickets use the current address, including existing games. The game portion uses its approved tax or official project LP fee destination; completed payments are not recovered.

First-launch game LP is permanently locked by default. When the platform has enabled timed locks and the game chose a lock term before launch, that LP is time-locked instead: after the unlock time only the game creator wallet can claim it, and the public game page shows the unlock time. Buyback-added LP is always permanently locked. Test deployments (BSC testnet and local chains only) let the creator wallet reclaim LP and are labelled as test deployments on public pages. termLiquidityLocksEnabled only controls new term or installment locks for personally deposited LP and starts enabled. It cannot change game LP or existing locks. Ordinary and team-token vesting is unaffected.

For V4/Infinity, claimableFees, claimedFees, FeesClaimed, and the amount arguments and return values of claimFees / claimFeesFor are gross amounts before the protocol share. Read quoteFees(beneficiary, currency, amount) for (gross, protocolAmount, netAmount, shareBps); amount=0 selects the full current gross entitlement. Game receipts use netAmount. FeesSplit records each gross amount, protocol share, net payment and rate. Fee-wallet weights define the game beneficiaries only and cannot override the protocol destination or rate. Rates and carried fractions may change after a preview; execution events are final.

Fractional protocol fees below one base unit carry forward per contract and currency, so splitting claims cannot avoid the fee. A rejected payment reverts the claim, gross claimed balance and carry, allowing a retry once the receiving issue is resolved. Principal and fee ledgers stay separate.

V2 processTax minimum BNB and TaxConverted amounts describe gross conversion output. The game tax wallet receives the net amount after the protocol share. TaxRevenueSplit records grossBNB / protocolAmount / netAmount / shareBps; income summaries use the actual net amount without counting the gross event again. Forced BNB donations are excluded from conversion income.

Token allocation guide#

See Protocol token allocation and team vesting for the allocation plan and proposed release schedule.

### Elite zone default rewards

With the default entry configuration and a 1 BNB elite entry fee, entry / warrior / chief / retirement rewards are 450 / 1,500 / 13,500 / 40,500 mining power: 55,950 for one complete three-tier cycle. Four-tier modes add 4,500 for elder promotion, totaling 60,450. Unused proportional budget is not awarded or added to retirement. Custom budgets and price changes scale this elite profile with integer rounding; the game’s current on-chain settings determine actual rewards.