[Template] Coin Age 🪙

    How old are your coins? Calculate Mean Coin Age and Sum Coin Age with this dashboard. Use this template as-is, or fork it to make more things!

    How to use this dashboard

    By default, this dashboard shows WETH coin age in days for the year 2023. Want something else? Plug in your parameters at the top! The start date (choosing a recent date will speed up your results), the contract address of the token you want to visualize (ERC-20 or ERC-721 on Ethereum), and your desired time unit if you want coin age anywhere between minutes to years.

    Mean Coin Age

    or MCA is the average length of time one token has been sitting untransferred in a wallet. Check it out on the graph on the right side ->

    Sum Coin Age

    a.k.a. (SCA) or Sum Coin Age Lost is calculated for all addresses holding the token of interest:

    Sum token balance held in each wallet * Length of time it has been untransferred

    The unit of measurement depends on the selected timeframe parameter. For example, if selecting day, the y (vertical) axis will be measured in token-days (e.g. Bitcoin-days, ETH-days, and so on).

    Find SCA on the chart ->

    Coin Age 🪙
    Metrics 📊

    Coin Age of a token represents how long it has been idle.

    For a particular holder, the calculation includes the amount of tokens * length of time.

    Some PoS chains use it to pick the next block validator. Outside of nodes, 'retail' coin age can also be interesting to a protocol to understand use and activity.

    Image courtesy of The Portable Antiquities Scheme/ The Trustees of the British Museum under the CC BY-SA 2.0 License.

    db_img
    Feedback and suggestions for improvement?
    • Let me know how to make this template better!
    • Reply to this Twitter thread
    • DM me on Twitter
    • Or reach out on Discord: mar1na (no digits)
    Method

    1.This dashboard supports ERC-20 and ERC-7211 tokens on Ethereum.

    Native Ether support is being added to the dashboard soon! The underlying ethereum.core.ez_balance_deltas table supports native Ether, making this possible.

    2.The caveat with the balance deltas (changes) table is that it's not daily for each wallet.

    It only gets a new entry when the holdings change. If Alice buys 5 USDC on June 1st and holds, the last entry for her wallet in USDC will be on June 1st.

    Thankfully, Flipside has already built a daily balances query to turn the balance deltas table into daily format. It works by creating a template with all calendar dates, and then filling the gaps: extrapolating yesterday’s balance onto today if the latest change was yesterday, and so on. Their query became the starting point for this dashboard -- thanks Flipside team!

    3.Now we finally get to calculating coin age.

    The query achieves it by tacking on, for each entry, the corresponding most recent time when that balance had changed (and what the lagged balance was). If those coins have been aging, we then calculate for how long!

    This spits out two metrics: MCA (the mean or average coin age, for 1 token) and SCA (the sum coin age at a certain point in time, aka the age of all tokens in circulation weighted by the amount).

    4.A terminology tangent:

    Coin and token don’t always mean the same thing. For the purposes of this dashboard they have been used interchangeably, but making this distinction can be among the future upgrades to this template – let me know what you think!

    Loading...
    Loading...