
Vault physical Magic cards, sell shards to verified humans, and buy out 80% to take the card home.
Kura (蔵, "storehouse") is a vault for real Magic: The Gathering cards that gives them a market. Bring a card to a shop. The vendor scans it, Kura recognises the exact printing and prices it, and the owner gets an on-chain twin. The card itself stays in the vault. Split it into shards and half go on sale in a Uniswap auction. Only verified humans can bid, so bots can't sweep a Black Lotus. When the auction closes, the money raised and the other half of the shards open a Uniswap pool at the auction price. The owner becomes its liquidity provider and earns the trading fees, and the card now has a live price anyone can trade. Want the whole card? Get to 80% of the shards. Buying them from the pool pushes the price up. Then buy out the rest, everyone else gets paid, and you pick up the card at the counter with a World ID passport check. Every card has its own ENS name, like lightning-bolt-4ed-1.kura.eth, with its state, condition and appraisal in the records. And the vault reads like a market: value, volume, premium to market price, and how close each card is to a buyout.
Contracts are Solidity with Foundry, on Ethereum Sepolia. CardVault holds each card as an ERC-721, creates an ERC-20 for every sharding, and runs the auction, the buyout and the release. ShardMarket owns each card's Uniswap v4 pool. The tests fork Sepolia and run against the real Uniswap, Permit2, USDC and ENS contracts. Uniswap. Each sale is a Continuous Clearing Auction, and our validation hook only lets World ID-verified bidders in. At settlement ShardMarket opens a v4 pool at the clearing price and locks the owner's liquidity in it. It is also the pool's hook: it freezes trading once the card is bought out but always lets LPs withdraw, and it emits a trade event per card for our indexer. The fiddly part was turning the auction's clearing price into a v4 pool price for both token orders, and placing the leftover shards as a one-sided position. The app trades through the Universal Router with Permit2. World ID. Proof of Human gates bidding, one wallet per human. The Passport credential gates taking the card home. Our server checks each proof and signs a short-lived ticket that the contracts verify on-chain. ENS. kura.eth runs on ENSv2 with its own registry and resolver. Cards get non-transferable names that are revoked on release, and collectors claim handles. Rights are per record: the vendor edits condition, an appraiser agent writes appraisals, and nobody else can touch them. Indexer and app. A Ponder indexer on Railway feeds live SQL queries into a Next.js app on Vercel, so pages update as blocks land. The same indexer powers the analytics. Privy handles login and embedded wallets with sponsored gas. The hacky bits: - Card recognition runs in the browser. A DINOv2 model embeds the webcam frame and matches it against about 45,000 Scryfall artworks stored as int8 vectors. Alpha cards have no collector number, so OCR was out. - Prices respect finish and language. Foil and regular never mix, and a missing price falls back to the English printing before the condition discount. - The appraiser can't send the same on-chain write twice: each one is claimed under a Postgres advisory lock with a fresh nonce.