Summary
The PROXY_INIT_CODE_HASH constant in the SDK does not match
the current Proxy Factory implementation, causing
derive_proxy_wallet() to return an address that cannot be
deployed to.
Details
SDK constant (lib.rs:104-105):
const PROXY_INIT_CODE_HASH: B256 =
b256!("0xd21df8dc65880a8606f09fe0ce3df9b8869287ab0b058be05aa
9e8af6330a00b");
Current factory implementation
(0x44e999d5c2f66ef0861317f9a4805ac2e90aeb4f):
- Produces init code hash: 0x3874990b87b491a1c79ae59be8d19a99a51
4eea41a6cc0a8501ddc58e57d5bc1
These don't match, so CREATE2 derivation produces different
addresses:
- SDK derives: 0xba734a6a711c9f13b8f7366572a4f9817a0dac46
- Factory deploys to: 0xbeddb275a7f4797c99d2c80c3854231e5ccb9eeb
Impact
$100 USDC.e is stuck at the SDK-derived address which has no
contract deployed and cannot receive a deployment from the
current factory.
- EOA: 0x339a9731D4c1ea6861db006ad592b83E49C9398e
- Stuck funds: https://polygonscan.com/address/0xba734a6a711c9f1
3b8f7366572a4f9817a0dac46
Reproduction
use polymarket_client_sdk::{derive_proxy_wallet, POLYGON};
use alloy::primitives::address;
let eoa =
address!("0x339a9731D4c1ea6861db006ad592b83E49C9398e");
let proxy = derive_proxy_wallet(eoa, POLYGON).unwrap();
// Returns 0xba734a6a711c9f13b8f7366572a4f9817a0dac46
// But factory deploys to different address
Request
1. Please update the SDK to use the correct init code hash
2. If possible, help recover the $100 stuck at the old derived
address
Environment
- polymarket-client-sdk: 0.4.3
- Chain: Polygon (137)
- Proxy Factory: 0xaB45c5A4B0c941a2F231C04C3f49182e1A254052
Summary
The
PROXY_INIT_CODE_HASHconstant in the SDK does not matchthe current Proxy Factory implementation, causing
derive_proxy_wallet()to return an address that cannot bedeployed to.
Details
SDK constant (lib.rs:104-105):