Skip to content

Define INV-01 for representable healthy-price boundaries - #1798

Merged
KillariDev merged 5 commits into
mainfrom
t3/fix-issue-1796
Nov 27, 2026
Merged

KillariDev merged 5 commits into
mainfrom
t3/fix-issue-1796

Conversation

@KillariDev

@KillariDev KillariDev commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

INV-01 previously promised a public inverse boundary across unrestricted uint256 inputs, although the checked inverse can overflow when every representable price is healthy. This change explicitly requires representable intermediate values and boundary; it preserves reverting arithmetic rather than introducing saturation. At uint256.max there is no representable successor price.

The compiled-Solidity regression covers issue #1796's forward quote, adjacent successful inverse, overflowing inverse, and an exactly representable uint256.max boundary. NatSpec states the overflow policy. The invariant reference reconciles this domain with the existing source-model counterexample and supply-cap proof in the still-open proof PR #1784; no Lean infrastructure is imported or changed.

Closes #1796.

Validation: full TypeScript check; 68 focused contract/documentation runtime tests; documentation runtime rerun after search-index regeneration; formatting; full repository checks; Knip; generated-artifact freshness; and git diff --check passed. The branch is current with origin/main.

The documentation source fingerprint and generated search index are refreshed. Chromium QA at 1440×900 and 390×844 found no horizontal overflow. Documentation review scored 94/100 and visual review 95/100, both with no findings. No executable behavior or ABI changed, so unrelated consumer suites and app workflow/layout scans were excluded. Lean replay is outside this checkout: its infrastructure remains in open PR #1784; the existing source-model results were inspected and reconciled with the chosen domain.

Final review: 96/100, no findings. No findings were deferred.

The invariant separates the rule, formula, input conditions, and upper-bound behavior into short paragraphs, with source-model details linked under evidence. Documentation, formatting, and desktop/mobile QA passed again after the readability revision.

@KillariDev
KillariDev enabled auto-merge November 26, 2026 15:32
@KillariDev
KillariDev added this pull request to the merge queue Nov 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 26, 2026
@KillariDev
KillariDev enabled auto-merge November 27, 2026 08:17
@KillariDev
KillariDev added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit ac44cfb Nov 27, 2026
44 checks passed
@KillariDev
KillariDev deleted the t3/fix-issue-1796 branch November 27, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

INV-01: define the healthy-price boundary when every uint256 price is covered

1 participant