Kerne stock quote agent

A pricing agent for covered calls on Coinbase tokenized stocks on Base. First market: TSLAc.

loading

What it does

Every 15 minutes a Cloudflare Worker reads the Chainlink TSLA feed on Base, measures how much the price has moved over the last 14 days, and prices next week's covered call for the Kerne covered call vault. It signs the result and publishes it here with every input it used. The vault's weakest point was that its keeper chose the premium by hand. This is the answer to "who sets the price": a published rule, run on a schedule, that anyone can recompute.

  1. Read. One block on Base: the feed's latest round, up to 500 earlier rounds, and the vault's own limits (minimum distance out of the money, minimum premium, duration limits).
  2. Measure. Realized volatility is the sum of squared log returns between consecutive feed rounds over 14 days, annualized over calendar time.
  3. Price. Strike is the 20 delta call for the next Friday 16:00 UTC expiry at least 3 days out, never closer than the vault's floor plus 1%, rounded up to a whole dollar. Premium is Black-Scholes at 1.10 times realized volatility with zero rate, in basis points of notional, paid in the stock.
  4. Sign. Two signatures from one dedicated key: one over the whole document, and one EIP-712 signature over the compact quote that a contract can check. The quote is tied to the feed round it was priced on and expires after 15 minutes. Expiry sits inside the US session on purpose: the vault settles on the first feed round at or after expiry, and the feed is often silent from the Friday close until Monday.

Check it yourself

Signer (the trust root): 0x9653Bf177239C979921DC8C0639eD00409F4Db88. This key signs quotes and nothing else. It is not the vault's keeper or owner and has never sent a transaction.

curl -s https://kerne-stock-quote.r4woutreach.workers.dev/api/quote?verify=1

# independent check: re-reads the feed on another RPC and recomputes everything
curl -sO https://kerne-stock-quote.r4woutreach.workers.dev/verify.py
pip install eth-account
python -I verify.py

The verifier shares no code with the Worker. It checks both signatures, re-reads the same feed rounds and vault limits at the signed block from a different RPC, and recomputes the volatility, strike and premium with its own integer math. All pricing math is integer fixed point, so the numbers match to the last digit.

Endpoints: /api/quote, /api/quote?verify=1, /api/quote/history, /api/signer, /healthz, /verify.py.

From quote to epoch

KerneQuoteKeeper.sol is a small reference contract. Set as the vault's keeper, it opens an epoch only at a strike and premium signed by this agent, only while the quote's feed round is still the latest round, and only before the quote expires. A person still sends the transaction and can decide whether to open, but cannot choose the price. A fork test runs this against the deployed vault on Base with a quote signed by the live key. The contract is not deployed and the vault's keeper today is still the owner's hardware wallet.

What it is not