MultiversX Tracker is Live!

WETH911: Improved Wrapped Ether

Etherum Reddit

More / Etherum Reddit 193 Views

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 of Transfer from address(0) when minting and Withdrawal instead of Transfer to address(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

submitted by /u/lapalissiano
[link] [comments]
Get BONUS $200 for FREE!

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