Loading page…
Loading page…
Commodity Market Capital (CMC) is a token launchpad on Elysium. A launch creates a fixed-supply ERC-20 that carries a commodity reference (for example gold, crude oil or a basket of metals), opens a dedicated Uniswap v4 pool against HYPE or XAUt0, and puts the entire supply into that pool as a single-sided position. The position is the bonding curve: the price rises as people buy and falls as they sell, with no migration step.
The launchpad contract is also the pool's v4 hook. It charges the curve fee on every swap and splits it on-chain between the token's holders, the $CMC buyback bucket and the treasury.
The commodity reference is metadata stored on the token (commodityRef). There is no oracle, collateral, physical backing or redemption right, and the token's price is not linked to the commodity's price.
Deployed on Elysium mainnet at block 15,039,585. Native HYPE is the other listed quote asset (address zero).
Server-side check of chain ID and latest block. Refreshes every minute.
On Launch, choose one commodity, or switch to Basket and choose up to five. Arriving from the Commodities catalogue preselects it.
Name 2–64 characters, ticker 2–10 letters or numbers (the contract allows up to 16). Image (PNG, JPEG or WebP under 4 MB), description and links are optional and stored in the token's metadata.
Pair with HYPE or XAUt0, pick a 1%, 2% or 3% curve fee, and optionally make a first buy in the pair asset. XAUt0 first buys need an approval first.
The site simulates the launch, sets the first-buy minimum to 99% of the simulated amount, and asks you to sign. When confirmed you land on the new market page.
A single reference is stored as its catalogue symbol (for example GLD). A basket is stored as symbols joined with + (for example GLD+SILV+COPP). The reference is shown on the market page with the latest free reference price where one exists. It never affects pricing on-chain.
Every market has a page at /market/<token address> with the GMGN chart, stats, curve progress and the trade panel.
Buys spend the pair asset; sells spend the token. The panel quotes the output with the Uniswap v4 Quoter before you sign.
Selling, or buying with XAUt0, needs a one-time ERC-20 approval of the router for the amount.
The router executes in the token's v4 pool with a minimum output of 98% of the quote and a 10-minute deadline. It reverts rather than fill worse.
Holders earn 40% of every curve fee in their market, pro rata to their balance. The market page shows your claimable amount, and the Portfolio page lists every market the connected wallet holds with its claimable fees. Claim calls claimRewards() on the token, which first pulls the market's pending fees from the launchpad and then pays you in the pair asset. Balances held by the launchpad, the PoolManager or the zero address do not earn.
| SUPPLY | 1,000,000,000 × 10¹⁸ | Minted once to the launchpad, then placed in the pool |
| TICK_SPACING | 200 | Pool tick spacing (≈ 2.02% per step) |
| GRADUATION_TICKS | 19,459 | ln 7 / ln 1.0001, rounded: the 7× line |
| MIN_FEE_BPS / MAX_FEE_BPS | 100 / 300 | Curve fee bounds (1–3%) |
| HOLDER_SHARE_BPS | 4,000 | 40% of each fee |
| BUYBACK_SHARE_BPS | 3,000 | 30% of each fee; the treasury gets the remainder |
The owner sets an opening market cap M per quote asset, in that asset's units. The opening price per token is M / SUPPLY. The launchpad converts it to a tick, rounds down to the 200-tick spacing, and seeds a single-sided position holding the whole supply from that tick to the end of the usable range.
P_open = M / SUPPLY (quote per token)
tick_0 = floor_200( tick(P_open) ) (aligned; up to ~2% from P_open)
range = [tick_0, 887,200] if token is currency0
[-887,200, tick_0] if token is currency1
L = liquidity that holds exactly SUPPLY tokens over that rangeInside the range the pool is a standard concentrated-liquidity curve: buys move the price up along it, sells move it back down, and the position can never be withdrawn because the hook has no code path to remove it.
graduation_tick = tick_0 ± 19,459 (price × 7) progress = (ticks moved toward the line) / 19,459 capped at 100% graduated = set once a swap ends at or past the line; never unset
Progress is linear in ticks, so it is logarithmic in price: halfway on the progress bar is about √7 ≈ 2.65× the opening price, not 3.5×.
USD figures use the quote price recorded when the asset was listed; live USD values move with HYPE and gold.
The hook takes the fee in the quote asset on every swap, as Uniswap v4 ERC-6909 claims (so a swap never depends on the PoolManager already holding that asset). Where the quote amount is what the trader pays on an exact-output trade, the fee is grossed up so the effective rate matches an exact-input trade.
f = feeBps / 10,000 buy, exact quote in fee = amountIn × f sell, exact token in fee = grossQuoteOut × f buy, exact token out fee = ceil( quoteIn × f / (1 − f) ) sell, exact quote out fee = ceil( quoteOut × f / (1 − f) ) holders = fee × 0.40 → pendingHolderFees[token] buyback = fee × 0.30 → buybackAccrued[quote] treasury = fee − holders − buyback → treasuryAccrued[quote]
Holder fees are moved into the token by flushHolders(token) (called on every claim, or by anyone) and distributed with a per-share accumulator over the eligible supply. If less than one whole token is eligible at that moment, the amount goes to the treasury bucket instead. withdrawFees(quote) pushes the buyback and treasury buckets to their recipients and can be called by anyone.
Commodity reference prices come only from free public endpoints, with no subscriptions. They are display-only context: no contract reads them. Token prices, market caps and charts come from GMGN instead.
| Category / Provider | Symbols | Unit & Frequency | Source |
|---|---|---|---|
| Metals (Gold API) | GLD, SILV, PLAT, PALL, COPP | USD / troy oz (Copper: / lb) Current / Indicative | gold-api.com |
| FX (Frankfurter/ECB) | EUR, JPY | Base USD Daily Reference | frankfurter.dev |
| Energy (U.S. EIA via FRED) | WTI, BRENT, NGAS, GASO, HEAT | Barrel / MMBtu / Gallon Daily Government | fred.stlouisfed.org |
These catalogue symbols can still be used as a commodity reference at launch, but have no free price feed connected; the API returns unavailable for them.
ALUM, LUMB, WHEAT, CORN, SOY, SOYO, RICE, OATS, COFF, COCO, COTT, SUGAR, CATTLE, HOGS, FEED, BURG, FRIES, PIZZA, CS2, GP, TCG, WATER, CAR
The site exposes read-only market data, reference prices, network status and token-image storage. No authentication keys are required. All responses use JSON unless otherwise specified.
The documentation snippets below use app.example.com or api.example.com as explicit domain placeholders to illustrate HTTP calls. In practice, you must query the exact host your frontend is running on. Upload requests enforce a strict Same-Origin Policy if the Origin header is present. Do not blindly copy-paste the example domains into your production code.
Every market launched on the CMC launchpad, newest first, read from Elysium on the server. One cached read set (15 seconds) serves all visitors so browsers don't each hit the rate-limited public RPCs. mcapQuote is the market cap in the pair asset; progress is graduation progress from 0 to 1.
{
"count": 1,
"markets": [
{
"token": "0x0Ae014390647d4244ef925148453647990Ca312b",
"name": "…",
"symbol": "CMCGT",
"commodityRef": "GLD",
"image": "https://…",
"quoteSymbol": "HYPE",
"mcapQuote": 74.9,
"progress": 0.01,
"graduated": false
}
],
"fetchedAt": "2026-12-01T12:00:00.000Z"
}Token stats and candles from GMGN (chain elysium), proxied by the server so the GMGN key never reaches the browser. Token stats are cached for 20 seconds and candles for 30 seconds; failures are cached for 10 seconds and the last good value is served through brief outages. kline takes ?resolution= one of 1m, 5m, 15m, 1h, 4h, 1d. Invalid addresses or resolutions return 400.
// /market-data/gmgn/token/{address}
{
"address": "0x…", "name": "…", "symbol": "…",
"priceUsd": 0.0000052, "change24hPct": 3.1,
"marketCapUsd": 5200, "liquidityUsd": 9800, "volume24hUsd": 410,
"buys24h": 12, "sells24h": 4, "holders": 9,
"gmgnUrl": "https://gmgn.ai/elysium/token/0x…"
}
// /market-data/gmgn/kline/{address}?resolution=5m
{ "candles": [ { "time": 1796181600, "open": 0.0000051, "high": 0.0000053,
"low": 0.0000050, "close": 0.0000052, "volumeUsd": 35.2 } ] }Sub-minute candles for a CMC market, built on the server from the pool's Uniswap v4 Swap events on Elysium (GMGN's free tier has no candles below 30 seconds). ?resolution= is one of 1s, 5s, 15s, 30s. Definitions match the GMGN candles: trade price is the quote amount over the token amount in each swap (the curve fee is taken outside the pool and excluded), converted to USD with Hyperliquid's HYPE price (PAXG for XAUt0 pairs) in the minute of the trade; volume is the quote amount in USD. Only buckets with trades are returned, newest 1,500 at most. Swaps are re-read for about 10 seconds after they land in case of a reorg. Unknown tokens return 404; invalid addresses or resolutions return 400. Same response shape as /market-data/gmgn/kline.
Read-only Elysium mainnet connectivity check. The server calls only eth_chainId and eth_blockNumber through the public Elysium RPC endpoints (or an optional server-side override); this is not a general RPC proxy. Returns 200 when chain 99901 and a block number are verified, or 503 when unconfigured, unavailable, or on the wrong chain. Results and failures are cached for 30 seconds per process; HTTP responses use no-store. No credentials or upstream error details are returned.
const response = await fetch('/network/elysium');
const status = await response.json();
// connected: boolean
// chainId: 99901 on success, otherwise null
// blockNumber: number on success, otherwise null
// checkedAt: ISO timestamp
// message: human-readable connectivity status
if (!response.ok) throw new Error(status.message);Returns the current health status of the API server.
curl https://api.example.com/api/healthz{
"status": "ok"
}Fetches combined quotes from external free-tier public providers. Upstream providers are not guaranteed and some catalogue symbols may return an "unavailable" status. Results are cached in-process for 30 seconds (even failures are cached to prevent flooding). HTTP responses use Cache-Control: no-store. Provider failures are represented in a 200 response with an unavailable quote status. Use /market-data/quotes on this app’s origin, not /api/market-data/quotes; health and storage use the /api prefix.
| Field | Type | Description |
|---|---|---|
| symbol | string | The catalogue identifier (e.g. GLD, WTI) |
| priceUSD | number | null | Current unit price in USD, if available. |
| changePercent | number | null | Percentage change, if available. |
| changePeriod | "previous business day" | null | The timeline for the change percent. |
| status | "current" | "daily" | "reference" | "unavailable" | The freshness and availability state of the feed. |
| source | string | null | Human-readable provider name (e.g. Gold API). |
| sourceUrl | string | null | The URL to the data provider. |
| updatedAt | string | null | ISO-8601 or YYYY-MM-DD timestamp from the provider. |
| message | string | Contextual message or warning regarding the data. |
curl https://app.example.com/market-data/quotes{
"quotes": {
"GLD": {
"symbol": "GLD",
"priceUSD": 2345.60,
"changePercent": null,
"changePeriod": null,
"status": "current",
"source": "Gold API",
"sourceUrl": "https://gold-api.com/",
"updatedAt": "2024-05-20T12:00:00Z",
"message": "Latest indicative provider quote. Precious metals: USD per troy oz..."
},
"EUR": {
"symbol": "EUR",
"priceUSD": 1.085,
"changePercent": -0.12,
"changePeriod": "previous business day",
"status": "daily",
"source": "Frankfurter / ECB",
"sourceUrl": "https://frankfurter.dev/",
"updatedAt": "2024-05-19",
"message": "Daily reference rate dated 2024-05-19, not a real-time FX quote."
},
"CORN": {
"symbol": "CORN",
"priceUSD": null,
"changePercent": null,
"changePeriod": null,
"status": "unavailable",
"source": null,
"sourceUrl": null,
"updatedAt": null,
"message": "Feed not connected"
}
},
"fetchedAt": "2024-05-20T12:00:05.000Z",
"refreshAfterMs": 30000
}Uploads a raw binary image for a token market. Required to be a direct file upload (no multipart wrapper). It employs a shared rate limit budget of 60 uploads per 15 minutes, shared by all callers only per process (does not use IP headers). Maximum size is 4 MiB.
// Example browser same-origin fetch
const fileInput = document.querySelector('input[type="file"]');
const file = fileInput.files[0];
const response = await fetch('/api/storage/token-images', {
method: 'POST',
headers: {
'Content-Type': file.type // 'image/png', 'image/jpeg', or 'image/webp'
},
body: file // Raw bytes sent directly
});
const data = await response.json();
console.log(data.imageURL); // "/api/storage/token-images/<uuid>"{
"imageURL": "/api/storage/token-images/123e4567-e89b-12d3-a456-426614174000"
}{ "error": "Token image upload is empty." } or invalid magic bytes mismatch.{ "error": "Token image uploads require the same origin." }{ "error": "Token image must be 4 MB or smaller." }{ "error": "Token image must be PNG, JPEG, or WebP." }{ "error": "The shared token image upload budget is exhausted. Please try again later." } (Includes a Retry-After header in seconds).{ "error": "Failed to save token image." }Retrieves previously uploaded raw image bytes by their UUID. The server streams the image directly, applies the correct Content-Type (PNG/JPEG/WebP) based on object metadata, and attaches a rigid X-Content-Type-Options: nosniff security header.
Caching: Image responses use public, max-age=31536000 (1 year). No authentication is required to view images.
curl -O -J https://api.example.com/api/storage/token-images/123e4567-e89b-12d3-a456-426614174000{ "error": "Token image not found." } — returned for invalid UUID strings or missing objects.{ "error": "Failed to serve token image." }