All Hail MasterChef: Analysing Yield Farming Activity

Published on:

June 2, 2021

June 2, 2021

MasterChef.sol is probably one of the most forked contracts in DeFi. By forking, I mean that the codebase was copied with most of its functions unchanged. Developers might change the name of the variables or two, but the architecture of the contract, and how its interface, will largely be the same. This is advantageous: developers can conveniently achieve their intended outcome of emitting token rewards, and the contract is possibly more secure, since it has been used on Ethereum for some time. 

MasterChef.sol was first deployed by Sushiswap in its ferocious attempt to draw liquidity from Uniswap back in 2020, by incentivizing any assets locked up (LP tokens) with $SUSHI emissions. It is, till today, a popular way for new projects to attract capital deposits. ERC20 tokens can be transferred in, and the native platform token is issued to users after they withdraw.

Methodology

In this piece, we do an aggregate analysis of all Masterchef contracts and see if we can glean any insights into yield farming activity, on the blockchain. Let's fetch a database of contracts that contain the word "Chef". There are almost 400 of such contracts -- let's order them by the number of calls for these contracts.

Nansen - Masterchef contracts


Not surprisingly, Sushiswap’s Masterchef contract leads the way in terms of number of contract calls. In this study, we will only look at contracts that have been called at least 500 times. We take this dataset of contracts and get the token transactions both into and out of the contracts, representing token deposits and withdrawals. We’re studying capital flows to new farm contracts here, so I did not include Sushiswap’s MasterChef contract. That leaves us with around 28 “Chef” forks.

A few assumptions:

  1. Any token moving into such a contract is considered as a deposit
  2. Any token moving out of the contract is considered a withdrawal

By checking the difference between when a token is transferred in and when a token is last transferred out from a masterchef contract, we obtain a sample size of around 40,000 farm entries and exits. These were initiated by a total of 33882 unique addresses. With some parsing, we can find the duration between when someone enters and exits a farm, and the duration between when a farm is deployed and when one first enters the fund.

Results

How sticky is capital deposited within these contracts? Well -- not very. A large majority of farmers appear to exit within the first 5 days of entering a farm, and half of all farmers never stay beyond 15 days. 13% of addresses still have their funds in these contracts, however. 

Nansen - Farmers chart


We can also plot a heatmap to visualize the relationship between when a user enters a farm and the duration of farming activity. Unfortunately, there appears to be no clear relationship between when users enter a farm, and how long a user stays in the farm for. The rightmost data column is representative of the number of users who have yet to exit the farm. 

Nansen - Duration of farming activity heatmap

Here’s what might be a more interesting statistic: A whopping 42% of yield farmers that enter a farm on the day it launches exit within 24 hours. Around 16% leave within 48 hours, and by the third day, 70% of these users would have withdrawn from the contract. This is certainly due to how reward emission rates (APR) usually drop block by block, and how rewards get diluted over time as more users enter the farm. Capital is indeed mercenary in DeFi, and users would rather put their capital to work elsewhere. Don’t fall behind!

Smart Yield Farmers

Could we find addresses that consistently enter yield farms early? It seems that there are a handful. Around 11 addresses entered at least 6 chef contracts within 5 days of their launch. This list is uploaded as a gist here, in case anyone wants to dig further using the wallet profiler in Nansen. You could also set smart alerts that alert you to actions taken by these addresses.

Happy Alpha hunting with Nansen!

Disclaimer: Any information contained in this article is for information purposes only, and does not constitute financial advice. It is based on current publicly available information, internal data and other sources that we consider reliable but which may not have been verified independently. While every effort is made to ensure the accuracy and completeness of this information, we do not represent that it is accurate or complete. Reliance upon information in this material is at your sole discretion.



Try Nansen for 7 Days

Start a 7-day trial for $9

By signing up, you accept our terms of
service
and privacy policy.
There's no auto-renewal - only a single $9 payment.

Start a 7-day trial for $9

Related research articles

Do NFT Projects Dump Your Ether?
Ling Young Loon
Every ERC-721 contract holds Ether from mint sales. But what happens after the Ether is transferred out? How many people are minting NFTs? Are average prices on OpenSea falling or rising? Let the statistics guide you through your NFT journey.
This is some text inside of a div block.
How New Tokens Are Launched
Are you a low-cap gem hunter? Here's how you can use Nansen to catch early-stage projects before they go mainstream.
This is some text inside of a div block.
Grow your business.
Today is the day to build the business of your dreams. Share your mission with the world — and blow your customers away.
Start Now