# Building on Exchange: a brief for builders and their agents

> Drop this file into your project (as `AGENTS.md`, `CLAUDE.md`, or a system prompt) before you build anything that
> reads, shows, trades or extends Credits, Statements, $BALANCE or Bars. It is the whole system in one place:
> what each piece is, the contracts and the calls that matter, where the data lives, and the rules new work keeps.
>
> Facts were checked against Ethereum mainnet at block 26,470,611 (November 22, 2026). Counts move; addresses and
> rules don't. When this file and the chain disagree, the chain is right.
>
> The latest copy is always at https://jack.art/exchange/agents.md

---

## 1. The whole thing in one paragraph

Exchange is one artwork in three forms, by Jack Butcher, on Ethereum. **Credits** are 122,154 small artworks, each
drawn from one $8 payment, each with a fixed **rating** from 80 to 800. Burn 80 Credits and you **make** a
**Statement**: one page holding all 80, whose rating is their sum. **Lock** a Statement and the $BALANCE contract
releases one **Balance** (the money) per rating point, and draws every wallet holding Balance as its own artwork.
**Bars** are the first work built on Balance: Bar #n seals exactly n BALANCE in its own vault until its owner
**melts** it. The three forms always add up:

```
rating of unburned Credits + rating of live Statements + BALANCE released (net) = 53,750,000
```

Nothing new can be minted into that sum. Everything you build sits on top of it.

---

## 2. Contracts

All are on Ethereum mainnet (chain id 1). Source for each one is verified on Sourcify (exact match) and Etherscan.

| Name | Address | Standard | What it is |
| --- | --- | --- | --- |
| Credits | `0x97630aA70AB14ed9883B41dAfccBc11349723043` | ERC-721 | 122,154 Credits. Sealed: no more can be made. Art drawn on chain. |
| Statements | `0x75Edd94b7e49b3bD5C8047b91F165A5e265a069b` | ERC-721 | Pages of 80 Credits. Make, overprint, nine on-chain formats. |
| CreditScore | `0x817A9cFfb4d6E7c206e745A4229001A472C1b7B7` | — | The rating formula Statements uses. |
| $BALANCE | `0x3620540c994433D7B4a628C46d2ED5F92572eA07` | ERC-20 | Name "Balances", symbol BALANCE, 18 decimals. Also the lock contract. |
| Wallet artwork | `0x3F2BA6C00c386986686A429c52099AaCD51b7e38` | ERC-721, soulbound | One per wallet that has ever received BALANCE; draws its live balance. Name "Balances". |
| Bars | `0x7d9EdeA03dD97361c3e21389B95bc327e22752aE` | ERC-721 | Symbol BARS. Bar #n holds n BALANCE in its own vault. |
| Uniswap v4 PoolManager | `0x000000000004444c5dc75cB358380D2e3dE08A90` | — | Where BALANCE trades. |

Launch pool (the main BALANCE market): ETH / BALANCE, 0.30% fee, tick spacing 30, no hook. Pool id
`0xd262227cd6ad883b3d85c5138f017f90aaac0ff3ce69136c36a7280dbd009a03`. About 25 other BALANCE pools exist (ETH and
USDC at other fees), and a router may split one trade across several. If you report trades or price, read all of
them or say which pool you read.

OpenSea collection slugs: `credits`, `statements`, `bars`.

---

## 3. Each piece, and the calls that matter

### Credits

- 122,154 exist, numbered from 1. The edition is sealed. Credits are burned only by Statements, so the count only
  goes down. About 73,800 remain unburned.
- Each Credit's pattern comes from SHA-256 of its payment's 21-character transaction id; its colours come from the
  payment's UTC second: `(timestamp % 15) + 1`, read as bits C, M, Y, K.
- **Rating**: fixed, 80 to 800. Rarer traits rate higher. Ratings are stored in four-decimal *score units*
  (`80.0000` is `800000`).
