B

Bridge Tansfer Activity Tracker

A dashboard that displays metrics regarding the inflow/outflow of the bridges deployed on Polygon, slicing them by tokens, by scraping the latest on chain data

The problem Bridge Tansfer Activity Tracker solves

All the data used to provide this analysis is scraped directly from on chain.
Delving into the usecases (achieving the ones mentioned in problem statement):

  1. Transparency and Audibility: For all the bridges, the inflow and outflow in USD has been added as a metric which solves the problem of transparency. Also there are widgets to track the net activity (value transfer) on a daily basis.

  2. Price Discovery: Prices are derived from the underlying demand of the token. This dashboard provides the daily inflow/outflow of all the top tokens for each bridge. This balance between the inflow and outflow will determine the price.

  3. Risk Management: The daily inflow/outflow of all the top tokens for each bridge can give you an insight into the risks associated with that particular token. For example, one can easily look at the Wormhole metrics to check that in early May 2022, the amount of inflow of "UST" and the amount of outflow of other tokens

  4. Arbitrage Opportunities: Using the daily inflow/outflow by token, one can track if there is increased outflow of one token on a bridge and add liquidity for that token on this bridge by shifting from some other bridge

  5. Development: You can track the inflow/outflow for each token to find out under used tokens and identify new tokens to support (create mappings in some cases)

The dashboard can easily be extended to add support for other bridges as well. There is plan to support Celr in the coming days. Any new bridge(when it is deployed) can be easily tracked using these set of metrics

Challenges I ran into

  • Understanding different types of bridges - Every bridge has a different contract architecture. The key was to find out the contracts which actually produce events/function calls on addition/removal of liquidity, for eg. the ERC20 Predicate Proxy in case of the POS Bridge. Also in case of Stargate, track direct swaps from one chain to another which is different from the traditional bridges.
  • Data Sources - Reliable data sources are needed to track the inflow/outflow on any bridge. I used Dune Analytics' existing indexed event and function call data to solve this
  • Dashboarding - Relied to Dune's interface
  • Time frame queries - need to be supported (TODO)

Technologies used

Discussion