โ† Back
๐ŸŽฎ

Gaming API

Integrate BrainArk gaming tokens into your game โ€” real-time rewards, in-game currencies, NFT drops.

๐Ÿ“ˆ Live Bonding Curve
Real on-chain data ยท refreshes every block
Fetching coins from chainโ€ฆ
Reading coins from BrainArk chainโ€ฆ
1
Launch a coin
Create a Gaming mode coin with up to 20% creator allocation. Get your token + curve addresses.
2
Register operator
Send your wallet address to BrainArk. We register you as an authorised operator on your curve.
3
Call the API
Your game server calls buyFor/sellFor on the bonding curve. Players receive tokens directly.
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 shop
Let players spend tokens for items and upgrades
๐Ÿช™ NFT gating
Require token balance to access premium content
๐Ÿ“ˆ Speculation
Players buy/sell โ€” price reflects game popularity
Code examples

The Gaming API is built directly into the BrainArk bonding curve contracts. Your game backend calls the smart contracts directly using ethers.js or viem โ€” no external servers or APIs required.

Key functions:

  • buyFor(player, minTokensOut) โ€” Buy tokens for a player. Send BAK as msg.value.
  • sellFor(player, tokenAmount, minBakOut) โ€” Sell tokens on behalf of a player.
  • currentPrice() โ€” Live spot price in BAK per token (18 decimals).
  • realBakCollected() โ€” Total BAK raised on this curve.

Requirements:

  • Your operator wallet must be registered by BrainArk admin
  • Your operator wallet must hold BAK to fund buy transactions
  • Players receive tokens directly in their own wallets (non-custodial)
๐Ÿ›ก๏ธ Anti-rugpull guarantees
โœ“Creator receives 0 tokens directly at launch
โœ“Creator allocation locked 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:
token address ยท operator wallet ยท game name/URL
๐Ÿ“ง Email us๐Ÿš€ Launch a coin๐ŸŽŸ๏ธ Get support access