Documentation

overviewcontractspooldark poolnotespayrolltollsapirun itrisks

Overview

KORE is four contracts on Elysium (chain id 99901, gas paid in HYPE). The vault holds USDC and issues kUSD against it 1:1. Two shielded pools, one for kUSD and one for wrapped HYPE, take fixed amounts under one-time keys and pay them out against ring signatures, which hides which deposit a withdrawal comes from. The dark pool trades kUSD against HYPE in sealed batches funded from those pools.

This website is a front end to those contracts plus an optional relayer. It holds no funds and keeps no ledger. Every figure it shows is read from the chain.

Vault…
kUSD…
kUSD pool…
HYPE pool…
Dark pool
USDC…
Toll address…

Contracts

KoreVault has three functions that change state:

There is no owner, admin, pause, freeze, fee setter, upgrade proxy or rescue function. redeem and sweep both end with require(usdc.balanceOf(vault) >= kusd.totalSupply()).

KUSD is a standard ERC-20 with 6 decimals. Its mint and burn accept calls from the vault only, and the vault is the contract that created it.

KorePool is deployed twice, for kUSD and for wrapped HYPE. It has two functions that change state, deposit and withdraw, described below, and no owner.

KoreDark has five: place, reveal, settle, payout and reclaim. It has no owner, no price feed and no fee setting.

The shielded pool

kUSD deposits come in four sizes: 10, 100, 1,000 and 10,000. HYPE deposits come in four sizes too: 0.1, 1, 10 and 100, held as wrapped HYPE. Each size has its own sequence of rings, and a ring closes when it holds 16 deposits.

What an observer learns from a withdrawal is that it spends one of the k deposits in that ring. A full ring gives 1 in 16. Claiming from a ring that holds few deposits gives less cover, and a ring of one gives none; the app shows the count before you sign. A full ring-of-16 withdrawal costs about 650,000 gas.

What is public: mints, redeems, deposits into the pool, and the recipient and time of each withdrawal.

The dark pool

A sealed-bid batch auction between kUSD and HYPE. Time is cut into batches of a fixed length, set at deployment and shown in the app.

Prices are quoted in kUSD per HYPE. A batch holds at most 24 orders per side. The dark pool charges nothing itself: the note pays the usual 0.30% pool toll as it leaves the shielded pool.

What is public: the side, lot size and batch of every order when it is placed; every revealed limit, the clearing price and the payout addresses after the batch closes. What is not: who funded an order, and its price while the batch is open.

An order that is not revealed in its window takes no part in the auction. Its owner can take it back with reclaim, which needs the same secret and keeps 1% for the toll address. The penalty exists because a trader who could walk away for free after seeing the other reveals would get a free look at the batch.

Notes and pay links

A note is the secret x as text: kore-note- followed by 64 hex characters. It is generated in your browser, stored in this browser's local storage, and never sent to the server. A pay link is the app address with the note after the #, which browsers do not transmit.

Whoever holds a note can claim the deposit, once, to any address. Give someone a note and you have paid them. Lose it and the deposit stays in the pool for good.

Payroll

KoreRouter seals many notes in one transaction. It has two functions:

Each entry is one note: a lot size and the public key of a secret made in the payer's browser. A run holds 1 to 32 notes; 32 notes cost about 3.6 million gas. If any entry is invalid the whole call reverts and nothing is taken. The router has no owner, no pause and no withdraw function, and its token balances are zero outside a call.

What the chain shows: the payer's address, the total, and the number of notes of each size. What it does not show: who each note was for, or which later claim spends which note. A payee who claims several notes to one address reveals their own total, so separate addresses or spaced-out claims keep more hidden.

Tolls

Mintnone
Seal (pool deposit)none
Redeem0.30% in USDC, left in the vault as surplus until sweep
Claim (pool withdrawal)0.30% of the denomination in kUSD, sent to the toll address
Dark pool ordernone beyond the 0.30% pool toll on the note that funds it
Unrevealed order1% of the order when it is reclaimed
Relayera flat fee in kUSD shown in the app, paid only when you use it

The toll address is set in every constructor and cannot be changed. It is the budget for buying $KORE on the market and burning it, and its balance and transactions are visible on the explorer. $KORE carries no claim on the vault's USDC.

API

GET  /api/config   chain id, RPC, explorer, contract addresses, relayer address and fee
GET  /api/stats    reserves, supply, backing, tolls, sealed value, open ring per denomination
POST /api/relay         { asset, denom, ringId, k, to, fee, c0, s[], image[2] }  ->  { tx }
POST /api/dark/place    { buy, denom, ringId, k, fee, c0, s[], image[2], commitment }  ->  { tx }
POST /api/dark/reveal   { id, limit, recipient, salt }  ->  { tx }
POST /api/dark/reclaim  { id, limit, recipient, salt }  ->  { tx }

Amounts are strings in base units (6 decimals for kUSD, 18 for HYPE). When a relayer key is set the server also settles finished batches and pays out revealed orders; both calls are open to anyone. The relayer checks the withdrawal against the pool first and returns the pool's own revert reason if it would fail. It cannot alter the recipient or the fee, because both are inside the signed message.

Run it yourself

npm install
npm run build        # compiles the contracts with Foundry
npm test             # 120 checks: ring signatures, vault and pools, dark pool, on a local chain
npm run dev          # local chain, contracts, relayer and this site on :8350

You never need this site to use KORE. Every function above can be called from a block explorer or a script, and client/lsag.js is the complete signing code.

Risks