I built a security-deposit court on GenLayer: AI validators rule claim by claim
Every year, renters lose part of a security deposit to deductions they think are unfair. Almost none of them go to small claims court, because the time costs more than the money. That's a shame, because the legal test is
Every year, renters lose part of a security deposit to deductions they think are unfair. Almost none of them go to small claims court, because the time costs more than the money. That's a shame, because the legal test is usually simple:
- Is it damage beyond normal wear and tear?
- Does the lease allow the charge?
- Was the problem already there at move-in?
I build dispute apps on GenLayer, so I turned that test into a contract. DepositCourt keeps the deposit in a GenLayer Intelligent Contract. When the tenant disputes a deduction, every validator reads the lease, both condition reports and the evidence pages itself, and rules on each claim.
Live app: https://yoyoblair333-wq.github.io/depositcourt/
How a case runs
- The landlord opens a tenancy with numbered lease clauses, a move-in report and the deposit amount.
- The tenant locks the deposit. After that, nobody can move it except by the rules. There's no owner, admin or upgrade key.
- After the lease ends, the landlord itemises deductions: item, amount, reason and evidence link. If nothing is filed in time, the tenant takes the whole deposit back. No AI is involved in that path.
- The tenant accepts or disputes each claim. Accepted claims are paid in full without asking anyone.
- The validators rule on the disputed claims.
- Either side can appeal once with a 10% bond. Then plain code splits the deposit and both sides withdraw.
The one question the AI answers
The model never decides who is "right". For each disputed claim, it answers one narrow question: may the landlord keep FULL, HALF or NONE of this amount, and under which clause number?
Deterministic code then cleans up the answer:
-
UNCERTAINbecomesNONE, because the landlord carries the burden of proof. -
FULLorHALFciting a clause that doesn't exist becomesNONE. - A malformed reply becomes
NONE.
Validators compare only the ordered verdict vector, like ["FULL","NONE","NONE"]. The written reasons are display-only, so two models can word things differently and still agree. Everything about money (escrow, splits, bonds, deadlines, withdrawals) is plain Python that never touches the model.
What happened on studionet
I ran the same fictional unit through four cases (numbered by their tenancy id; #4 is a visitor case from the web app). The claims were a bedroom door (0.5 GEN), oven cleaning (0.25 GEN) and a countertop scratch (0.5 GEN), against a 2 GEN deposit.
-
Case 1: The tenant accepted the door, so it was paid in full. The validators matched the countertop scratch to the signed move-in report and ruled it not chargeable. The oven came back
NONE, because the record had conflicting accounts and no proof beyond an invoice. Result: the tenant got 1.5 GEN back. - Case 2: The tenant appealed a ruling that was already in their favour. Nothing changed, so their bond went to the landlord. That's exactly why the bond exists.
- Case 3: The landlord filed nothing in the claim window, so the tenant took the whole 2 GEN back with zero AI involved.
-
Case 5: The landlord appealed the oven ruling with a better argument: the move-in report says the oven was clean, and the tenant's own page admits residue remained. The validators changed the oven to
FULLunder the cleaning clause, kept the countertop atNONE, and the landlord got the bond back.
Every round reached consensus. Transaction hashes are in the live evidence file.
Lessons I'd pass on
-
Make "unclear" pay someone specific. Disputes need a default. Here, unclear means
NONE, because the deposit holder has the burden of proof. - Compare decisions, not prose. Exact equality on a small vector is what makes model consensus stable.
- Keep the AI away from money. It labels claims; code moves GEN.
- Treat evidence as data. Every fetched page sits inside random fences, and a "ignore your rules" line in a photo caption changes nothing. There's a test for it.
-
Fees changed on studionet. Transactions are now fee-aware. If your
withdrawemits a transfer, estimate fees for that write so the message fees are included. Otherwise it gets canceled.
Try it yourself
On the site you can connect a wallet (or use two test keys) and play both landlord and tenant through a full case.
If you want to build your own GenLayer app and earn builder points while you learn, the portal is here: https://portal.genlayer.foundation/?ref=JTR01FHP
Testnet demo with test tokens. Not legal advice; deposit rules differ by state and country.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.