CoreXus DEX Developer Documentation
Everything you need to integrate with CoreXus DEX — the native exchange for the Vitreus blockchain. Access real-time price data, AI-powered market insights, and on-chain pallet extrinsics.
Chain Information
Chain ID
1943
RPC Endpoint
wss://corexusdex.com/rpc
Substrate JSON-RPC over WebSocket behind a method allowlist: chain and state reads, storage subscriptions, fee estimation, and author_submitAndWatchExtrinsic for already-signed extrinsics. Rate-limited per connection.
Explorer
explorer.vitreus.ioPublic APIs
All endpoints are unauthenticated and CORS-enabled. Model-backed routes (market-insight) are limited to 10 requests per minute per address and answer 429 above that; the price API is unlimited.
https://corexusdex.com/api/vtrs-usdUSD per VTRS from the VTRS/USDC pool's reserves on Vitreus, at the finalized block — the pool found by asset id, never by symbol, and the only price source this site has. Responds 503 with vtrsUsd: null when the chain has no such pool; nothing is estimated and no third-party price is consulted. change24h is null unless the market has a price at both ends of the window.
curl https://corexusdex.com/api/vtrs-usdResponse shape (illustrative — values are placeholders, not sample data):
{
"symbol": "VTRS",
"quote": "USD",
"vtrsUsd": <number> | null, // USD per VTRS
"change24h": <number> | null, // fraction over 24h, e.g. 0.012 = +1.2%
"source": {
"kind": "pool",
"pool": "native-<usdc asset id>", // the pool the reserves were read from
"base": "native",
"quoteAsset": "<usdc asset id>"
},
"finalized": <number>, // block the reserves were read at
"generatedAt": <ms since epoch>
}https://corexusdex.com/api/market-insightReturns AI-generated market commentary from HiveIQ (Claude) based on the figures you supply in the request body. The endpoint does not read chain or market data itself — the quality of the output depends entirely on the inputs.
| Parameter | Type | Required | Description |
|---|---|---|---|
| price | number | Yes | VTRS price in USD (caller-supplied) |
| volatility | number | Yes | Volatility on a 0–100 scale (caller-supplied) |
| poolDepth | number | Yes | Liquidity depth in USD (caller-supplied) |
curl -X POST https://corexusdex.com/api/market-insight \
-H "Content-Type: application/json" \
-d '{"price": <number>, "volatility": <number>, "poolDepth": <number>}'Response shape (illustrative — values are placeholders, not sample data):
{
"insight": <string>, // one-paragraph commentary
"volatilityLevel": "LOW" | "MEDIUM" | "HIGH",
"trend": "BULLISH" | "NEUTRAL" | "BEARISH",
"recommendation": "NOW" | "WAIT" | "CAUTION",
"confidence": <number> // 0–100
}Embeddable Widgets
Drop these into any website to show live Vitreus data.
Price Widget
Displays live VTRS price with 24h change. Two lines of HTML, zero dependencies.
<script src="https://corexusdex.com/widget.js"></script>
<div id="vtrs-widget"></div>DEX Pallet Reference
Every call, storage item, event and error of pallet-vitreus-dex, read from the runtime metadata of the node this page is connected to. Signatures cannot go stale; the explanations are maintained by hand.
Asset arguments are Native for VTRS or WithId(u128) for a pallet-assets id. Amounts are base units (VTRS has 18 decimals).
Reading the DEX pallet reference from the runtime…
Launchpad
Bonding-curve token launches: pallet-launchpad. Every figure below is read from the runtime when this page loads.
Reading the launchpad reference from the runtime…
Security
Internal security review — April 2026
In April 2026 the maintainers ran an AI-assisted internal review of pallet-vitreus-dex. It is not an independent third-party audit. At the time it identified and resolved 12 findings — 1 Critical, 4 High, 4 Medium, 3 Low — against a pallet with 11 unit tests. pallet-launchpad (added September 2026) has not been reviewed.
1
Critical
4
High
4
Medium
3
Low
Key fixes: first depositor attack prevention (MINIMUM_LIQUIDITY), pair canonicalization, reserve syncing, fee separation, optimal deposit calculation, slippage enforcement.
Test coverage has grown since: as of September 2026, cargo test reports 86 tests in pallet-vitreus-dex and 34 in pallet-launchpad. Both pallets compile into the full runtime.
Security Contact
Report vulnerabilities to security@vitreus.io. We operate a responsible disclosure policy.
Changelog
- Swap interface (UI only; on-chain execution landed in September)
- Pool creation form (UI only; removed in September — create_pool is a governance call)
- Pool detail pages: reserves, fee tier, price from reserves, LP composition — read from chain
- Analytics: DEX-wide TVL, 100-block volume, top pools and tokens — read from chain
- Token Explorer: every registered asset with its headline price from the deepest pool
- Solver solvers table and per-solver detail pages — read from chain
- pallet-vitreus-dex internal security review — 12 findings resolved
- Developer documentation, public VTRS price API and embeddable price widget
- Swaps execute on chain: signed by a Substrate wallet extension (Ethereum-type account), tracked through InBlock and Finalized
- Public RPC at wss://corexusdex.com/rpc behind a method allowlist
- Token launchpad (pallet-launchpad, index 57): live launch board at /launch, creation at /launch/new, per-launch curve pages with buy / sell
- Landing page, ticker and every list page read live chain data; routes with nothing on chain behind them were taken offline
- Removed the ERC-20 token wizard — it generated Solidity for a chain that cannot deploy it
- Removed the pool-creation wizard and its advisor endpoint — create_pool is Root-gated on chain, so no user could have submitted it; add_liquidity (permissionless) has no UI yet and the pool pages say so
- Removed the EVM wallet connector (MetaMask): every transaction the site sends is signed by the Substrate extension, so the navbar now connects that one wallet
- Removed eight placeholder routes (activity, bridge, compare, governance, leaderboard, liquidity, portfolio, stake) that had nothing behind them
- Removed /api/lens, an unauthenticated proxy to the Lens backend that no page called; Vitreus Lens is linked directly instead
- A graduated launch trades on its own page: the swap panel from /swap sits where the curve panel was, pinned to the pool the graduation seeded; /swap takes ?in=&out= by asset id and pool pages link to their pair
- One page per launch token: /tokens/<asset id> redirects to the launch page (after confirming the launch records that asset), which now shows the pool, headline price, volume and recent activity
- Fixed swap volume and swap activity, which were only ever counted for VTRS: event asset ids came out of the node as numbers or hex and were compared against decimal strings, so no registered asset matched
- Token directory groups by provenance — chain assets, launches, hand-registered — decided from the id and chain storage, never from metadata; the explainer points at the live case of two tokens sharing a symbol. Analytics' USD reference is pinned by asset id (VITREUS_USDC_ASSET_ID) instead of found by symbol, which a 1-VTRS launch could hijack
- Pool pages add and remove liquidity (add_liquidity / remove_liquidity, open to anyone). Every position shows its own lock: a graduated launch's escrow seed is locked forever and is named as such; liquidity anyone adds afterwards is unlocked and withdrawable. lock_liquidity deliberately has no UI
- Event indexer: a finalized event log with explicit gaps and an alarm replaces every per-request block scan. Volume, trades, fees routed and activity are 24h figures from the log; price charts are one series per token across graduation; when the indexer is down the pages say so instead of showing a ten-minute window as data
- Solver marketplace pages are labelled read-only and say why: intents are not submitted from the site until a solver runs against the chain. /solvers lists every intent with its assets by id and any commitment; analytics names the asset its USD figures are pinned to
- Search (⌘K) lists the tokens and pools that exist on chain instead of a fixed list; fixed /swap mis-addressing launchpad assets (ids above 2^53 were rounded)