MNHWA
APPENDIX · THE LEDGER, ANNOTATED.
Pp.A-01
Entry 01
PRIMER#overview

Protocol overview

  • Mnhwa is a set of Anchor instructions around a per-rental escrow PDA.
  • Owners call register_nft to delegate a compressed NFT to the program and post a max-duration plus daily rate.
  • Renters call start_rental to lock deposit + pro-rated fee and receive a receipt cNFT.
  • Time-based expiry is enforced on-chain; off-chain keepers crank force_return after end_time.
Marginalia
Borrow the spine, not the cover.
End of entry 01Pp.A-01
Pp.A-02
Entry 02

Account layout

  • escrow(PDA) :: seeds = ['escrow', mint, renter] -- holds deposit + fee lamports + end_time.
  • registry(PDA) :: seeds = ['registry', owner] -- a map of mint -> rental params.
  • rental_state(PDA) :: seeds = ['rental', mint] -- active rental marker; prevents double-lease.
  • Fees accrue into fee_vault(PDA) and can be withdrawn by authority for buyback.
End of entry 02Pp.A-02
Pp.A-03
Entry 03
MATH#fees

Fees and numbers

  • Platform fee: 2.50% on every rental. 100% routed to $MNHWA buyback + burn.
  • Keeper tip: 5% of the locked deposit goes to whoever cranks force_return after expiry.
  • Deposit: default 3x daily rate, overridable per mint by the owner at register time.
  • Max duration: per-mint, owner-configurable. Default ceiling is 30 days.
Marginalia
The bot earns when you forget. So set a timer.
End of entry 03Pp.A-03
Pp.A-04
Entry 04

Off-chain keeper

  • Hono service on Railway scans rentals where status=active AND end_time<=now() every 30s.
  • Builds a force_return instruction signed by ESCROW_AUTHORITY_KEY, broadcasts via Helius.
  • On success: rental.status=returned, deposit snaps back to owner minus keeper tip.
  • A Telegram bot notifies subscribers 30 minutes before expiry, reducing keeper-tip churn.
End of entry 04Pp.A-04
Pp.A-05
Entry 05
API#api

HTTP endpoints

  • GET /api/catalog -- paginated cNFTs registered as rentable. 60s Redis cache.
  • GET /api/catalog/:mint -- single volume, includes delegate + rate metadata.
  • POST /api/rentals/quote -- body { mint, durationSeconds }. Returns fee + deposit preview.
  • POST /api/rentals/prepare -- body { mint, duration, renter }. Returns unsigned tx (base64).
  • POST /api/rentals/submit -- body { signedTx }. Broadcasts and polls confirmation.
  • GET /api/stats -- global counters for the landing-page ticker.
End of entry 05Pp.A-05