← Writing

DeFi Summer from the cheap seats

This summer DeFi went from a niche to a mania: COMP, YFI, CRV and now UNI. I watched it from a student-sized wallet, where a fixed fee per transaction turns the headline yields upside down. The arithmetic of who can afford to farm, and what I'm taking from the summer.

Uniswap's blog post Introducing UNI, 16 September 2020: UNI, the Uniswap Protocol token, is live; 60% of the genesis supply goes to Uniswap community members, a quarter of which has already been distributed to past users; UNI is available through four liquidity mining pools.

Yesterday I finally understood why Ethereum had become so expensive this week. Uniswap, the largest decentralised exchange, had launched its own token, UNI, and given it away to everyone who had ever used it. Hundreds of thousands of people were trying to claim it, sell it or farm it at once, and they were all bidding for the same blocks. That has been the pattern of the whole summer: a new token, a rush of people, and a gas price that decides who gets to take part.

I did my first swap on a decentralised exchange in March, so this is my first summer on-chain. I’ve watched it mostly from the cheap seats, and from there it looks quite different from the headlines.

Four months

It started on 15 June, when Compound began handing out its new governance token, COMP, to everyone who lent or borrowed on it: half a COMP every block, about 2,880 a day [1]. Lending and borrowing suddenly paid a second yield on top of the interest, and the press started calling it liquidity mining, or yield farming. On 17 July, yearn launched YFI with no pre-mine and no sale; the only way to get it was to provide liquidity, and its creator’s advice was “Don’t buy it. Earn it.” [2]. On 13 August, Curve launched CRV, and set aside 5% of the supply for everyone who had provided liquidity before the token existed [3]. On 9 September, SushiSwap moved more than $800 million of liquidity out of Uniswap in a single migration [4]. And on 16 September, Uniswap answered with UNI [5].

Over the same four months, the value deposited in DeFi went from under $1 billion to almost $10 billion [6].

DeFi Summer, June to September 2020 15 June: Compound starts paying COMP to its lenders and borrowers. 17 July: yearn launches YFI with no pre-mine. 13 August: Curve launches CRV, with 5% going to past liquidity providers. 2 September: the average fee per Ethereum transaction peaks at $14. 9 September: SushiSwap moves over $800 million of liquidity out of Uniswap. 16 September: Uniswap launches UNI, 400 to every past user. 17 September: gas averages 538 gwei for the day as everyone claims. 15 Jun17 Jul13 Aug2 Sep9 Sep16 Sep17 Sep Compound starts paying COMP toits lenders and borrowersyearn launches YFI:no pre-mine, earn it, don't buy itCurve launches CRV; 5% goesto past liquidity providersaverage fee per transactionpeaks at $14SushiSwap moves over $800Mof liquidity out of UniswapUniswap launches UNI:400 to every past usergas averages 538 gwei for theday as everyone claims
Four months of DeFi Summer [1]–[5] [7].

The fee doesn’t care how much you have

On 21 July, Curve’s own page listed its y pool at 15% a year, plus another 2,865% paid in YFI. My first reaction was that this was all for whales. Someone like me, moving a small amount in and out, would lose to the fees.

Curve's pool list on 21 July 2020, in its terminal-style interface: the Y pool of yDAI, yUSDC, yUSDT and yTUSD highlighted, with an APY of 15.07% plus 2864.56% in YFI and a volume of $4,119,683.
Curve on 21 July: the y pool at 15% a year, plus 2,865% paid in YFI.
ETH Gas Station on 21 July 2020: recommended gas prices of 73 gwei fast, 70 standard and 66 safe low, about $0.35 for a simple transfer, and a leaderboard of the contracts that spent the most ETH on gas over 30 days, led by Tether, SmartWay Forsage and Uniswap V2.
Gas prices the same afternoon: 70 gwei for a standard transaction, about 35 cents for the simplest possible transfer.

The reason is that an Ethereum transaction costs the same whatever it is moving. Depositing ten dollars into a pool uses the same gas as depositing ten million. In June and July the average Ethereum transaction cost under a dollar. In September so far it has averaged about $6, with a peak of $14 on 2 September; on 17 September, the day UNI could be claimed, the average gas price over the whole day was 538 gwei, the highest of the year [7]. And DeFi transactions are not average ones. A swap on Uniswap uses about 120,000 units of gas; a deposit into Curve’s y pool through its zap contract uses close to 900,000, and taking it out again more than a million.

An email from Argent's chief executive, August 2020: You'll know how high gas prices are if you've used Ethereum in the last few months. No longer subsidising the gas for transfers: Argent will no longer pay the gas for all transfers; gas prices have risen rapidly while the user base has grown.
In August my wallet, Argent, wrote to say it could no longer afford to pay its users' gas.
Etherscan's gas tracker on 19 September 2020: ETH at $384.88; low 108 gwei, average 150 gwei, high 165 gwei. The top gas guzzlers over 24 hours are Uniswap V2 Router 2 with 25.46% of all gas, Tether, an unlabelled contract, the Uniswap UNI token, Forsage and the Uniswap token distributor.
Etherscan's gas tracker yesterday, with Uniswap's router, the UNI token and its distributor among the biggest users of gas [8].
Farming a pool takes several transactions: approve the token, deposit, claim the rewards, sell them, withdraw. Call the total cost of those transactions G. If I put x dollars into a pool paying an annual yield a for a time t, my profit is
profit=atx−G

