Skip to content

fix(pegs): correct EIP-55 checksum for WBTC/BTC Chainlink feed#309

Merged
spalen0 merged 1 commit into
mainfrom
peg-fix
Jun 30, 2026
Merged

fix(pegs): correct EIP-55 checksum for WBTC/BTC Chainlink feed#309
spalen0 merged 1 commit into
mainfrom
peg-fix

Conversation

@spalen0

@spalen0 spalen0 commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Problem

The peg monitor crashed on startup:

[pegs] 🚨 __main__ crashed: InvalidAddress: ('Address has an invalid EIP-55 checksum. After looking up the address from the original source, try again.', '0xfdFD9C85aD200c506Cf9e21F1FD8dD01932FBB23')

The WBTC/BTC Chainlink aggregator address in utils/pegged_assets.py had an invalid EIP-55 checksum. When utils/chainlink.py passes it to web3's get_contract, web3 validates the checksum and raises InvalidAddress, crashing the run.

Fix

Corrected the checksum casing — the D before 01932 should be lowercase d:

  • before: 0xfdFD9C85aD200c506Cf9e21F1FD8dD01932FBB23
  • after: 0xfdFD9C85aD200c506Cf9e21F1FD8dd01932FBB23

This is the same address (Chainlink WBTC/BTC feed on Ethereum mainnet), just correctly checksummed.

Verification

Audited all ChainlinkFeed addresses in pegged_assets.py against Web3.to_checksum_address — all now pass. (The lowercase cUSD defillama_key is intentional: DefiLlama keys are not web3-checksum-validated.)

🤖 Generated with Claude Code

The WBTC/BTC aggregator address had an invalid EIP-55 checksum
(0xfdFD9C85aD200c506Cf9e21F1FD8dD01932FBB23), causing web3's
get_contract to raise InvalidAddress and crash the peg monitor.
Fixed the casing (D -> d before 01932).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@spalen0 spalen0 merged commit dd812e1 into main Jun 30, 2026
3 checks passed
@spalen0 spalen0 deleted the peg-fix branch June 30, 2026 19:51
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