{"id":15130198,"url":"https://github.com/xternet/lend-borrow-utilization-fetcher","last_synced_at":"2026-01-19T07:02:53.434Z","repository":{"id":256299034,"uuid":"854851942","full_name":"xternet/lend-borrow-utilization-fetcher","owner":"xternet","description":"Fetching utilization rates from Aave and Compound using subgraphs.","archived":false,"fork":false,"pushed_at":"2024-09-13T16:10:01.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T19:41:26.537Z","etag":null,"topics":["aave","analytics","blockchain","borrowing","compound","defi","evm","graphql","lending","subgraphs","utilization"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xternet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-09T22:08:00.000Z","updated_at":"2024-09-13T16:10:04.000Z","dependencies_parsed_at":"2024-09-13T00:52:08.552Z","dependency_job_id":"9c47639d-c8dd-4841-a80b-0553e78b6031","html_url":"https://github.com/xternet/lend-borrow-utilization-fetcher","commit_stats":null,"previous_names":["xternet/lend-borrow-utilization-fetcher"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/xternet/lend-borrow-utilization-fetcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xternet%2Flend-borrow-utilization-fetcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xternet%2Flend-borrow-utilization-fetcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xternet%2Flend-borrow-utilization-fetcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xternet%2Flend-borrow-utilization-fetcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xternet","download_url":"https://codeload.github.com/xternet/lend-borrow-utilization-fetcher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xternet%2Flend-borrow-utilization-fetcher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28562691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T03:31:16.861Z","status":"ssl_error","status_checked_at":"2026-01-19T03:31:15.069Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aave","analytics","blockchain","borrowing","compound","defi","evm","graphql","lending","subgraphs","utilization"],"created_at":"2024-09-26T02:41:50.236Z","updated_at":"2026-01-19T07:02:53.421Z","avatar_url":"https://github.com/xternet.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lend-borrow-utilization-fetcher\n\nThis project fetches, stores, and visualizes utilization rates from Aave and Compound using subgraphs. By leveraging subgraphs, historical data can be retrieved in minutes instead of weeks using multicall methods. Check if the protocol has subgraphs available at [The Graph Explorer](https://thegraph.com/explorer) for streamlined analytics.\n\n### Setup Instructions\n\n1. **Rename Environment File:**\n\n   - Rename the `.env_example` file to `.env`:\n     ```bash\n     mv .env_example .env\n     ```\n\n2. **Provide The Graph API Key:**\n   - Visit [The Graph](https://thegraph.com/) to obtain a free API key.\n   - After obtaining the key, rename `.env_example` to `.env` and add the API key to the appropriate field:\n     ```\n     API_GRAPHQL=your-api-key-here\n     ```\n\n### Optional: Skip Fetching Data\n\nIf you'd like to skip the fetching process, you can download the pre-fetched 2024-09-10 snapshot:\n\n1. **Download the data from GitHub and extract it into the `./data/` directory:**\n   ```bash\n   wget https://github.com/xternet/lend-borrow-utilization-fetcher/releases/download/data-download/2024-09-10-utilization-rates.tar.gz \u0026\u0026 mkdir ./data \u0026\u0026 tar -xzvf 2024-09-10-utilization-rates.tar.gz -C ./data/\n   ```\n\n### Python Script Setup\n\nThe project includes a Python script for visualizing utilization rate data from CSV files.\n\n#### Prerequisites:\n\n- Install Python 3.\n- Install the required Python libraries:\n  ```bash\n  pip install pandas matplotlib\n  ```\n\n#### Running the Python Script\n\n1. Navigate to the project directory:\n\n   ```bash\n   cd lend-borrow-utilization-fetcher\n   ```\n\n2. Run the Python chart generator:\n\n   ```bash\n   python3 src/make-chart.py\n   ```\n\n   - The script will ask for the protocol, chain, and tokens to visualize.\n   - You can either view the chart interactively or save it to a file in the `data/charts` directory.\n\n### Project Structure\n\n```bash\nlend-borrow-utilization-fetcher/\n├── node_modules/         # Dependencies\n├── src/                  # Source code\n│   ├── fetch-data.ts     # Fetch data from protocols\n│   ├── load-data.ts      # Load and process CSV files\n│   └── make-chart.py     # Generate charts from CSV files\n├── data/                 # Data directory (includes CSV and chart data)\n│   ├── utilization-rates/ # CSV data directory\n│   ├── charts/           # Directory for saving charts\n├── package.json          # Project metadata\n└── README.md             # Documentation\n```\n\n### Example CSV Directory Structure\n\n```bash\ndata/\n├── utilization-rates/\n│   ├── aaveV2/\n│   │   ├── mainnet/\n│   │   │   └── aaveV2-mainnet-DAI.csv\n│   ├── aaveV3/\n│   ├── compoundV2/\n│   └── compoundV3/\n```\n\n### Commands\n\n#### Install Dependencies\n\n```bash\nbun install\n```\n\n#### Fetch Data\n\n```bash\nbun run fetch-data\n```\n\n- Connects to Aave and Compound subgraphs.\n- Fetches utilization rates and stores them in `data/utilization-rates/`.\n\n#### Compress Data\n\n```bash\nbun run tar-data\n```\n\n- Compresses the `data/utilization-rates/` directory into a tar.gz file.\n\n#### Generate Chart with Python Script\n\n```bash\npython3 src/make-chart.py\n```\n\n# lend-borrow-utilization-fetcher\n\nThis project fetches, stores, and visualizes utilization rates from Aave and Compound using subgraphs. By leveraging subgraphs, historical data can be retrieved in minutes instead of weeks using multicall methods. Check if the protocol has subgraphs available at [The Graph Explorer](https://thegraph.com/explorer) for streamlined analytics.\n\n### Setup Instructions\n\n1. **Rename Environment File:**\n\n   - Rename the `.env_example` file to `.env`:\n     ```bash\n     mv .env_example .env\n     ```\n\n2. **Provide The Graph API Key:**\n   - Visit [The Graph](https://thegraph.com/) to obtain a free API key.\n   - After obtaining the key, rename `.env_example` to `.env` and add the API key to the appropriate field:\n     ```\n     API_GRAPHQL=your-api-key-here\n     ```\n\n### Optional: Skip Fetching Data\n\nIf you'd like to skip the fetching process, you can download the pre-fetched 2024-09-10 snapshot:\n\n1. **Download the data from GitHub and extract it into the `./data/` directory:**\n   ```bash\n   wget https://github.com/xternet/lend-borrow-utilization-fetcher/releases/download/data-download/2024-09-10-utilization-rates.tar.gz \u0026\u0026 mkidr ./data \u0026\u0026 tar -xzvf 2024-09-10-utilization-rates.tar.gz -C ./data/\n   ```\n\n### Python Script Setup\n\nThe project includes a Python script for visualizing utilization rate data from CSV files.\n\n#### Prerequisites:\n\n- Install Python 3.\n- Install the required Python libraries:\n  ```bash\n  pip install pandas matplotlib\n  ```\n\n#### Running the Python Script\n\n1. Navigate to the project directory:\n\n   ```bash\n   cd lend-borrow-utilization-fetcher\n   ```\n\n2. Run the Python chart generator:\n\n   ```bash\n   python3 src/make-chart.py\n   ```\n\n   - The script will ask for the protocol, chain, and tokens to visualize.\n   - You can either view the chart interactively or save it to a file in the `data/charts` directory.\n\n### Project Structure\n\n```bash\nlend-borrow-utilization-fetcher/\n├── node_modules/         # Dependencies\n├── src/                  # Source code\n│   ├── fetch-data.ts     # Fetch data from protocols\n│   ├── load-data.ts      # Load and process CSV files\n│   └── make-chart.py     # Generate charts from CSV files\n├── data/                 # Data directory (includes CSV and chart data)\n│   ├── utilization-rates/ # CSV data directory\n│   ├── charts/           # Directory for saving charts\n├── package.json          # Project metadata\n└── README.md             # Documentation\n```\n\n### Example CSV Directory Structure\n\n```bash\ndata/\n├── utilization-rates/\n│   ├── aaveV2/\n│   │   ├── mainnet/\n│   │   │   └── aaveV2-mainnet-DAI.csv\n│   ├── aaveV3/\n│   ├── compoundV2/\n│   └── compoundV3/\n```\n\n### Commands\n\n#### Install Dependencies\n\n```bash\nbun install\n```\n\n#### Fetch Data\n\n```bash\nbun run fetch-data\n```\n\n- Connects to Aave and Compound subgraphs.\n- Fetches utilization rates and stores them in `data/utilization-rates/`.\n\n#### Compress Data\n\n```bash\nbun run tar-data\n```\n\n- Compresses the `data/utilization-rates/` directory into a tar.gz file.\n\n#### Generate Chart with Python Script\n\n```bash\npython3 src/make-chart.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxternet%2Flend-borrow-utilization-fetcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxternet%2Flend-borrow-utilization-fetcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxternet%2Flend-borrow-utilization-fetcher/lists"}