Skip to content

Fix chain-aware TWAP reads on Ethereum and Gnosis - #103

Open
krandder wants to merge 1 commit into
mainfrom
fix/chain-aware-twap
Open

krandder wants to merge 1 commit into
mainfrom
fix/chain-aware-twap

Conversation

@krandder

Copy link
Copy Markdown
Contributor

Why

The TWAP widget always used a Gnosis RPC and the Algebra getTimepoints ABI. Ethereum mainnet pools use Uniswap V3 observe, so the EIP-8363 widget would fail when its TWAP window opens on October 9.

What changed

  • pass the market chain ID into the TWAP widget
  • select the Ethereum or Gnosis RPC by chain
  • use Uniswap V3 observe on chain 1 and Algebra getTimepoints on chain 100
  • clear provider and token-order caches when the chain changes
  • fail closed for unsupported chains
  • add deterministic regression tests for dispatch, unsupported chains, and cache reset

Verification

  • npm run auto-qa:test:unit: 698 passed
  • live read-only selector checks: both EIP-8363 Ethereum pools accept observe and reject getTimepoints; an active Gnosis Algebra pool accepts getTimepoints and rejects observe
  • git diff --check: passed

No deployment or chain transaction is included.

@netlify

netlify Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for futarchy ready!

Name Link
🔨 Latest commit bdcbabc
🔍 Latest deploy log https://app.netlify.com/projects/futarchy/deploys/6ab87fd9c8225e00085970a9
😎 Deploy Preview https://deploy-preview-103--futarchy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

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