Published in


How We Find the Best Performing Wallets in Crypto!

An in Depth Look at Alphr’s Quantitative Analysis Methods

Please note foot notes [1] will be referenced and listed at the end of this analysis.

Uniswap wallet ranking

The rise of Decentralised Finance (DeFi) opens up whole new perspectives on investment. Trading used to be confined to centralised, opaque agents (banks and brokerages) with intransparent incentives and questionable performance. Proprietary platforms lock users in and prevent deep integration between new toolsets.

DeFi follows an entirely different paradigm. It is an open platform — anyone can stake, trade, and even open up pools for new tokens. Data is open and freely available. Services integrate and allow new products to be built on top of each other, creating ever more useful and impactful products for investors.

At Alphr, we are a part of the movement to democratize finance. Our product allows users to mirror DEX’ best performing traders in an automatic fashion. By combining our insights with a Quantitative Finance approach, we extract value for our users and enhance their trading portfolios. This article sheds light on the process. We will look at how trades are evaluated, wallets ranked and screened, through to the final selection.

Method description

Evaluating a wallet can be neatly split into three stages:

1. Converting trades into wallet balances (positions)

2. Deriving the daily Profit and Loss (P&L) from wallet positions

3. Establishing a ranking scheme for P&Ls, to select the top wallets

We will look at each of these steps individually.

Trades to positions

Each Uniswap trade is a swap: users receive one token by sacrificing another. If today, at day t, I buy δ(X, t) of token X and sell -δ(Y, t)[1], my wallet’s holding h(X, t), h(Y, t) will clearly adjust respectively:

While updating the wallet’s positions with new trades is straightforward, what should we use for the initial positions in a wallet? A typical trader will set up their wallet, fund it initially with fiat funds, then trade these on a platform like Uniswap. The trader can top up the portfolio, or extract profits in the same route. These transactions are not visible in Uniswap trades, and arguably tell us little about the trader’s skill.

Instead, we follow the self-funding portfolio paradigm of Quantitative Finance.[2]. We will assume the portfolio starts empty, and ignore capital flows in and out of the portfolio. Whenever a swap occurs, the trader swaps one token for another of the same market value — so no profit or loss is instantaneously produced. It is only the subsequent price movements that lead to profits and losses.

As a result, after the wallet’s first transaction, in this approach it will lead to a negative position in the sold token. Can that even make sense? We’ll tackle that in the next section.

Positions to P&L

Since we want to consider more than just a handful of tokens, let us enumerate them with an index i.[3] The position held in iᵗʰ token at time t is h(i, t), and the change due to trading is δ(i, t). Let’s also call P(i, t) the price of iᵗʰ token at the (end of) day (t).[4]

It is then straightforward to value the wallet, to obtain its Present Value(PV):

Note that at the moment of trade, PV does not change, since one token is swapped for another of equivalent value. To calculate P&L, we simply take the change in the daily PV:

Since PV is a linear operator, it follows that the PV of the sum of two wallets is the sum of their individual PVs — that is, I can either first add two sets of holdings and calculate their PV, or calculate PV of two sets of holdings and add them, and I will get the same answer. We can demonstrate it as follows: Suppose I have one set of holdings, reflecting the trader’s Uniswap trades, h(i, t), and another, representing flows in and out of the wallet (e.g. to and from fiat funds), h’(i, t). Then

and therefore also

This means that we can logically separate the P&L due to initial balance from the P&L due to trading. This is perfect! Not only do we not need to know the initial balance, we can consider it separately to the trading ability.

We can consider two traders. One makes great trades, but her initial wallet holdings are quite sparse — all the profits are made from well-informed trading. The second trader is not so good at trading, but starts with a huge stack of coins at his wallet address. The profits for the second wallet may well be better, but for the purpose of choosing a wallet to mirror, it is the first one we would prefer.

P&L to Performance

