Skip to main content

Contracts & Integration

note

This page is for developers. If you just want to launch or trade tokens, everything you need is at frontier.fun - you never need to touch a contract directly. Start at Getting Started instead.

Robinhood Chain (4663)

Chain id4663
Gas tokenETH
RPChttps://rpc.mainnet.chain.robinhood.com
Explorerrobinhoodchain.blockscout.com

Protocol

ContractAddress
BCTokenFactory0x3cbC9395046607C083B383DC3588A3e8308dFf54
BondingCurve0xCCa442899dFD80bf04340fa8C245C7EB02F71DD4
CurveMath0xe70c33D0486A53FAAE7D46db1Beb14BB73f45E5e
FactoryHook0xac8A969865c553BA47BC523F7F65AF1abC3470cC
LiquidityManager0x97f3578083396D4ef2042868c6aE9d4eC91007A6
Harvester0x45664A758a782006991de87d1d1F522B2c32FcBE
StakingVaultFactory0x52510d2F1E9618bea75F0b8b500d71E3a187654C
ReferralManager0x6Fb1160A663834e8E53E411CC7202A01F1b144DD
HighlightsManager0xDb081Afb7162059413FE30592217e8348973f7C5
TokenVesting0x9241A07dB6a55CAD73859B05044230f7f180A89b

Uniswap V4 infrastructure

ContractAddress
PoolManager0x8366a39CC670B4001A1121B8F6A443A643e40951
PositionManager0x58daec3116aae6D93017bAAea7749052E8a04fA7
Universal Router0x8876789976dEcBfCbBbe364623C63652db8C0904
V4Quoter0x8Dc178eFB8111BB0973Dd9d722ebeFF267c98F94
StateView0xF3334192D15450CdD385c8B70e03f9A6bD9E673b
Permit20x000000000022D473030F116dDEE9F6B43aC78BA3
Multicall30xcA11bde05977b3631167028862bE2a173976CA11
WETH0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73

Always re-verify addresses on the explorer before integrating.

Integrating with Frontier tokens

Pre-graduation: quote and trade the curve

While BCToken.isLPd() is false, the only market is the bonding curve:

  • Quotes: BondingCurve.getAmountOutBuy / getAmountOutSell are fee-inclusive; getAmountOutBuySupplyCapped caps the quote to the remaining curve supply near graduation. The standalone CurveMath contract exposes the raw x · y = k formulas (purchaseCost, purchaseTargetAmount, saleTargetAmount) for offchain calculators via eth_call.
  • Trades: BondingCurve.buy(token, affiliate, minOut) and sell(token, affiliate, amount, minOut). Pass address(0) as the affiliate if there's no referral.

Post-graduation: find the pool

Uniswap V4 pools are records inside the singleton PoolManager, not deployed contracts - so there is no pool address to look up. Instead:

// The pool key (currencies, dynamic-fee flag, tick spacing, hook):
PoolKey memory key = LiquidityManager(liquidityManager).getPoolKey(token);

// Or just the pool id:
PoolId id = LiquidityManager(liquidityManager).getPoolId(token);

Every Frontier pool has the same shape: currency0 is native ETH (address(0)), currency1 is the coin, fee is the dynamic-fee flag (0x800000), tick spacing is 60, and the hook is the FactoryHook.

BCToken.lp returns the hook

For interface compatibility, BCToken.lp returns the FactoryHook address, not a pool contract - V4 pools aren't contracts. Use getPoolKey / getPoolId for pool discovery.

Swapping

There is no first-party swap router - swaps go through the canonical Universal Router with the @uniswap/v4-sdk, or any V4-compatible router. Quote with the V4Quoter, and remember the pool's fee is dynamic: the effective rate on any swap is the hook's current 3-step volatility fee.

Price feeds

For a manipulation-resistant price, read the hook's truncated TWAP oracle via FactoryHook.observe(poolId) instead of the pool's spot tick. Per-observation tick movement is capped, so single-block spikes barely move the TWAP.

Curve parameters

The curve's three shape parameters are factory-wide and readable at any time from BCTokenFactory.initialParams() - virtualReserves, initialSupply (the reserve held back for LP seeding) and maxSupply. A token's own graduation target is BCToken.TARGET_ETH. Read them rather than hardcoding the figures quoted elsewhere in these docs.

Security

  • The v1.1 contracts have completed an external security review; the report is being finalised and will be published here.
  • Ownership of every contract sits with a multisig.
  • Security contact: frontierfun@proton.me.