Skip to content

Building Apps on Twin.fun

Use the bonding curve contract and subgraph to build dashboards, bots, and custom experiences.

Read-Only Integrations

  • Surface prices, candles, trades, and holders from the subgraph.
  • Display supply, last trade price, estimated slippage, and fees.

Access Control

  • Verify key ownership by reading sharesBalance[id][user] on-chain or consuming the Holder entity from the subgraph.
  • Gate features based on balance thresholds (commonly ≥1 key).

Event-Driven UIs

  • Subscribe to the Trade event to update prices, holders, and activity feeds in real time.
  • Combine event streams with subgraph polling for resilient UX.

Security Checklist

  • Display fee and value breakdowns before executing buys.
  • Warn users that buyShares requires the exact msg.value.
  • Handle chain reorgs by waiting for confirmations on critical UX state.

OpenGradient 2025