Now that we have a daily profit and loss tally, how do we compare wallets? It is tempting to just look at total profits in USDT, but of course this automatically favours larger wallets, regardless of skill.

Instead, we will look at their returns. We get those by dividing their daily P&L number by half of their wallet’s GMV, or Gross Market Value. This is the total value of tokens held in their portfolio, in USDT:

The reason we take half the GMV is that, remember, our portfolio tracks both positive and negative positions. If I start with an empty portfolio and spend 1 USDT to buy some WETH, for example, my GMV immediately after the trade will be 2 USDT — one for the USDT virtual short position, and one for the new WETH holding, worth 1 USDT at time of trade.

Returns adjust both for different absolute sizes of wallets, but also of their relative sizing over time. If a wallet performs well when it is small, deploys the profits at larger size, then has worse luck, the profits may look patchy, but when correcting for the GMV at which trades are made, the returns will reflect overall skill of the wallet.

Time to do some compounding

Compounding is good for you — is the general mantra of investing. Even small returns aggregated over time add up to much more than the initial investment, and hey, crypto is not about small returns!

Let’s say we selected a wallet, whose daily return is on average μ, with standard deviation σ.[5]. What compounded return can we expect over a year?

With daily, independent returns of r(i) with 𝔼 r(i) = μ, Std r(i) = σ, we have

Done? Not quite, sadly. There’s still the σ guy we need to think about. We care not only about the expected return, but also the risk. Let’s measure the standard deviation of our annualised return r̅ too:

We can see that, unsurprisingly, the higher σ, the higher the variance of our returns. Should we care? So long as the average is high, does the rest matter?

It turns out we do care, quite a bit. The variance in daily returns induces a skew in returns. This is demonstrated on the following figure:

The histograms show distribution of r̅ for the same μ but different σ. Each case gives us an expected return of 170%, but with a different distribution of values. We see that for a low σ, likely compounded returns are clustered around the expected return, whereas for high σ, the returns are more dispersed, and in fact the most likely return is negative! Such returns are essentially like a lottery — if you do win, you win a lot, but you are unlikely to hit the jackpot.

How Sharpe are your returns?

This observation motivates ranking wallets by Sharpe ratio instead of average returns. In our context, Sharpe ratio is equal to

Sharpe ratio increases with mean return, but decreases with volatility. [6]. Sharpe ratio is the fundamental metric of performance in the investment industry; you can always double your returns by doubling risk, but you can’t fool the Sharpe ratio by doubling up!

One time wonders

We can nicely illustrate it by looking at the performance of two traders with identical uncompounded return, but very different return distribution. One gets a lucky coin sometimes, while the other makes small, consistent gains:

Top panel demonstrates a sample return over a year, and the two histograms show the expected compounded return over a year. I know which one I prefer! You can see that the “one-time wonder” portfolio has a much lower Sharpe ratio, despite having the same return. This then also shows in the distribution of compounded annual returns — although the mean is the same, the spread of possible outcomes is much tighter for the “slow-and-steady” portfolio.

We thus use the Sharpe ratio to screen for the most promising wallets, as they are the ones that lead to high, consistent compounded annual returns.

Why not…

We explored in depth why just looking at daily returns is unlikely to find the best traders to mirror. But there are other approaches too; could those work for us?

Per-trade returns

Instead of calculating daily returns, why not separate the portfolio into individual trades: trader bought WBTC on 2021–05–03 and sold on 2021–05–14, making a profit of… do we care about what the prices does between trades?

We do. First of all, we cannot escape losses simply by not closing out our positions. If I bought a token for $1000, and now price is dropped to $100, in reality I made a loss. If I have to liquidate the position, for example to exploit a new trading opportunity, I first have to book that loss — might as well be honest about it up front.

Second, the original trader may not care about intermediate losses, but wedo! We don’t know what time horizon the trader has in mind, their pain threshold or their strategy. Our users want to be able to get in and out any time, not just when it suits the mirrored wallet, and so we care about the intermediate performance.

