Inspiration
In Zillow's 2024 Consumer Housing Trends Report, only 40% of renters who moved out got their whole security deposit back, and 24% got none. What bothered me is who holds what: at move-out, the landlord holds the money and the evidence, so the renter has to chase their own deposit, sometimes all the way to small-claims court. Even renters who documented everything got a full refund only about half the time. I wanted the opposite default: the evidence and the money live somewhere neither side can quietly change, and the landlord has to prove every dollar they keep.
What it does
Keyprint is a renter-owned 3D record of an apartment, paired with a USDC deposit escrow on Arc.
- Move-in: import an iPhone LiDAR scan, pin damage that's already there, and one Face ID touch seals the record on Arc and moves the deposit into an escrow with no admin key (not even mine).
- Move-out: four rough taps line up the second scan, a slider sweeps the same wall before and after, and AI suggests what changed. It never prices anything.
- Claims: the landlord can only keep money they pin to a spot in the 3D room and price; the renter approves or disputes each line.
- Deadlines: no claim by the deadline means a full refund, triggered automatically, and anyone can trigger it.
It runs on Arc Testnet with test USDC.
How I built it
- Contracts: two ownerless Solidity contracts built with Foundry (20 tests, including fuzz and invariant tests).
KeyprintRegistryseals SHA-256 fingerprints of scans, pins and claim evidence;KeyprintEscrowholds the USDC deposit and enforces evidence ordering, claim limits and deadlines. - Invisible crypto: Circle Modular Wallets give everyone a passkey smart account (ERC-4337). Each action is a UserOperation sponsored by Circle Gas Station, with several calls batched into one Face ID touch (seal scan + pins + USDC approve + fund). USDC is Arc's gas token, so fees are dollars: a full 12-transaction scripted lease cost $0.031613.
- 3D line-up: Next.js, React and three.js in the browser. Four taps give a first similarity fit (Umeyama), then a point-to-plane ICP fine-tune on a
three-mesh-bvhindex:
$$ \min_{R,\,t}\ \sum_i \big( (R\,p_i + t - q_i)\cdot n_i \big)^2 $$
with the pairing radius shrinking from 30 cm to 3 cm and the scale held fixed, so a scan can't shrink to fake a match. The comparison only unlocks past a gate:
$$ \operatorname{median}_i d_i \le 2\ \text{cm} \qquad \text{and} \qquad \frac{\big|{\, i : d_i \le 5\ \text{cm} \,}\big|}{N} \ge 0.6 $$
On my two real scans, with taps off by 2–4 cm, the fine-tuned fit passed 15 of 15 trials; taps alone passed 1–4.
- AI: matched 1024×768 before/after renders go to Google Gemini in parallel batches; the output is schema-validated JSON, and code, not the model, matches each change to the move-in pins.
- Evidence: the browser streams a SHA-256 hash, canonicalizes the manifest (RFC 8785), and uploads the scan to a private bucket through a short-lived signed URL. On
/verify, anyone can check a file against Arc in their own browser: the original passes; change one byte and it fails. - Settlement: permissionless. Keyprint's keeper settles at the deadline, a daily job is the backstop, and the renter has a one-tap backup.
Challenges I ran into
- Every passkey transaction failed right after Face ID. Arc's RPC suggests a priority fee of 0, Circle's bundler rejects anything under 1 gwei, and a fee cap of 1.2× the base fee left operations sitting unbundled. The fix:
$$ \text{tip} = \max(\text{suggested},\ 1\ \text{gwei}), \qquad \text{maxFee} = 2 \cdot \text{suggestedMaxFee} + \text{tip} $$
Operations now confirm in about 2 seconds, still fully sponsored.
- Face ID that never showed up. It wasn't Face ID at all: Circle usernames must be 5–50 characters from
[A-Za-z0-9_@.:+-], and mine had spaces. - AI boxes in the wrong place. Gemini answered in its native 0–1000 coordinate space instead of pixels. Asking for its
box_2dformat and converting it fixed it:
$$ x = \frac{x_{\min}}{1000}\cdot 1024, \qquad y = \frac{y_{\min}}{1000}\cdot 768 $$
- The AI missed the real damage. On my real scans, none of the fixed cameras faced the wall with the staged sticky note. I added change spotting: sample both surfaces, compare their colors, and aim extra cameras at the biggest differences. The comparison then returned exactly one item: "Sticky note on wall".
- Human taps are sloppy. Four taps land centimeters off, which is why the ICP fine-tune exists. Along the way I found a bug where surface normals were read in the BVH's reordered index instead of the mesh's.
- iPhones grayed out the scan files. Safari can't map
.glbto a file type when a file input filters by it, so the picker now accepts any file and the app checks the name itself. - Overloaded models. Gemini's best model sometimes returned 503s or hung, so each batch now asks the best model and the fast model at the same time, with a short grace period for the better answer.
What I learned
- Account abstraction really can make crypto invisible, but only if you sweat the unglamorous details: fees, usernames, and Safari's rules about when Face ID may appear.
- A hard geometric gate does more for trust than a smarter model. Once two scans provably line up, both the AI's suggestions and any dispute get easier.
- AI should suggest and code should decide. Keeping prices and pin-matching out of the model keeps every result explainable.
- Defaults are the product. "No claim by the deadline means a full refund" changes who has to act.
What's next
In-app LiDAR capture with device attestation, a record that moves with the renter to their next apartment, client-side encryption of scans, state deadline presets (like California's AB 2801 photo rules), cross-chain USDC funding through Circle's CCTP and Gateway, and an Arc mainnet launch after a legal review of deposit custody.
Built With
- arc
- circle
- erc-4337
- modular
- usdc
- wallets