GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add liquidity-based sale quotes and historical price audits by BlinkyStitt · Pull Request #43 · SatoshiAndKin/ypricemagic

Conversation

@BlinkyStitt

@BlinkyStitt BlinkyStitt commented Sep 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Summary

Add amount-sensitive native sale quotes and historical price audits across supported DEXes and immediate redemption paths. Preserve integer amounts, fees, exclusions, canonical block identity, independent result paths, and liquidity ranking. Spot and terminal USDC valuation remains 1 USDC = $1; USDC amount requests use actual DEX outputs.

Repair the historical pricing failures and complete strict typing for production code, tests, and validation tools. Retry transient archive-state misses at the same requested block identifier while preserving unexpected errors and cancellation, including Compound direct calls and oracle reads.

Rationale

The earlier full suite reported 68 failures and zero timeouts. Investigation found adapter defects, unsupported historical samples, incorrect sale-versus-oracle expectations, and transient provider-state failures. The 3,600-second deadlines remain unchanged; previously measured successful calls fit within them.

Short archive retries still exhausted under concurrent historical workloads. The bounded recovery window now permits ten attempts with 121.5 seconds of total backoff. A persistent miss raises its original error. Strict mypy checks also exposed malformed helper calls and sync/async interface errors that now have behavioral regression coverage.

Details

The three review findings are repaired: Chainlink availability and prices are checked against independent pinned native state; V3 results require actual swap/redemption paths with independently reconstructed USD values; empty Solidly and Velodrome V2 quotes return unavailable so routing can try another pool. Exact outputs, fees, exclusions, ranking, and unexpected-error/cancellation propagation are preserved.

Native reference checks cover canonical WETH redemption and later V2 legs in V3-entry routes. The diagnostic sampler now keeps its real clock when retry tests mock asyncio.sleep, preventing the separately reproduced validation stall. Neither pricing deadlines nor resource limits were increased.

  • Normalize V2 index and V3 entry-point addresses, including bytes, HexBytes, and inherited Slipstream behavior. Treat empty V2 output as an unavailable candidate and continue routing.
  • Restore V1 native ETH-to-USDC continuation. Require V3/Slipstream proof of full input execution; preserve exact fee-inclusive outputs and liquidity ranking.
  • Resolve historical Compound controllers and oracle denominations, Synthetix resolver state, and verified retired or unavailable feeds. Preserve fallback, exclusions, and unexplained-error propagation.
  • Repair GUNI balances, historical Popsicle scaling and zero supply, PieDAO calls, and Aave async dispatch and unverified wrappers. Enable the previously unmarked Compound async tests and verify historical expectations with native reads.
  • Fix scalar and batch ERC20 decoding, multicall return mappings, Saddle call order, Ellipsis native reserve units, log decoding/topic restoration, timestamp persistence, CLI selectors, and trace-cache schema lookups. Preserve Decimal valuation results and configured tuple paths.
  • Model inherited a_sync methods, overloads, properties, queues, and generators in the local mypy extension. Positive and negative typing probes cover arguments, return values, overrides, and execution modes. Strict checking remains enabled across 231 source files.
  • Retain DEBUG-only y.stuck? diagnostics at the default five-minute interval. No cache or database schema migrations. Declare the existing frozen Click 8.5.0 dependency directly; CI installs existing development requirements, including numpy. Resolved dependency versions remain unchanged.

Final validation of committed 7d5074c0 (native and mutation controls use pricing-identical 5e809224):

  • Required Python 3.12 command unchanged: PYTEST_ADDOPTS="-p no:pytest_ethereum" BROWNIE_NETWORK=mainnet make test — 2,161 passed, 17 skipped, zero failures, exit 0. All 450 review-specific cases pass within that full run and in the separate Python 3.13 native run.
  • Frozen focused matrix: 691 passed on each of Python 3.11, 3.12, and 3.13. Strict mypy reports zero diagnostics across 231 files; all ten compiled extensions are verified from imported .so paths on every version. All 11 validation-runner tests pass per version.
  • 15/15 sequential historical native checks passed, including Router02 absent at block 10,100,000 and a later successful V2 quote.
  • Original adapter control: 18 expected failures / 40 passes; the same assertions pass after repair. Always-None Chainlink discovery now causes 162 assertion failures, and constant-$123/empty-path V3 quotes fail all 84 cases. All mutation failures occur at the intended assertions.
  • All 13 GitHub checks passed on validated source: nine platform/version mypy jobs, compilation, formatting, and both CodeQL checks.
  • The full job completed in 4,772.368 seconds, with peak cgroup memory 4,513,456,128 bytes. Its longest test passed in 3,257.994 seconds, below the unchanged 3,600-second deadline. No final acceptance job timed out, was interrupted, was OOM-killed, or omitted a required report.
  • The sampler regression fails on the original helper and passes after repair. The full-suite retry-boundary test completes in 0.000553 seconds after repair; its prior 3,600-second diagnostic stall remains explicitly recorded as a failed validation attempt, even though pytest later labeled that individual test passed.