Machine Learning

With so much data to hand (over 40 million trades done by over 2 million wallets), it begs the question — why not Big Data? Why not one of the weapons from the armoury of Machine Learning: boosted trees, Support Vector Machines, Neural Networks?

The problem we’re looking at sadly falls into a difficult corner for ML. Although we have a lot of data, each individual wallet actually has a small number of observations (about 20 trades per wallet). Data is highly non-stationary (changes over time): we can’t just buy SHIB and hope for the best. Uniswap has only been going in earnest for just over a year, giving a very short sample. Finally, if nothing else: crypto evolves at breakneck speed. What today is a great strategy may not work in 6 months time. What’s the next big thing? ML is not great at this kind of problems.


So, what are the top Uniswap wallets? How much better are the best vs. the rest? Figure below shows the histogram of Sharpe ratios for Uniswap wallet returns:

Most of these wallets don’t trade very often; this isn’t the domain of high-frequency traders. This is good news, since market-maker-type wallets are hard to mirror:

Instead, we see that most wallets trade infrequently, once or twice a day or less, which is ideal from a mirror-trading point of view. We don’t need to worry about single-block dynamics, price bouncing around during the day, it’s about medium-term trades, with alpha evolving on the timeframes of days to months.

The typical wallet is also not very large, with the vast majority under $1mn GMV:

That said, there are whales stretching out to many 10s of millions of USDT in value, they just aren’t very frequent. Very small wallets can be indicative of trading in very illiquid tokens too. These may be good opportunities for the traders themselves, but hard to mirror — the pie may simply not be large enough for everyone to share.

Two striking relationships we noticed are that history length and GMV are both mildly predictive of performance; larger, more established wallets perform better:

These are not persistent enough on their own to select a wallet automatically, but they certainly help guide our selection. After analyzing hundreds of wallets in detail, we narrowed in on wallets with highest Sharpe ratio having:

1. Wallet GMV of at least 2 million USDT

2. Average trade size of at least 25,000 USDT

3. At least 100 trades per year

4. Trading for at least 6 months

In addition, we analysed wallets for consistency, trading style, and standout trades, like discovering low or midcap tokens that significantly increase in Market Cap early into the trade.

We will soon be releasing our selected wallets in subsequent articles on Medium, stay tuned for details!


This article summarises our analysis of Uniswap wallets, the use of Quantitative Analysis to gain insight into Crypto trading and leveraging it to build new products in the DeFi ecosystem.

We help investors discover investment opportunities, in ways unparalleled in classical finance. We are not opaque brokerages with intransparent incentives. We are not building on private, hidden, locked-away datasets. We are instead contributing to the DeFi ecosystem, built on blockchain data, and sharing our analysis.

May the Alpha always fill your sails and we hope you join us on this voyage.

[1] We follow the convention that δ is positive when a user buys a token and negative when the token is sold

[2] For more detail, see

[3] You can think of i as a token’s address for example, but any unique identifier will do

[4] The “end of day” is arbitrary. Fiat exchanges designate a special time of day as “end of trading” — even if trading continues afterwards! We use midnight of UTC, since crypto trades 24/7, but other options make sense too.

[5] For mental convenience, we can imagine it is something like a normal distribution 𝒩(μ, σ²), although neither do we need this extra assumption, nor do we think it holds. Returns are wild and have fat tails!

[6] The 365* factor annualizes the fraction, so that it is the ratio of annual expected return to annual volatility, instead of daily

Jay Gatsby

Jay Gatsby has a 12 year history working with some of the top tier global UK hedge funds. By trade he is a quantitative modeller and analyst who has also spent time in portfolio construction, building trading strategies and useful tools that have been garnered to produce excellent financial returns. Gatsby was educated at Cambridge where he won multiple awards for top examination results in mathematics and had his research publications published.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store