For the complete documentation index, see llms.txt. This page is also available as Markdown.

Inspect An Agent Token

The pool key

Every Orbofi agent trades in one Uniswap V4 pool. The key is uniform across all of them — only the currencies differ:

const poolKey = {
  currency0,                 // lower address of (agent, numeraire)
  currency1,                 // higher address
  fee: 8388608,              // 0x800000 — dynamic fee sentinel
  tickSpacing: 200,
  hooks: "0x4e3468951D49f2EEa976eD0D6e75fFCb44a9a544",
};

Because currencies are address-sorted, the agent is sometimes currency0 and sometimes currency1. Derive it, never assume:

const tokenIsCurrency0 =
  agentToken.toLowerCase() < numeraire.toLowerCase();

Both cases occur in production — an ETH-paired agent is almost always currency1, a stock-paired one is split roughly evenly. Derive it, never assume.

Price

There are two ways to get a price, and you need both.

From events, for a pool you are already following. Take sqrtPriceX96 from the pool's Initialize event and update it on every Swap. The raw ratio is:

P=(sqrtPriceX96296)2P = \left(\frac{\text{sqrtPriceX96}}{2^{96}}\right)^2

which is currency1 per currency0, in raw token units. Orient it to the agent:

Decimals. The ratio above is in RAW units, so it is only a token price when both sides have the same decimals. Agent tokens are always 18. Numeraires are not guaranteed to be — the factory keeps a timelocked decimals registry (numeraireDecimals(address)) precisely because non-18 numeraires exist.

Get the sign right: an 18-decimal agent against a 6-decimal numeraire scales by 10 ** 12, not 10 ** -12. Test against a non-18 pair, because on an 18/18 pair the factor is 1 and the bug is invisible.

Prefer integer maths (BigInt, or a fixed-point library) in production. The float form above is written for clarity.

From the chain, for a cold start. Event replay gives you nothing on a pool you have never followed — a fresh shard, a gap in your logs, or an agent that has not traded since launch. Uniswap V4's PoolManager is a singleton with no public state getters (it exposes extsload), so there is no slot0() to call.

The practical answer is to quote a small amount and divide:

This is fee-inclusive, so it reads slightly below the mid price — fine for display, and the only option that works on a never-traded pool. Use a probe small enough not to move the pool.

USD price and market cap

Convert the numeraire to USD with its Chainlink feed on Robinhood Chain:

Feed
Aggregator

ETH / USD

0x6091E64eb7138EEF066a80FD3A0d7427B91f2721

NVDA / USD

0xC9d16E4f2569b9E3ea0468fD85844953713DC2a2

AAPL / USD

0xBb11A21267cFDb63d4935d99a499133DD1744ACb

Feeds report with 8 decimals — read decimals() rather than assuming, and use latestRoundData() rather than latestAnswer().

This table is not exhaustive and stocks are added over time. Take the numeraire per agent from AgentCoinLaunched, and check it against the factory's allowedNumeraire(address) rather than a hardcoded list.

totalSupply is a plain ERC-20 read on the agent token. No new supply is ever minted, but the token is burnable, so totalSupply can decrease — read it live rather than caching the launch-time figure.

Market cap and FDV are the same number here, and that is correct rather than a shortcut. The entire supply goes into the pool at launch. Verified on chain across three agents spanning both fee configurations — the PoolManager holds at least 99.999% of totalSupply in every case, the remainder being fees already claimed out. There is no team allocation, vesting schedule or locked tranche to exclude.

Metadata

Name and symbol are standard ERC-20 reads, and are enough to render a token.

Richer agent metadata — avatar, description, socials, the agent page — is served by the AAC Metadata API: one GET per token, no auth, no scraping.

Last updated

Was this helpful?