- Reads: `ownerOf(id)`, `tokensOf(owner) → uint256[]`, `tokenURI(id)` (on-chain SVG metadata),
  `preview(bytes21 seed, uint64 paidAt)` (draw any seed).
- Event: `Distributed(uint256 indexed tokenId, address indexed to, bytes21 seed, uint64 paidAt)`, once per Credit at
  launch. Use it to reconstruct seeds and payment times.
- `totalSupply()` is not implemented (it reverts). Use 122,154 and subtract burns.

### Statements

- **Make** (the contract says *compose*): `compose(uint256[80] creditIds, uint8 format)` or
  `compose(uint256[80] creditIds, uint8 format, address to)`. The caller must own all 80 Credits and have called
  `setApprovalForAll(Statements, true)` on Credits. The 80 Credits are burned and laid out in the caller's order on an
  8 × 10 page, each keeping its own palette. At most 1,526 Statements can ever exist. A contract recipient must
  implement `onERC721Received`.
- **Overprint**: `overprint(baseId, topId)`. The top Statement is burned; its ink and rating join the base. From
  the seventh overprint (`INVERTED_AT = 7`), a Statement prints on black paper for good.
- **Formats** (each a fully on-chain renderer; the owner switches with `setFormat(id, format)`):
  0 Issued, 1 Consolidated, 2 Assessed, 3 Reconciled, 4 Accrued, 5 Amortized, 6 Liquidated, 7 Recorded,
  8 Balance (the locked format: a locked Statement reads WITHDRAWN). `formatCount()` is 9.
- Reads: `creditScoreOf(id)` (its rating, in score units), `inkOf(id) → uint256[240]`, `composedFrom(id) → uint32[80]`,
  `overprintsOf(id)`, `overprintedWith(id)`, `formatOf(id)`, `formatName(format)`, `statementSVG(id)`,
  `statementHTML(id)` (interactive view for formats 0, 1, 3), `tokensOf(owner)`, `tokenURI(id)`.
- Events: `Composed(statementId, by, uint256[80] creditIds, format)`, `Overprinted(baseId, topId, by)`,
  `FormatChanged(statementId, from, to)`, `MetadataUpdate(tokenId)`.

### $BALANCE (the money) and locking

- Fixed supply: **53,750,000 BALANCE**, 18 decimals. No mint path, no owner, no pause, no blocklist, no upgrade.
  The contract minted its whole reserve to itself once; locking is the only way BALANCE leaves the reserve.
- **Lock** (the contract says *withdraw*; terms say *surrender*, the whitepaper *conversion*): approve the BALANCE
  contract for one Statement, then call `withdraw(id, expectedAmount)` as its owner. `expectedAmount` must equal
  `quote(id)`, which is `creditScoreOf(id) × 1e14`: **one rating point = one BALANCE**. The Statement moves into the
  BALANCE contract for good, switches to format 8, and the BALANCE is sent to the caller, all in one transaction.
  Never send a Statement with a raw `transferFrom`; that skips the receipt and strands it.
