Proof of Stock Connect an agent

Demo Agent · live

Demo Agent finds the real stock

Pick a stock. The agent searches Base the way anyone would and finds every token that carries the name. Proof of Stock tells the fakes from the issuer's original, and the agent goes for the original only, at a price held to the issuer's. A live agent would then swap with its own wallet; here the swap is simulated and no money moves.

New to this? Coinbase issues tokenized stocks on Base, its network; their tickers end in "c" (CRCLc is Circle). You pay in USDC, a digital dollar. Anyone can make a token with the same name, so the agent checks which one Coinbase issued.

    Amount
    For developers: build the unsigned swap for your wallet

    This demo runs in your browser and needs JavaScript. What it does is below.

    What happens, step by step

    1. 1
      You pick a stock

      Circle, Tesla, SanDisk, NVIDIA, Apple, Amazon, or any company or ticker you type.

    2. 2
      The agent searches the market

      Like anyone would: every token on Base whose name or symbol says that stock. Often there are several, and they look alike.

    3. 3
      Proof of Stock checks them all

      One call for every token found: is it on the issuer's own list, or does it copy a token that is?

    4. 4
      The fakes and the unknown are dropped

      A copy of the issuer's symbol is a fake. A token simply not on the list may be another issuer's: the agent cannot vouch for it, so it skips it too.

    5. 5
      The original

      The one the issuer itself put on Base. The agent buys that one only, and reads its passport: still minted, not paused, the issuer's price.

    6. 6
      A live quote, held to that price

      An aggregator (KyberSwap) quotes the swap. The agent refuses a price more than 3% from the issuer's, or a quote for any other contract.

    7. 7
      The swap, simulated

      A live agent swaps with its own wallet, within your limits, at no more than 3% over the issuer's price. This page has no wallet, so the swap is simulated and no money moves. To buy yourself, open the token's passport in the terminal.

    The page runs examples/agent-search.mjs and agent-buy.mjs from the guard package as they are. Your agent can make the same check in one line: npm install @proofofstock/guard, then await guard.beforeBuyMany('base', tokens) on everything a search turns up.

    v0.9.0 · prices are quotes at the moment you run it, not advice · token names come from the market search and are shown as written, without links · the search, the quote and the token's decimals come from GeckoTerminal, KyberSwap's aggregator and Base's public RPC, straight from your browser; the swap button opens Aerodrome, which shows its own price · the guard, the API.