From f1622e5d6327368a7e57c8a8f7244e127c348937 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 21 Jun 2026 22:23:12 +0000 Subject: [PATCH] Fix stale LendingMarket seed docs in both READMEs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both READMEs still described the market PDA seed as ["lending_market", owner, market_id] — the old design where the owner's public key was baked into a shared struct's address. The code was already corrected to ["lending_market", market_id] in commit f250b6e; this brings the prose into agreement. Also makes the reason explicit: owner is stored as a field for has_one authorization, not in the seed, so no individual's public key appears in a shared struct's address. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01RwE8f8ahP5S6SDNTsXmpj9 --- finance/lending/anchor/README.md | 9 +++++---- finance/lending/quasar/README.md | 6 ++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/finance/lending/anchor/README.md b/finance/lending/anchor/README.md index 43226d56..3bc967cc 100644 --- a/finance/lending/anchor/README.md +++ b/finance/lending/anchor/README.md @@ -32,10 +32,11 @@ crosses the liquidation threshold and a liquidator can close part of the positio ### Accounts - **`LendingMarket`** — top-level config (owner, quote-currency mint). PDA seeds - `["lending_market", owner, market_id]`, where `market_id` is a per-owner `u64` - index. Seeding by an index (not the owner alone) lets one owner run several - independent, risk-isolated markets — their market 0, 1, 2 … — with no - cross-owner collisions. + `["lending_market", market_id]`, where `market_id` is a `u64` index. Seeding by + an index alone (owner is stored as a field for authorization, not baked into the + address) lets one owner run several independent, risk-isolated markets — their + market 0, 1, 2 … — with no cross-owner collisions and no individual's key in a + shared struct's address. - **`Reserve`** — one per asset. Owns a program-controlled liquidity vault and a share-token mint, and stores the interest-rate config, the cumulative borrow- rate index, available liquidity, and scaled total debt. PDA seeds diff --git a/finance/lending/quasar/README.md b/finance/lending/quasar/README.md index 5d5b5730..a27527a0 100644 --- a/finance/lending/quasar/README.md +++ b/finance/lending/quasar/README.md @@ -29,8 +29,10 @@ Everything else mirrors the Anchor version. ## Major concepts - **`LendingMarket`** — market config (owner, quote-currency mint). PDA: - `["lending_market", owner, market_id]`, where `market_id` is a per-owner `u64` - index, so one owner can run several isolated markets (their market 0, 1, 2 …). + `["lending_market", market_id]`, where `market_id` is a `u64` index. Owner is + stored as a field for authorization, not baked into the address, so one owner + can run several isolated markets (their market 0, 1, 2 …) with no individual's + key in a shared struct's address. - **`Reserve`** — one asset's pool. Owns a program-controlled liquidity vault and a share-token mint (both PDAs, authority = the reserve), and stores the interest-rate config, the cumulative borrow-rate index, available liquidity, and