๐ฎ
Gaming API
Integrate BrainArk meme coins into your game as in-game currencies, rewards, or NFT drops.
1
Launch a coin
Create a Project/Gaming mode coin with up to 20% creator allocation. Get your token + curve addresses.
2
Register operator
Send your wallet address to BrainArk (contact below). We register you as an authorised operator on your coin's curve.
3
Call the API
Your game server calls buyFor/sellFor on the bonding curve. Players receive tokens directly in their wallet.
Use cases
โ๏ธ Battle rewards
Mint tokens to winners after each match
๐ Tournament prizes
Distribute tokens to leaderboard finishers
๐ Daily quests
Reward players who complete objectives
๐๏ธ In-game marketplace
Let players trade items for your token
๐ช NFT gating
Require token balance to access premium content
๐ Player speculation
Players buy/sell tokens โ price reflects popularity
Code examples
The Gaming API is built directly into the BrainArk bonding curve contracts. There are no external servers โ your game backend calls the smart contracts directly using ethers.js or viem.
Key functions:
buyFor(player, minTokensOut)โ Buy tokens on behalf of a player. Send BAK as msg.value.sellFor(player, tokenAmount, minBakOut)โ Sell tokens on behalf of a player. BAK is sent to the player.currentPrice()โ Spot price in BAK per token (18 decimals).realBakCollected()โ Total BAK raised so far.
Requirements:
- Your operator wallet must be registered by BrainArk admin via
factory.registerOperator(token, operator) - Your operator wallet must hold enough BAK to pay for buy transactions
- Players receive tokens in their own wallet (non-custodial)
๐ก๏ธ Anti-rugpull guarantees
โCreator receives 0 tokens directly at launch
โCreator allocation is locked for 18 months on-chain
โOnly registered operators can call buyFor/sellFor
โOnly BrainArk admin can register/revoke operators
โMinting permanently disabled after graduation
โAll fees go to protocol treasury, never to creator
๐ฌ
Get operator access
To register as a game operator, contact BrainArk with your:
token address ยท operator wallet address ยท game name/URL
token address ยท operator wallet address ยท game name/URL