docs(pair): document fee-discount cache as a deliberate 300s snapshot (#275) #747

Merged
Brouie merged 1 commit from qa/275-fee-discount-cache-invariant-doc into main 2026-06-04 08:14:39 +00:00
Brouie commented 2026-06-04 06:18:35 +00:00 (Migrated from gitlab.com)

Per the dev decision on #275: the 300s on-pair discount cache (#251) is a necessary gas optimization, kept as-is. Updates the invariant docs to the snapshot model — the discount is a 300s snapshot, not a live per-trade balance check (tier holder must transact ≥ once per 300s; fee leakage bounded to one window).

Documented in discount_cache.rs module doc, the DISCOUNT_CACHE_TTL_SECONDS const, and a new P9 row in the security-audit invariant matrix. Doc-only, no logic change.

Note: the issue's original acceptance criteria describe the live-check model the dev declined and should be rewritten to the snapshot model before close.

GitLab #275

Per the dev decision on #275: the 300s on-pair discount cache (#251) is a necessary gas optimization, kept as-is. Updates the invariant docs to the **snapshot** model — the discount is a 300s snapshot, not a live per-trade balance check (tier holder must transact ≥ once per 300s; fee leakage bounded to one window). Documented in `discount_cache.rs` module doc, the `DISCOUNT_CACHE_TTL_SECONDS` const, and a new **P9** row in the security-audit invariant matrix. Doc-only, no logic change. Note: the issue's original acceptance criteria describe the live-check model the dev declined and should be rewritten to the snapshot model before close. GitLab #275
PlasticDigits commented 2026-06-04 08:14:40 +00:00 (Migrated from gitlab.com)

mentioned in commit 38bd253138

mentioned in commit 38bd253138c5cca532f5cef771487ed7b38e7da7
PlasticDigits (Migrated from gitlab.com) merged commit 38bd253138 into main 2026-06-04 08:14:40 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic!747
No description provided.