Taking advantage of the low gas fees these days, I published an Improved Wrapped Ether smart contract, called WETH911 (https://etherscan.io/address/0x6BE7EF70b35FdB9042d704c920d003b414385c76).
Give it a try ;) You can also check the repo here: https://github.com/InternetOfPeers/improved-canonical-weth
Description
Canonical Wrapped Ether (WETH9, 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) has at least two major flaws:
- You can lock your WETH in the contract (at the moment of writing, 2022.05.31, they are ~644 ethers and counting)
- You cannot recover other tokens sent to this contract
It has one minor issue as well:
- It uses a custom event for minting, so it emits
Deposit
instead ofTransfer
fromaddress(0)
when minting andWithdrawal
instead ofTransfer
toaddress(0)
when burning tokens. Not too big an issue indeed, but the contract wants to be a standard EIP20 token, so better to avoid custom events.
Wrapped Ether 911 fixes those flaws:
- You cannot send WETH911 to the contract (tx reverts)
- Anyone can recover lost tokens assigned to this contract (happy front running to everybody )
- The contract emits {Transfer} events when minting or burning WETH911
Deployed contract addresses
[link] [comments]
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments