VDB-11: docs: add Supply Cap glossary entry#366
Conversation
Add a Getting Started glossary page with a definition of supply cap — what it does (cap enforcement, revert on new supply, cap=0 disables minting) and why Venus uses it (exposure management, risk reduction, dynamic adjustment via Risk Oracles / Risk Stewards). Register the new page in SUMMARY.md under Getting Started. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
trumpgpt-bot
left a comment
There was a problem hiding this comment.
Clean docs-only PR. The key factual claim — that supplyCap == 0 disables new supply — is verified correct: PolicyFacet.sol:40 has require(supplyCap != 0, "market supply cap is 0"), and ComptrollerStorage.sol:218 NatSpec reads "Defaults to zero which corresponds to minting notAllowed." Cross-link to risk/risk-oracle-and-risk-stewards.md resolves correctly (file exists). SUMMARY.md placement and ###-level heading style both match the existing faq.md convention. Two small improvements noted below.
|
|
||
| **What it does** | ||
|
|
||
| The supply cap limits how much of an asset the protocol will accept as supply (minted into vTokens). Once a market's total supply reaches its cap, any new supply transaction for that asset reverts. The restriction applies only to new supply — existing positions are not affected, and suppliers can still withdraw or interact with their funds as usual. A supply cap of `0` disables new supply for that market entirely. |
There was a problem hiding this comment.
[minor] The statement is accurate but omits an important nuance: 0 is also the default state for every newly listed market (ComptrollerStorage.sol:218 NatSpec: "Defaults to zero which corresponds to minting notAllowed"). As written, readers may think setting a cap to 0 is an active governance action to shut down an existing market; in practice it means governance must set a positive cap before any supply is accepted at all. Suggest: "A supply cap of 0 — the default for a newly listed market — prevents all new supply; governance must set a positive cap to open the market to suppliers."
|
|
||
| ### Supply Cap | ||
|
|
||
| A **supply cap** is the maximum total amount of an asset that can be supplied to a given market. Each market has its own cap, set per asset. |
There was a problem hiding this comment.
[nit] "set per asset" is redundant with "each market" (one market = one asset in Venus), and is slightly inaccurate for Isolated Pools where the same asset can appear in multiple markets with independent caps. Suggest dropping the phrase: "A supply cap is the maximum total amount of an asset that can be supplied to a given market. Each market has its own independently configured cap."
Adds a new Getting Started → Glossary page (
getting-started/glossary.md) with the protocol's first glossary entry, Supply Cap:0disables new supply entirely.risk/risk-oracle-and-risk-stewards.md.Also registers the page in
SUMMARY.mdunder Getting Started (after FAQ).Tests:
npx remarklint (the repo'sformat:checkconfig) passes with no issues on both changed files. Documentation-only change; no code impact.Opened by the Venus dev bot. Review required; the bot cannot merge.