walterhernandez's picture
Upload folder using huggingface_hub
607b889 verified
|
Raw History Blame Contribute Delete
7.53 kB
metadata
license: cc-by-4.0
language:
  - en
pretty_name: >-
  Replication data for "Impact of Adverse Disclosures on Liquidity of Stablecoin
  Markets"
tags:
  - finance
  - defi
  - stablecoins
  - uniswap-v3
  - market-microstructure
  - liquidity
  - ethereum
  - replication
size_categories:
  - 1M<n<10M
configs:
  - config_name: mci_panel
    default: true
    data_files:
      - split: train
        path: panel/panel.parquet
  - config_name: liquidity_events
    data_files:
      - split: train
        path: pools/principal/liquidity_events.parquet
  - config_name: hourly_principal
    data_files:
      - split: train
        path: pools/principal/hourly_principal.parquet
  - config_name: daily_principal_extended
    data_files:
      - split: train
        path: pools/principal/daily_principal_extended.parquet
  - config_name: chainlink_prices
    data_files:
      - split: train
        path: pools/stable_price/chainlink_stable_usd.parquet
  - config_name: hourly_balances
    data_files:
      - split: train
        path: pools/balances/hourly_balances.parquet
  - config_name: multichain_daily
    data_files:
      - split: train
        path: multichain/panel_daily.parquet
  - config_name: l2_polygon
    data_files:
      - split: train
        path: l2/panel_polygon.parquet
  - config_name: l2_arbitrum
    data_files:
      - split: train
        path: l2/panel_arbitrum.parquet

Data for the paper:

Hernandez Cruz, W., Xu, J., Tasca, P., & Campajola, C. (2024). Impact of Adverse Disclosures on Liquidity of Stablecoin Markets. arXiv:2407.11716.


Overview

This dataset holds the small inputs of the paper. The two large inputs are in svb-stablecoins-hourly-tick-liquidity (the tick-level liquidity) and svb-stablecoins-hourly-lp-positions (the positions of each liquidity provider, LP). The paper estimates a difference-in-differences (DiD), weighted by total value locked (TVL), on 155 Uniswap v3 pools on Ethereum at hourly frequency in March 2023, around Circle's disclosure at 03:11 UTC on 11th March 2023. The treatment group holds 119 USDC pools, the two DAI/USDC pools included. The control group holds 36 USDT pools. The TVL of a pool is its LP principal from the Mint and Burn events at the Chainlink price of the stablecoin, with fees excluded. The hourly Ethereum files cover 769 snapshots, from 00:00 UTC on 28th February 2023 to 00:00 UTC on 1st April 2023, at one Ethereum block per hour. The folders follow the data/ layout that the code of the paper reads.


Data

Folder MB Content
panel/ 5.2 the hourly Marginal Cost of Immediacy (MCI) panel of the 155 pools (panel.parquet, 119,195 rows)
pools/principal/ 103.5 697,174 Mint and Burn events of 222 pools, the LP principal per pool and hour, per pool and day (to 30th September 2026) and per Mint owner
pools/stable_price/ 0.1 Chainlink USDC, USDT and DAI prices at every snapshot block
pools/balances/ 13.5 token balances of each pool at the hourly and daily blocks
filtered/ 34.5 subgraph pool data per hour and per day (802 files), the paper's MCI panel in its own format, the tick counts per pool and hour, the MCI of the two USDC/USDT pools, and the Circle reserve amounts
ust_experiment/ 0.6 daily TVL of 15 pools (15th April to 15th June 2022) and LP counts of 17 pools on six dates (30th April to 1st June 2022) around the TerraUSD collapse
multichain/ 3.6 daily USDC and USDT LP principal of Uniswap v3 and v4 on 13 chains, 1st March 2023 to 30th September 2026
l2/ 22.3 pools, hourly MCI and TVL panels, pool states and hourly blocks of Polygon and Arbitrum, March 2023
discovery/ 0.1 the pool registry (218 pools, 155 active, with the reason each inactive pool left the sample) and the discovery outputs