- **Merge**: `overprintWithdrawn(id)` is permissionless. It overprints one locked Statement onto the first one ever
  locked (Statement #285). No BALANCE moves.
- Reads: `totalSupply()`, `totalReleased()`, `totalRetired()`, `unreleasedSupply()`, `quote(id)`, `withdrawnCount()`
  (447 locked), `lockedAmountOf(id)`.
- Events: `Withdrawn(statementId, holder, amount)`, `WithdrawnOverprinted(baseId, topId, cumulativeAmount)`,
  standard `Transfer`/`Approval`, and `InkMoved(from, to, uint256[4] ink)`.
- **Ink**: every wallet's BALANCE carries a CMYK mix, measured from the ink of the Statements it was released from.
  `inkOf(wallet) → uint256[4]` (C, M, Y, K amounts); `historyOf(wallet)`. A transfer moves ink in proportion: units
  leave at their wallet's average mix. Ink is tracked per holding address, so the Uniswap PoolManager holds one mix
  for every pool, and routers mix whatever passes through them.
- **Wallet artwork**: the first time a wallet receives BALANCE, the Wallet artwork contract gives it one
  non-transferable token (`tokenIdOf(wallet)`). It stays with the wallet at zero and always draws the current
  balance. 42,133 exist. That first receipt costs more gas (about 236,000 for a transfer that creates one).

### Bars

- Bar #n holds exactly n BALANCE in its own vault (a contract deployed per Bar). **The token id is the amount
  inside.** Each Bar is drawn on chain as its number: one cell per digit, punched out like a die, inked from the
  CMYK mix its deposit carried.
- Minting ran November 11–19, 2026 and is closed for good (`mintEnd` = 1795104000, 16:00 UTC Nov 19).
  **3,034 Bars were made.** A melted number is never made again, so Bars only go down.
- **Melt**: `melt(id)` or `meltBatch(uint256[] ids)` (up to 10), owner only, any time after the close. The Bar is
  burned and its vault sends everything it holds to the owner; the vault stays deployed, empty. 83 Bars melted so
  far.
- Reads: `minted()`, `melted()`, `isMeltOpen()`, `amountOf(n)`, `work(id)` returns
  `(vault, amount, minter, block, melted, uint256[4] ink)` and **still answers after a melt**, while `ownerOf(id)`
  reverts once a Bar is melted. `image(id)`, `tokenURI(id)`, `art(number, ink)` (draw any number in any mix).
- BALANCE still inside Bars = `minted × (minted + 1) / 2 − sum of melted ids` (4,494,616 BALANCE at the time of
  writing, about 8.4% of supply).
- Events: `Minted(id, to, vault, amount)`, `MintBatch(payer, to, first, quantity, amount)`,
  `Melted(id, owner, amount)` (amount = what actually left the vault).
- No fee, owner, setter, upgrade or withdrawal anywhere in the contract.

---

## 4. Reading the data

### From the chain (the source of truth)

- Not every public RPC serves the logs you need. MEV Blocker (`https://rpc.mevblocker.io`) caps `eth_getLogs` at
  10,000 blocks per request; publicnode refuses older ranges without a token; publicnode and dRPC also refuse some
  BALANCE log queries. Read logs in 10,000-block steps and keep a checkpoint of how far you got.
- Useful starting blocks: BALANCE deployed at 26,229,421; Bars at 26,392,068.
- Ratings convert to token amounts by `× 1e14`. Keep everything in `bigint` until display.
- All artwork is on chain: `tokenURI`/`image`/`statementSVG` return SVG you can render directly.

### From jack.art feeds (convenient, not an API)

The Exchange site publishes the JSON it draws from. It is handy for prototypes, but it is **unversioned, can change
without notice, and sends no CORS headers**, so a web page on another origin can't fetch it (a server, a script, or
a browser extension with host permission can). Cache it; don't hammer it.

| URL (`https://jack.art/exchange/…`) | What's in it |
| --- | --- |
| `supply/total`, `supply/circulating` | Plain numbers (used by CoinMarketCap and CoinGecko). |
| `balance-price.json` | Pool price: `ethPerBalance`, block, pool id. |
| `summary.json` | Supply split (in Credits / in Statements / released), counts, BALANCE inside Bars, ETH/USD. |
| `holders.json` | Holder stats (count, median, top 10/50/100, gini, bands), pool stats and price `series` as `[unixSeconds, ethPerBalance]`. |
| `ledger-chain.json` | Recent activity rows: swaps across the BALANCE pools, makes, locks, Bar mints and melts. |
| `ledger-data.json?scope=market` | OpenSea listings and sales for Credits, Statements and Bars (`market.bars`). About 700 KB. |
| `credit-scores.json` | Every Credit's rating, by id. About 2 MB. |
| `balance-gallery.json` | Wallet artwork data for the gallery. |

---

## 5. The rules new work keeps

