Skip to content

Define and enforce representable oracle price bounds - #1793

Merged
KillariDev merged 4 commits into
mainfrom
t3/review-issue-1791
Nov 26, 2026
Merged

KillariDev merged 4 commits into
mainfrom
t3/review-issue-1791

Conversation

@KillariDev

@KillariDev KillariDev commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

A raw oracle price can fit uint256 while its conservative bound does not. Define the helper's supported domain as p <= floor(MAX_UINT256 * (D - e) / D) and reject larger prices with an understandable revert string. Both helpers reject uncertainty at or above 100%. Representable results retain exact outward rounding and zero-uncertainty identity across the entire uint256 range.

Update INV-27 with the domain and production caller argument: positive collateral and uint128 REP at 1e18 precision keep funded prices safely representable for every permitted uncertainty. Cached getters, report authorization, and the authenticated capital callback inherit that bound; initial cached zero is supported too.

Refresh every affected bytecode consumer: generated bot runtime identities, public deployment and bootstrap-descendant hash pins, four deterministic deployment manifests, the audited Solidity source fingerprint, and the documentation search index. Runtime pins are verified against fresh local deployments for Sepolia, deterministic-WETH testnets, and mainnet, including both genesis outcomes. Existing rejection of incorrect deployed code is preserved. No live deployment was performed.

Addresses #1791. The SolidCore model mentioned in the issue exists only in separate open PR #1784, not in main or this checkout. That PR must regenerate against this helper and expect the explicit revert instead of panic 0x11; this change does not import its unmerged formal toolchain.

Validation includes full TypeScript; targeted oracle, capital, report, auction-rounding, documentation, and deployment tests; complete bot-shared and liquidator package checks; formatting; full repository checks; both Knip modes; generated-output freshness; and diff whitespace checks. The new boundary regression was preceded by an Anvil reproduction of the old arithmetic panic.

Chromium documentation QA at 1440×900 and 390×844 found no overflow or runtime errors. Documentation review scored 93/100 and visual review 94/100, both without findings. Subsequent runtime hash updates change no rendered content, layout, or simulation behavior. App layout scans, unrelated root suites, and live-network checks are excluded for that scope; deterministic deployment integration tests cover the changed verification paths.

Merged the current origin/main (#1790) without conflicts. On the merged branch, all 1,006 selected tests passed: 94 oracle/capital tests, 120 deployment/documentation/SDK tests, 403 bot-shared tests, and 389 liquidator tests. Full TypeScript, formatting, repository checks, Knip, generated freshness, and diff checks passed. Branch-current gate: behind count 0. Final code review: 96/100, no findings.

@KillariDev
KillariDev enabled auto-merge November 26, 2026 14:07
@KillariDev
KillariDev added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit ad7e1d3 Nov 26, 2026
44 checks passed
@KillariDev
KillariDev deleted the t3/review-issue-1791 branch November 26, 2026 14:19
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.

1 participant