The 17 skips cover chain-specific tests, deprecated/uninitialized contracts, and inapplicable bucket checks. Earlier passing suites and failed controls remain historical evidence; they are not substituted for these final checks.

All heavy jobs use 8 GiB RAM, no swap, four CPUs, and 512 processes/threads, with one heavy job per profile. Source identities, exact failures, memory peaks, and missing reports are retained in the repair checklist and review repair evidence. The unrelated generated C file is preserved and excluded from repair commits.

The older exploratory audit is source-specific: its unavailable exits, reference-policy differences, provider errors, and incomplete references remain documented in the prior audit evidence. It is not a passing audit of the repaired source; earlier audit OOM and timeout experiments remain separate.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
BlinkyStitt and others added 3 commits September 11, 2026 14:23
@BlinkyStitt
fix: compare DEX candidates and preserve accurate price valuations
50e1d05
Await eligible quotes with deterministic selection and owned task cleanup. Correct historical feeds, backing ratios, conversion paths, discovery blocks, and price-cache isolation so callers receive valid USD valuations.

Add production-function regressions and a checked chain-specific price-cache reset. Centralize validation settings and retain compiled-extension checks.
@github-actions
chore: compile C files for source control
476af28
@BlinkyStitt
feat: add liquidity-based sale estimates and historical audits
3eada1b
Use the deepest eligible pool with bounded fallback so pricing avoids route-list growth. Quote exact readable amounts through native swaps and supported redemptions, with fees, impact, and copied block-hash caches.

