RentVault — rental security-deposit escrow on Tari Ootle
Code (MIT): GitHub - factoruuu/rentvault · GitHub
MVP app (live demo, no wallet needed): RentVault — Rental Deposit Escrow on Tari Ootle
Tari payment address: 12C8uXfVLcwB668sTx8CE895k6TcLd3KU1y8LEJXGq2RMqyy13sL86eBguFGDkJoVUW3nM2g2jZFRwZxYQwwPCPCHMV
Announcement (Medium): https://medium.com/@v_sraddha/rentvault-the-rental-deposit-without-the-argument-7c71c7451f39
What it is
RentVault escrows a rental security deposit in an Ootle component that has no owner — not even its creator. When an agreement is created, the terms are locked: deposit amount, rental end epoch, dispute window, claim window. The renter locks exactly the agreed amount of TARI into the component vault. From Funded, the deposit resolves in exactly one of four ways:
- Mutual release — both parties confirm a good return (either order) → full refund to the renter.
- Owner claim — after the rental ends, the owner claims up to the deposit; execution waits out the dispute window; the unclaimed remainder refunds to the renter in the same call.
- Renter dispute — inside the window, a dispute voids the claim → full refund to the renter. (Deliberate trade-off, stated openly: a dispute always refunds in full. Splitting a deposit fairly needs evidence and judgement a template cannot do — what it can do is make ignoring the renter impossible.)
- Auto-refund — if the owner never claims within the claim window, anyone can trigger a full refund to the renter. Deposits cannot sit in limbo forever.
Security design
- Component created with
OwnerRule::Noneand rules locked at creation; nobody can re-rule it later. - Every restricted method is double-gated: the component access rule names the party’s public key, and the method re-checks the signer in code.
- Settlement triggers (
execute_claim,auto_refund) are permissionless but value-safe: balances move only to the renter/owner per the state machine, and the tests assert the stranger-trigger’s balance is unchanged. - Deposits accept the native token only, in the exact agreed amount; every state change emits a
rent_vault.*event as the paper trail.
What’s included
- Rust template (
tari_template_lib), compiles to a 139 KiB release WASM. - 20 engine tests with
tari_template_test_tooling, all passing — every transition plus the negative cases: owner depositing, wrong amount, double deposit/confirmation, early claim, renter claiming, claim above deposit, zero claim, early execution, late dispute, early auto-refund. - Walletless browser demo that mirrors the template’s state machine and rejection messages exactly; all four settlement paths were driven headlessly and matched the template tests’ balances.
Honest notes
The demo is a simulation — labelled as such, in the demo and in the README. The template has not been published to Esmeralda or mainnet yet, and there is no client app driving the real component; both are the stated next steps. This is new code written for this round; it borrows nothing from earlier entries.
Built with an AI coding agent under human direction; the design, review, and submission are ours.