This Debank powered Streamlit app allows on-chain yield farmers to visualize their risk and understand what drives their pnl.
More details on
Leverages Debank API to decompose risk across all protocols, wallet holdings and nft.
Raw data is stored on S3, and derived data is compiled into 'snapshot', 'transactions' and 'categories' SQLite databases.
Those files live on S3 and are unique to each user (ie. to each debank key). Please note: concurrent usage of a single debank key is not unsafe.
Performs pnl explain btw 2 snapshots, also displays all transactions.
One key feature is the ability to group tokens by underlying (eg ETH-pegged, USDC-pegged...) to separate impact of majors moves from basis moves (eg fluctuations from peg, yield accrual..)
This is driven by the user through the categorization feature.
mostly S3 paths
- enter debank key and addresses on the sidebar
- can trigger a live snapshot and store it
- displays either live or historical risk
- displays granular pnl explain + transactions btw 2 dates
- displays historical pnl explain stacked bars
This is meant to be run as a cron job to regularly fetch data from debank to S3.
- to install, run
pip install -r requirements.txt
- then run module streamlit
run pnl_explain.py
to launch the streamlit app