What it does
RentrEscrow is a single-file Solidity contract on Base that escrows USDC for the duration of every rental. It has three external entrypoints:
Design choices
- Single 256-bit storage slot per rental. Owner address (160 bits), amount (96 bits), fee (96 bits), endTime (64 bits), status (8 bits) — packed for gas efficiency.
- Custom errors over revert strings. Cheaper, more informative.
- Checks-Effects-Interactions pattern throughout. No reentrancy attack surface.
_safeTransferFrom/_safeTransferwrappers for ERC-20 — handles tokens that return false vs. revert (USDC follows the standard but defensive coding is free).- Admin can rotate operator via
setOperator()— meant for migrating from hot relayer to multisig. - No pause / kill switch. Intentional — keeps the trust surface minimal. If we ever want one, we’d add it before going to mainnet.
Roles
The contract has no upgradability. To change behavior, deploy a new contract and migrate. This trades flexibility for security — no admin can suddenly drain funds via a backdoor.