Columns of the main files.

  • panel/panel.parquet. pool_address, hour (UTC), stablecoin, token0_symbol, token1_symbol, fee_tier, tvl_usd (LP principal in USD at the Chainlink price), price_in_stablecoin, vol_hourly, MCI_I, Buy_MCI_I, Sell_MCI_I and MCI_imbalance_I for I in 1, 5, 10, 15 and 20 (basis points per 1,000 units of the stablecoin, 0 where the pool has fewer tick levels than I), totalValueLockedUSD_subgraph (for reference only).
  • pools/principal/liquidity_events.parquet. pool_address, block, log_index, tx_hash, event (Mint or Burn), owner, tick_lower, tick_upper, liquidity_delta (decimal string, negative for a Burn).
  • pools/principal/hourly_principal.parquet. pool_address, trading_pair, hour, block, stable_leg, price_in_stablecoin, bal0, bal1, prin0, prin1 (token units), tvl_balance, tvl_principal (units of the stablecoin at the pool price).
  • pools/balances/hourly_balances.parquet. The same keys, bal0, bal1, tvl_usd (equal to tvl_balance), the token symbols and addresses, and source.
  • pools/stable_price/chainlink_stable_usd.parquet. block, usdc_usd, usdt_usd, dai_usd, with the round id and update time of each feed.
import pandas as pd
from huggingface_hub import snapshot_download

root = snapshot_download("ExponentialScience/svb-stablecoins-replication-data", repo_type="dataset", revision="v1.0")
panel = pd.read_parquet(f"{root}/panel/panel.parquet")

The code of the paper reads these folders when SVB_DATA_DIR points to the download. On panel/panel.parquet, scripts/run_did.py of the code repository of the paper gives the TVL-weighted estimate of the paper at depth 1 for Circle's disclosure, 1.118 (standard error 0.242).

Sources and license

The on-chain data of all 13 chains comes from public archive nodes. The subgraph files of filtered/, discovery/ and ust_experiment/ come from the Uniswap v3 subgraph (Uniswap/v3-subgraph, queried through The Graph). The stablecoin prices are Chainlink Data Feeds (USDC/USD, USDT/USD and DAI/USD), read on Ethereum as contract state. Some daily blocks of filtered/pools_daily/ and ust_experiment/ come from the Etherscan API (Powered by Etherscan.io APIs, https://etherscan.io). In multichain/panel_daily.parquet, multichain/excluded_pools.parquet and two columns of l2/sample.csv, tokens other than USDC and USDT have DefiLlama prices, which are mostly CoinGecko prices. These files hold only sums over pools. They hold no price series. The reserve amounts of filtered/circle_reserves.csv come from Circle's monthly USDC reserve reports (https://www.circle.com/transparency). The reports are not included.

The terms of DefiLlama and CoinMarketCap do not allow us to republish their data. Thus this dataset does not include the DefiLlama pool TVL (Curve 3pool, Uniswap v2 and the fallback chains) or the CoinMarketCap prices. The scripts curve_3pool.py, uniswap_v2.py and multichain/fallback_llama.py of the code of the paper download the DefiLlama data again without a key.

The license of this compilation is CC BY 4.0. It covers only the rights that the authors hold. It does not restrict the use of public blockchain data.


Cite

@misc{cruz2024questionsaskedeffectstransparency,
  title        = {Impact of Adverse Disclosures on Liquidity of Stablecoin Markets},
  author       = {Walter Hernandez Cruz and Jiahua Xu and Paolo Tasca and Carlo Campajola},
  year         = {2024},
  eprint       = {2407.11716},
  archivePrefix = {arXiv},
  primaryClass = {q-fin.TR},
  url          = {https://arxiv.org/abs/2407.11716}
}