Add the historical DeFiLlama audit, Python 3.11-3.13 build/test configuration, and review evidence. Keep PR #43 in draft because RPC/explorer failures prevent complete live validation.
@BlinkyStitt BlinkyStitt changed the title fix: compare DEX candidates and correct historical pricing feat: add liquidity-based sale estimates and historical audits Sep 12, 2026
@BlinkyStitt
fix(cicd): align type stubs and pytest setup for runnable checks
58ce5f6
@BlinkyStitt BlinkyStitt mentioned this pull request Sep 12, 2026
fix: preserve RPC identity, batching, and bounded retry memory SatoshiAndKin/dank_mids#9
Closed
@BlinkyStitt
fix: keep liquidity quotes bounded and tied to canonical pool state
643aadf
@BlinkyStitt BlinkyStitt mentioned this pull request Sep 12, 2026
fix: decode optional transaction timestamps from current RPC nodes SatoshiAndKin/evmspec#1
Closed
BlinkyStitt added 3 commits September 12, 2026 12:21
@BlinkyStitt
test: keep archive validation local and check complete cache declarat…
04baa5d
…ions
@BlinkyStitt
fix: pin validated RPC batching artifacts for liquidity quotes
011062c
@BlinkyStitt
test: type cache regression inputs for strict validation
4e6e24e
@BlinkyStitt BlinkyStitt changed the title feat: add liquidity-based sale estimates and historical audits feat: add liquidity-based sale quotes and historical price audits Sep 12, 2026
BlinkyStitt added 18 commits September 12, 2026 13:07
@BlinkyStitt
test: record passing offline checks across supported Python versions
731e815
@BlinkyStitt
fix: pin validated native dispatch repair for reliable quote retries
43721c8
@BlinkyStitt
test: record passing offline CI while preserving live validation gaps
7d045df
@BlinkyStitt
fix: pin batch ownership repair for reliable sale quote RPCs
d9f89b6
@BlinkyStitt
test: pin CI-verified batch artifacts and record all passing unit jobs
61be7b5
@BlinkyStitt
fix: contain validation and release retained pricing diagnostics
e793c9f
@BlinkyStitt
perf: share immutable pricing snapshots to reduce retained memory
d8c68bc
@BlinkyStitt
fix: close owned database workers so validation can exit cleanly
c8e0104
@BlinkyStitt
test: expose retained log buffers and waiting database work
fbe5a91
@BlinkyStitt
fix: bound dependency retention and preserve validation evidence
850d750
@BlinkyStitt
docs(validation): record archive retries to keep blocked checks explicit
0217bb1
@BlinkyStitt
docs(validation): identify the working archive path to resume contain…
ea5e46e
…ed checks
@BlinkyStitt
fix(validation): build source revisions so full suites use compiled code
8ec2320
@BlinkyStitt
docs(validation): preserve baseline OOM evidence to keep completion c…
b3d38e8
…laims accurate
@BlinkyStitt
test: record memory comparisons and isolate remaining validation leaks
3b400a1
@BlinkyStitt
fix: pin native ownership repairs to reduce pricing memory retention
9d32c00
@BlinkyStitt
test: close historical price tasks to keep validation memory bounded
ffb225a
@BlinkyStitt
fix(cicd): use central compiler pins for consistent type checks
c1f19e2
BlinkyStitt added 4 commits September 27, 2026 01:06
@BlinkyStitt
fix: preserve complete historical pool indexes for reliable quotes
d414e7d
@BlinkyStitt
docs: record verified pool history and memory bounds for review
16e5204
@BlinkyStitt
docs: record completed timeout validation for pricing review
4847a90
@BlinkyStitt
docs: publish completed audit evidence for pricing review
1982188
@BlinkyStitt
BlinkyStitt marked this pull request as ready for review September 27, 2026 18:13
@BlinkyStitt
BlinkyStitt marked this pull request as draft September 28, 2026 03:30
BlinkyStitt and others added 13 commits September 28, 2026 08:25
@BlinkyStitt
fix: restore historical pricing and reliable quote fallback
17c08dd
@github-actions
chore: compile C files for source control
bd1302d
@BlinkyStitt
test: record final pricing validation and remaining RPC gaps
9ff4162
@BlinkyStitt
fix: recover archive reads and typed adapters for reliable pricing
0771c20
@BlinkyStitt
docs: record regression evidence and remaining pricing validation gates
a9653cd
@github-actions
chore: compile C files for source control
136ec0f
@BlinkyStitt
test: request fresh Gearbox quotes to verify historical price paths
618614e
@BlinkyStitt
chore: align CI formatting to keep validation reproducible
aacb232
@github-actions
chore: compile C files for source control
f1bf98d
@BlinkyStitt
fix(cicd): guard Linux diagnostics so Windows type checks pass
934c2c4
@BlinkyStitt
test: patch the platform module directly for strict typing
18a70eb
@BlinkyStitt
fix: retry Compound archive reads to preserve historical pricing
619e23a
@BlinkyStitt
docs: publish passing PR43 validation for merge readiness
c27864f
@BlinkyStitt
BlinkyStitt marked this pull request as ready for review September 29, 2026 08:15
@BlinkyStitt
BlinkyStitt marked this pull request as draft September 30, 2026 02:51
BlinkyStitt added 5 commits September 29, 2026 20:31
@BlinkyStitt
fix: reject empty router quotes and verify prices independently
03df6cd
@BlinkyStitt
test: validate native WETH redemption in V3 price paths
a29f6df
@BlinkyStitt
test: verify later V2 swaps to validate complete V3 price paths
5e80922
@BlinkyStitt
fix: isolate diagnostic timers so retry tests cannot stall validation
7d5074c
@BlinkyStitt
docs: record review repair evidence for reproducible validation
aba7028
@BlinkyStitt
BlinkyStitt marked this pull request as ready for review September 30, 2026 06:18
@BlinkyStitt
BlinkyStitt merged commit 9d781b3 into master Sep 30, 2026
13 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@BlinkyStitt
BlinkyStitt deleted the fix/pricing-correctness-all-dexes branch September 30, 2026 20:26
@BlinkyStitt BlinkyStitt mentioned this pull request Oct 1, 2026
chore: update pricing dependencies and fix pool warmup SatoshiAndKin/ypricemagic-server#152
Merged
11 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@BlinkyStitt
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.