Skip to content

Add EIP-4626 exemptions - #4692

Merged
jmg-duarte merged 1 commit into
mainfrom
jmgd/4626-exemption
Jul 31, 2026
Merged

Add EIP-4626 exemptions#4692
jmg-duarte merged 1 commit into
mainfrom
jmgd/4626-exemption

Conversation

@jmg-duarte

Copy link
Copy Markdown
Contributor

Description

Adds support for EIP-4626 exemptions.

Changes

  • To keep consistency, changes the config format for EIP4626
  • Adds exemption support

How to test

Codepath was already tested with WETH, this just makes it more configurable

@jmg-duarte
jmg-duarte requested a review from a team as a code owner July 31, 2026 14:32
@claude

claude Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Claude finished @jmg-duarte's task in 2m 44s —— View job


PR Review: Add EIP-4626 exemptions

  • Read the diff and surrounding code
  • Review config format change (boolEip4626Config)
  • Review exemption logic in the Eip4626 estimator
  • Check all callers of the changed signatures
  • Verify test coverage

Summary

Clean, well-scoped change. The refactor from a top-level eip4626: bool to a nested Eip4626Config { enabled, exemptions } reads well, exemptions are correctly seeded into the negative cache so exempted tokens bypass all RPC probing, and both the API and competition estimators receive the same config in run.rs. Test coverage is solid — deserialization of the new [eip4626] table and an exemptions_bypass_eth_calls unit test that asserts no chain calls are made.

A few things I checked that are fine:

  • Serde flatten + named field orderingshared is flattened and eip4626 follows it; the named eip4626 table is matched before the flatten catch-all, and the deserialize_eip4626 test confirms it. ✅
  • kebab-case rename of eip4626 — no uppercase/underscores, so the key stays eip4626 (matching the tests). ✅
  • Breaking config change — an old eip4626 = true now fails to deserialize (bool vs table) with a hard error rather than being silently ignored, which is the right failure mode. This is acknowledged in the PR description. No in-repo .toml sets this key. ✅
  • Callers — only autopilot uses caching_native_price_estimator; orderbook uses ..._from_inner and is unaffected. ✅

One minor, non-blocking note posted inline: seeding exemptions at construction doesn't update the eip4626_non_vault_cache_size gauge.

Nothing blocking from my side. 👍

Comment thread crates/price-estimation/src/native/eip4626.rs
@jmg-duarte jmg-duarte added the hotfix Labels PRs that should be applied into production right away label Jul 31, 2026
@jmg-duarte
jmg-duarte added this pull request to the merge queue Jul 31, 2026
@jmg-duarte
jmg-duarte removed this pull request from the merge queue due to a manual request Jul 31, 2026
@jmg-duarte
jmg-duarte added this pull request to the merge queue Jul 31, 2026
Merged via the queue into main with commit b058a3b Jul 31, 2026
24 checks passed
@jmg-duarte
jmg-duarte deleted the jmgd/4626-exemption branch July 31, 2026 15:09
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

hotfix Labels PRs that should be applied into production right away

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants