VAP-004 - Create Asset - Wrapped Ether ($WETH)

Title

VAP-004- Create Asset Wrapped Ether ($WETH)

Summary

This proposal requests to list Wrapper Ether ($WETH) as a settlement asset on the Vega Network.

Rationale>

  • WETH is a popular ERC20 token in the DeFi community as it lets dApps treat Ether (ETH) as an ERC20 Token.
  • The token is not controlled by anyone but a very simple smart contract. Deposits return WETH equivalent to the sent ETH. Vice versa for withdrawals.
  • The Name, Symbol & Decimals are all driven by the values of the ERC20 contract so will not be discussed here.
  • Given that WETH (and ETH) has 18 decimals and assuming ETH ~ $2000 USD, its conversion to quantum decimals is 500000000000000.
  • The withdrawal delay is set to 1 and will act as a buffer in case of a bridge exploit.
  • The lifetime limit is set to 5 WETH (~ $10,000 USD equivalent) which should be sufficient for alpha mainnet given the high leverage.

New Asset/Update Details:

  • Name = Wrapped Ether
  • Asset symbol = WETH
  • Decimals = 18
  • Quantum = 500000000000000
  • ERC20 Contract Address = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
  • Withdrawal delay threshold = 1
  • Lifetime deposit limit = 5000000000000000000 (5 WETH ~ $10,000 USD)

Full Proposal JSON:

{
  "rationale": {
    "title": "VAP-004 - Create Asset - Wrapped Ether ($WETH)",
    "description": "## Summary\n\nThis proposal requests to list Wrapper Ether ($WETH) as a settlement asset on the Vega Network as discussed in: https://community.vega.xyz/t/vap-003-create-asset-wrapped-ether-weth/.\n\n## Rationale\n\n- WETH is a popular ERC20 token in the DeFi communtity as it lets dApps treat Ether (ETH) as an ERC20 Token.\n- The token is not controlled by anyone but a very simple smart contract. Deposits return WETH equivalent to the sent ETH. Vice versa for withdrawals.\n- The Name, Symbol & Decimals are all driven by the values of the ERC20 contract so will not be discussed here.\n- Given that WETH (and ETH) has 18 decimals and assuming ETH ~ $2000 USD, its conversion to quantum decimals is 500000000000000.\n- The withdrawal delay is set to 1 and will act as a buffer in case of a bridge exploit.\n- The lifetime limit is set to 5 WETH (~ $10,000 USD equivalent) whic should be sufficient for alpha mainnet given te high leverage.\n\n## New Asset/Update Details:\n\n- Name = Wrapped Ether\n- Asset symbol = WETH\n- Decimals = 18\n- Quantum = 500000000000000\n- ERC20 Contract Address = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2\n- Withdrawal delay threshold = 1\n- Lifetime deposit limit = 5000000000000000000 (5 WETH ~ $10,000 USD)"
  },
  "terms": {
    "newAsset": {
      "changes": {
        "name": "Wrapped Ether",
        "symbol": "WETH",
        "decimals": "18",
        "quantum": "500000000000000",
        "erc20": {
          "contractAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
          "withdrawThreshold": "1",
          "lifetimeLimit": "5000000000000000000"
        }
      }
    },
    "closingTimestamp": 1686348000, // 2023-06-09 22:00:00
    "enactmentTimestamp": 1686348120, // 2023-06-09 22:02:00
    "validationTimestamp": 1685743200 // 2023-06-02 22:00:00
  }
}
3 Likes

Was wondering when we would get a $WETH proposal, nice first proposal!
One thing, the quantum, you should probably have a look at that one.

1 Like

And while I was writing that you fixed it :slight_smile:

1 Like

WETH is a popular asset so I think this is a proposal that will get a lot of support. :+1:

For quantum I think it would be better to have a “rounder” value. E.g. 1/2000 x 1e18 = 500,000,000,000,000 on the assumption that ETH is about 2000 USD.

The quantum isn’t expected to precisely reflect the price; it’s just a conversion factor for various spam protection mechanisms and things will work fine even if we’re an order of magnitude out. So rounder is nicer.

1 Like

@david I’m fine with that. I chose a more conservative estimate given that spam.protection.minimumWithdrawalQuantumMultiple is 10

I went ahead and followed your suggestion @david. I also changed the lifetime limit to be 5 WETH based on the assumption of 1 ETH ~ $2000 to keep the $10,000 lifetime limit like other assets proposed on Vega

1 Like

WETH also makes it easier to trade and exchange Ether on decentralized exchanges, as ERC-20 tokens have wider support and liquidity. It can also be used in composite protocols and other tools where the use of an ERC-20 token is required.
However, it is worth noting that the use of WETH also entails certain risks, including potential vulnerabilities in smart contracts and the risk of losing funds if manipulated incorrectly. It is important to be careful and take security measures when dealing with WETH and other ERC-20 tokens.
In my opinion, WETH is needed, but do not forget about the caution of use.

1 Like

Indeed.

Some tests with the Vega ↔ Ethreum bridge have been carried out on the Fairground testnet ↔ Sepolia testnet.

You can see the asset here on the Fairground explorer, the deposit transaction and the withdraw transaction.

Which isn’t to say things can’t go horribly wrong, but at least it looks like deposits / withdrawals work.

I share your concerns, however the WETH contract is fortunately very simple, even if it contains a few subtleties (such as no explicit balanceOf function). Through my own personal audit I cannot see any issues with the contract. It is completely autonomous (no key can change its behaviour or manipulate balances). It does contain one special case that is not common in the approve function; if you set the approval to the maximum value (2^256 - 1) it will never deduct from that amount but treat it as a blank check.

So I had one issue with running it, the word let’s
It’s the ’ sign, but if you are able to send the command with the that, feel free.

@daunjuan I amended your suggestions.

Please find the proposal here Vega Governance dApp