[ALGO] Folk Finance REKTs (liquidations)

    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...

    Introduction

    • Folks Finance has a variety of assets (and fAssets) to be used as collateral and/or borrowed.
    • Their pool/app_ids and corresponding asset_ids can be looked up in the documentation.
    • A borrow first needs to deposit collateral, which grants the depositor equivalent fassets. These fassets can then be used to open a loan/borrow position.
    • Official Website. Image/Logo sourced from the website!

    Dashboard Objectives

    • The dashboard will be taking a look at the liquidations that have taken place on Folks Finance protocol since inception.
    • It will attempt to derive insights based on the collateral and the borrowed assets used in the positions that got liquidated.
    • It will also explore the profits netted by the liquidators and the protocol(if any).

    Author:

    db_img
    Loading...

    Liquidation Mechanism

    • Whenever the loan/borrow position’s health/LTV ratio falls below/equal to the liquidation thresholds specified as per the documentation, a liquidator can invoke the position to be liquidated.
    • The liquidator pays the principal borrowed ( and any leftover interest ) and takes over the collateral used to open the position.
    • The liquidator’s incentive/profit is the difference between the value of collateral liquidated and the total amount paid by the liquidator for the position.

    Finding Liquidations on-chain

    • With the app_ids of the pools in-hand, we can use the following filter:

      TRY_BASE64_DECODE_STRING(tx_message:txn:apaa[0]::STRING) = ‘l’

      on the flipside_prod_db.algorand.application_call_transaction table. This yields us all the tx_group_ids

    • Once we have the tx_group_ids, we traverse all the related transactions in the group, and derive our required fields for each liquidation group using flipside_prod_db.algorand.transactions table.

    • We also utilize the following tables:

      • flipside_prod_db.algorand.prices_swap: To map hourly prices of the assets when the liquidations occur.
      • flipside_prod_db.algorand.asset: To fetch asset_names for the corresponding asset_id.
    • A sample liquidation event is shared below!

    NOTES:

    • The dashboard uses the ‘REKT’ terminology to reference:

      • the liquidations as REKTs
      • the liquidators as REKTors, etc.

      As popularised by the BITMEX bots/feed.

    • All fAssets are resolved back to their tethered/original assets for sake of simplicity.

    • Additionally, prices/profit computations might vary as the dashboard uses the hourly average prices of an asset.

      \

    REKTS per Day 💣💣💣💣

    • REKT COUNTS

      • We look at the daily count of liquidations that happen, split by the collateral used as well as the position/asset borrowed.

        \

      • The majority count of positions liquidated had:

        • ALGO as collateral.
        • USDC as a borrowed asset.

        \

      • We see peaks on May 11th and 26th, turbulent market days!

    • REKT VOLUME

      • We look at the daily VOLUME of liquidations that happen in USD value, split by the collateral used as well as the position/asset borrowed.

        \

      • The majority volume of positions liquidated had:

        • gALGO as collateral.

        • USDC as a borrowed asset.

          \

      • We only see a Volume peak on May 11th whereas the counts had a peak on 26th too…

      • This implies the volume on May 26th was too low!

    • REKT VOLUME (CUMULATIVE)

      • This chart doesn’t really add new inferences which we didn’t already gather above.
      • But it’s great to look at! 😎

    REKTor Profits 💸💸💸💸

    • We take a glance at the profits reaped by the liquidators
    • The highest payday for the liquidators is also the highest liquidation volume day!

    REKTs Overall Stats

    • We take a look at the high-level stats of the liquidations that have happened.
    • gALGO collateral has BOTH the highest total & average liquidated volume!
    • The majority uses only gALGO & ALGO as collateral
      • The rest of the options as rarely used.
    Loading...
    Loading...

    TOP REKTS - The Hall of Fame

    • We take a glance at the biggest losers 💣💣 and the profiteers 💸💸!
    • Coincidentally, the biggest collateral losses are where the big profits are made too!
    • There are liquidations where the liquidators have made off higher percentage_returns per position though the volume amount quite lower.
    db_img
    db_img
    Loading...