โ† Back
๐ŸŽฎ

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
๐Ÿ“ง Email us๐Ÿš€ Launch a coin