Inside the Bonding Curve: How Token Pricing Works

7 min read

Every token on THRYX lives on a bonding curve until it graduates. The curve determines the price, tracks reserves, and triggers graduation automatically. Here's what's actually happening inside the Diamond contract when you call getCurveInfo().

The getCurveInfo() Return Values

The Diamond's getCurveInfo(address token) function returns 11 values that fully describe a token's state:

function getCurveInfo(address token) view returns (
  address deployer,       // Who launched this token
  uint256 spotPrice,      // Current price in THRYX per token
  uint256 raised,         // Total ETH-equivalent raised
  uint256 threshold,      // Graduation target in ETH-equivalent
  uint256 progressBps,    // Progress toward graduation (0-10000)
  uint256 tokensSold,     // Tokens sold from the curve
  uint256 tokensAvailable, // Tokens remaining on the curve
  bool graduated,         // Has this token graduated?
  address aeroPool,       // Aerodrome V2 pool (if graduated)
  uint256 creatorFees,    // Accumulated creator fee earnings
  uint256 protocolFees    // Accumulated protocol fee earnings
)

Token Supply Distribution

Every token launches with 1 billion total supply, distributed as follows:

AllocationPercentagePurpose
Bonding curve80%Available for trading (800M tokens)
Graduation LP15%Reserved for Aerodrome V2 liquidity pool
Creator vesting5%90-day linear vest to the deployer

Spot Price and Virtual Reserves

The spotPrice returned by getCurveInfo() is denominated in THRYX per token. THRYX is the protocol's native token and serves as the quote currency for all bonding curves. When users buy with ETH, the swap routes through the real THRYX/WETH Doppler pool on-chain, converting ETH to THRYX, then THRYX to the target token via the curve.

The bonding curve uses a virtual reserve model. The price is determined by the ratio of THRYX reserves to token reserves in the curve. As tokens are bought (removing tokens from the curve and adding THRYX), the ratio shifts and the price increases. Selling reverses this.

progressBps: Graduation Progress

progressBps is a basis-point value (0-10000) representing how close the token is to graduating. At 10000 (100%), the token has reached its threshold and graduation triggers automatically. The frontend displays this as a percentage progress bar. Important: after graduation, progressBps resets to 0 — do not use it to detect graduated tokens. Use the graduated boolean field instead.

Dynamic Graduation Threshold

The graduation threshold is 250M THRYX (~$55 at current prices). When enough trading volume flows through the bonding curve to hit this target, the token automatically graduates to a Uniswap V4 AMM pool with permanent liquidity.

When the threshold is reached, the token graduates: the bonding curve stops, the 15% LP allocation pairs with raised THRYX in a Uniswap V4 AMM pool, and liquidity is locked. The aeroPool field in getCurveInfo() stores the pool address post-graduation. SENTIENT was the first token to graduate, proving the full lifecycle works end-to-end. After graduation, trading continues seamlessly on THRYX — the swap() function auto-detects graduated tokens and routes through the AMM.

Fee Structure

Every swap charges a 0.5% fee (50 basis points). The fee is split: 70% to the token creator (creatorFees), 30% to the protocol (protocolFees). From the protocol's 30%, additional allocations are made: 2% of total fees are burned (deflationary THRYX pressure), and 20% funds the PaymasterFacet gas reserve.

Per-Token ETH Reserves

Each token has its own isolated ETH reserves tracked via the raised field. There's no commingling of funds between tokens — if Token A raises 0.01 ETH and Token B raises 0.005 ETH, selling Token A can never drain Token B's reserves. This isolation is a key safety property of the protocol.

Reading Curve Data Efficiently

For a single token, call getCurveInfo() directly on the Diamond at 0x2F77b40c124645d25782CfBdfB1f54C1d76f2cCe. For batch reads across many tokens, use Multicall3 at 0xcA11bde05977b3631167028862bE2a173976CA11 to batch up to 50 getCurveInfo() calls into a single RPC request. The THRYX backend uses this pattern to refresh all token data in 2 RPC calls instead of 3*N individual calls.

Related Posts

Create Your Token