and my real yield is

anet=a−Gxt

The fee term is divided by the size of the position. For a whale it vanishes; for a student it can swallow the yield whole. The position at which farming merely breaks even is

x*=Gat

Here are today’s numbers. Gas is averaging about 133 gwei and ETH is $371 [7]. Going into Curve’s y pool, staking, claiming twice and coming back out adds up to around three million gas, roughly $150. Take a pool advertising 20% a year and stay for three months, so t = 0.25:

x*=1500.20×0.25=$3,000

Below three thousand dollars, farming that pool loses money. With five hundred dollars, which is closer to what a student has, the yield over three months is $25 and the gas is $150: I would end the quarter a quarter poorer, a net yield of −100% a year, from a pool advertised at +20%.

Net yield against position size, with a fixed gas cost A pool advertising 20% a year, held for three months, with $150 of gas for getting in, claiming and getting out. The net yield is below minus 100% a year for a $500 position, about minus 20% at $2,000, zero at $3,000, and approaches the advertised 20% only for positions of tens of thousands of dollars. break-even ≈ $3,000 advertised 20% 20%0%-50%-100%$500$1k$3k$10k$20k position size net yield, per year
What a 20% pool pays, net of $150 of gas, if you stay three months.

The same arithmetic runs in reverse when the yield falls, which it always does. A pool’s APY is mostly the price of a new token paid out to a fixed pot of depositors; as more money arrives, each dollar gets a smaller share, and as farmers sell the token, its price drops. A yield in the thousands of percent that halves every few days rewards whoever can move in and out fastest and cheapest. That is not me.

What I did have

I wasn’t completely in the stands. I had a little DAI lent on Compound, which has been quietly earning COMP since June, and a small position in a Curve pool. When Curve launched its token in August, it gave CRV retroactively to everyone who had provided liquidity before, so a modest amount of CRV appeared in my wallet, vesting over a year. The whole allocation was 151.5 million CRV, spread over roughly 11,700 addresses, and it was extremely unequal: a typical address got a few dozen CRV, and the single largest got about a fifth of everything [3]. My share was well below the typical one. It vests a little every day, and claiming it costs more in gas than many days of vesting are worth, so I will claim it rarely.

Those were the best returns I had this summer, and I didn’t trade for any of them. They came from having used a protocol early, with small amounts, before there was any reward for doing so. Uniswap has now done the same on a much larger scale. Every address that had used Uniswap before 1 September could claim 400 UNI [5]. On the first day UNI traded at around $3; by Friday, 400 UNI were worth more than $2,000 [9]. The claim itself used about 50,000 gas, a few dollars even this week. A retroactive airdrop is the one part of DeFi Summer that runs the fee arithmetic in a small wallet’s favour: the reward doesn’t scale with what you deposited, so 400 UNI is the same gift whether you swapped ten dollars or ten million.

What I’m taking from the summer

First, fees are part of the yield, and for a small wallet they are most of it. Before entering a pool, I now work out the break-even size first and the APY second.

Second, the highest yields are the shortest-lived. They are a token being given away, and they decay as soon as people arrive. By the time a yield is famous enough for me to hear about it, it is mostly gone.

Third, being early and small is a strategy of its own. The cheapest way into DeFi this year was not to farm, but to use protocols, a little, before they had a token.

Fourth, everything traditional finance has, DeFi has too, only more intense: lending, market making, leverage, bubbles, even the September correction. Watching it happen in a few months, in public, on a chain anyone can read, is the best finance course I could have asked for. I just can’t afford the tuition yet.

References

  1. Compound. COMP distribution, key delegates, new markets. Compound newsletter, 18 June 2020. compound.substack.com.
  2. Andre Cronje. YFI. iearn.finance on Medium, 17 July 2020. Archived copy: 20 July 2020.
  3. Curve. LP vesting script and early-user allocations, curve-dao-contracts, 11 August 2020: vest_lp_tokens.py, early-users.json. See also Decrypt, CRV distribution: everything you need to know, 11 August 2020.
  4. The Block. SushiSwap initiates migration of over $800M in liquidity funds from Uniswap. 9 September 2020. theblock.co.
  5. Uniswap. Introducing UNI. 16 September 2020. Archived copy: 21 September 2020.
  6. DeFi Pulse. Total value locked in DeFi: $948.6 million on 3 June 2020 and $9.77 billion on 21 September 2020. Archived copies: 3 June, 21 September.
  7. Etherscan. Daily average gas price, average transaction fee and ETH price. Gas price, transaction fee, ETH price.
  8. Etherscan. Ethereum gas tracker, 19 September 2020. Archived copy: 19 September 2020.
  9. CoinDesk. Uniswap's newly launched UNI token has already doubled in price. 18 September 2020. coindesk.com.

More writing →