Urgent.News

What's breaking now, across thousands of outlets.

Tech

The metric I designed was the same number twice

I set out to build one metric. Halfway in, the algebra told me it was a number I already had. This is what that looked like, what I built instead, and the three things CoinMarketCap's DEX API does that nobody documents. Everything here runs keyless — no key, no signup, no pip install . Live: https://elephant.edycu.dev Repo: https://github.com/edycutjong/elephant (MIT) The problem I actually cared…

The author designed a new metric to distinguish between two types of traders in decentralized exchanges (DEXs). Initially, they built a single metric, which was just a number they already had. When they tried to create an alternative, they discovered that two seemingly independent fields were actually dependent on each other. This realization occurred after testing the metric with a few hundred tokens and noticing that the results matched their original metric closely.

CoinMarketCap's DEX API provides volume and trade count per side, which the author used to create a ratio (average ticket) for each side. By dividing the volume by the number of trades, they could identify whether a side belonged to a large desk or many individual traders. This new metric proved useful because it could differentiate between a desk distributing into retail and a churned market, even when the net flow was zero.

However, the author found that this metric still had limitations. When net flow was flat, the ratio would become 1, effectively collapsing the two fields into one. The author realized this when they noticed that their ticket ratios and count ratios agreed within a few percent for most rows. They also discovered that the maker address (ma) could directly indicate the concentration of trades, making it a more reliable measure than the previously designed metric.

By analyzing data from the API, the author was able to prove that one wallet held 62% of the USD value on one side, while the other side saw 212 distinct wallets.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Tuesday 8 September →