ENS Logo
Docs

[EP3.3] [Executable] Sell ETH to USDC |

Abstract

This proposal executes a swap of 10,000 ETH into USDC, to ensure ENS DAO has enough to cover operating expenses for 18 - 24 months.

Motivation

The DAO currently keeps almost 100% of its spendable treasury in ETH. While ENS generates protocol revenue in ETH, having so much exposure to a single volatile asset places the DAO in a vulnerable position.

This is a proposal to convert 10,000 ETH into USDC through a Cowswap swap.

10,000 ETH is approximately 25% of the total amount of ETH held by the ENS DAO (wallet.ensdao.eth) and register controller (controller.ens.eth) as of January 18, 2023.

It is hoped that this sale will generate in excess of $13m in USDC. The goal is to ensure that the DAO has enough USDC to cover operations for the next 18 - 24 months.

Specification

  1. Call withdraw() on controller.ens.eth (0x283af0b28c62c092c9727f1ee09c02ca627eb7f5)
  2. Call deposit() on WETH9 (0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2), sending 10,000 ETH
  3. Call approve(, 10000 ETH) on WETH9 (0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2)
  4. Call requestSwapExactTokensForTokens(10000 ETH, , , wallet.ensdao.eth, , ) on milkman (0x11C76AD590ABDFFCD980afEC9ad951B160F02797)

Price checker data is configured to check the swap against the Uniswap v3 pool and limit to 2% slippage. It is generated using the below code:

import { ethers } from "https://cdn.ethers.io/lib/ethers-5.2.esm.min.js";

function getCheckerData(slippage, path, fees) {
  return ethers.utils.defaultAbiCoder.encode(
    ["uint256", "bytes"],
    [
      slippage,
      ethers.utils.defaultAbiCoder.encode(
        ["address[]", "uint24[]"],
        [path, fees],
      ),
    ],
  );
}

const checkerData = getCheckerData(
  200,
  [
    "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
    "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  ],
  [5],
);
console.log("checkerData:", checkerData);

Addresses:

  • 0xfe89cc7abb2c4183683ab71653c4cdc9b02d44b7 - wallet.ensdao.eth
  • 0x283af0b28c62c092c9727f1ee09c02ca627eb7f5 - controller.ens.eth
  • 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 - WETH9
  • 0x11C76AD590ABDFFCD980afEC9ad951B160F02797 - milkman
  • 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 - USDC
  • 0x2F965935f93718bB66d53a37a97080785657f0AC - Uniswap v3 slippage checker

Transactions

AddressValueFunctionArgumentValue
0x283Af0B28c62C092C9727F1Ee09c02CA627EB7F5-withdraw
0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc210000 ETHdeposit
0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2-approveguy0x11C76AD590ABDFFCD980afEC9ad951B160F02797
wad10000000000000000000000
0x11C76AD590ABDFFCD980afEC9ad951B160F02797-requestSwapExactTokensForTokensamountIn10000000000000000000000
fromToken0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
toToken0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
to0xfe89cc7abb2c4183683ab71653c4cdc9b02d44b7
priceChecker0x2F965935f93718bB66d53a37a97080785657f0AC
priceCheckerData0x00000000000000000000000000000000000000000000000000000000000000c8000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000005
Discourse
#15906
Type
๐Ÿ‘ท Executable
Contributors
Last Modified
2 months ago