These are the Rules of Exchange (jack.art/balance). They govern every new work that touches Credits, Statements or
BALANCE. An extension that breaks one is not part of Exchange, whatever it is called.

1. **Never change the money.** BALANCE's supply, rules and contracts stay as deployed. Anything new is a separate
   contract holders are free to ignore.
2. **Pay no one to hold.** No yield, rewards, staking or revenue share.
3. **Hold nothing you don't need to.** Every contract that holds BALANCE is a new way to fail. Prefer reading and
   showing over custody. If you must hold it, get an independent audit first.
4. **Every price sees the whole stock.** Never gate sellers while buyers bid; never support or defend a price.
5. **Issuance is open to every holder.** One Credit should reach BALANCE on the same terms as eighty.
6. **Show the whole supply.** Released, convertible and stranded, at every block.
7. **Color is memory, never value.** Nothing pays, charges or ranks by ink. Every unit stays worth every other.
8. **The artist moves by published rule.** No privileged access.

What that means in practice: read-only tools, viewers, dashboards, frames, renderers, games and art that *reference*
holdings are the safe ground. Anything that takes custody of BALANCE, prices ink, or pays holders needs a hard look
against rules 2, 3 and 7.

---

## 6. Vocabulary

One name for each thing. Use these in anything people read.

| Say | Not | Meaning |
| --- | --- | --- |
| Credit | — | One artwork from one $8 payment. |
| Statement | — | One page made from 80 Credits. |
| Balance / $BALANCE | points, tokens | The money. Write the token as $BALANCE; "Balance" for the money and for a wallet's artwork. |
| Rating | score, credit points | A Credit's fixed 80–800; a Statement's is the sum of its Credits. |
| Make | compose, assemble | Burn 80 Credits into a Statement. |
| Overprint | — | Print one Statement onto another; the top burns. |
| Lock | withdraw, surrender, convert | Give up a Statement for good for one Balance per rating point. |
| Merge | — | Overprint two locked Statements. No Balance moves. |
| Bar | — | Numbered object sealing Balance in its own vault. |
| Melt | redeem, burn | Burn a Bar and take its Balance back. |
| Wallet artwork | — | The soulbound piece that draws a wallet's live balance. |

Credits, Statements and Bars are artworks; never call them "pictures".

---

## 7. Gotchas that will bite

- **Statement rating vs. Credit rating**: a Statement's rating includes every overprint. Read `creditScoreOf(id)`;
  don't add up the Credits yourself.
- **Locked Statements are owned by the BALANCE contract.** An owner list that counts the BALANCE contract as a
  collector is wrong; treat it as "locked".
- **Melted Bars**: `ownerOf` reverts, but `work(id)` still answers with `melted = true`.
- **Bars ids are amounts**: Bar #2,663 holds 2,663 BALANCE. A sale's premium over what's inside is
  `price ÷ (id × BALANCE price at the time)`.
- **Ink is per address, not per pool or per unit.** Don't promise a buyer "the ink of Statement #X".
- **One trade, many pools.** Uniswap routers split BALANCE trades. Group swap logs by transaction hash.
- **Credits `totalSupply()` reverts.** Count from `Distributed` events and burns.
- **Wallet artwork can't be approved or transferred**; `approve` and `setApprovalForAll` revert by design.
- **Big log ranges fail.** Step through 10,000 blocks at a time.

---

## 8. Where to look

- Rules and the 20 properties BALANCE is heading toward: https://jack.art/balance
- The story and glossary: https://jack.art/exchange/story
- The market screen (prices, supply, activity): https://jack.art/exchange/
- Bars (mint record, melt, every Bar): https://jack.art/exchange/bars
- Make a Statement: https://jack.art/credits/assemble
- Ratings and the formula: https://jack.art/credits/rating
- Whitepaper: https://jack.art/credits/whitepaper
- Verified sources: https://sourcify.dev (search any address above) or Etherscan.
