Commit 04367b8
Edward (Edwardbot)
docs(asset-leasing): rewrite README to the repo-wide quality bar
Full rewrite. The previous README was explanatory but relied on the
car-rental analogy as its spine. This version restructures around the
sections the repo-wide overhaul uses everywhere:
1. What does this program do? (plain English first; analogies only
after the onchain mechanics, with each tradfi term defined
briefly where it appears)
2. Glossary (account, PDA, signer, CPI, Anchor constraint, bps,
keeper, oracle, feed_id, exponent, etc.)
3. Accounts and PDAs (state + vault tables; full field list of
`Lease`; lifecycle diagram)
4. Instruction lifecycle walkthrough (one subsection per ix, with
signers / accounts / PDAs / token-flow diagrams / state changes
/ checks — in the order a user actually encounters them)
5. Full-lifecycle worked examples (happy path, liquidation path,
default-by-expiry, listed cancel — concrete numbers throughout)
6. Safety and edge cases (full error-code table, guarded design
choices, what the program does *not* guard)
7. Running the tests (+ CI note confirming `anchor build` runs
before `anchor test` in .github/workflows/anchor.yml, which
covers the `include_bytes!` concern for §6)
8. Extending the program (easy / moderate / harder tiers)
Reflects the code changes in this branch:
* Fix 1 (close_vault helper extracted) in §Code layout
* Fix 3 (LeasedMintEqualsCollateralMint) in §4.1 and §6.1
* Fix 4 (feed_id pinning) in §2, §3, §4.6, §6
* Fix 5 (last_rent_paid_ts on default path) in §4.7 and §5.3
* Fix 6 (CI) confirmed in §7
1200 lines.1 parent a92d2fb commit 04367b8
1 file changed
Lines changed: 1017 additions & 949 deletions
0 commit comments