Skip to content

Latest commit

 

History

History
75 lines (50 loc) · 2 KB

README.md

File metadata and controls

75 lines (50 loc) · 2 KB

Rari Fuse Assets for Dune Analytics

There isn't enough information in on-chain calls & events to easily get a full picture of Rari Fuse pools on Dune Analytics. This eth-brownie script queries the Rari Fuse contracts on Ethereum mainnet and creates a Dune User-Generated Table SQL file containing the Fuse Pool, Fuse fToken and underlying token details.

The outputs of this are implemented in the Dune Ethereum tables/views:

  • rari_capital.view_rari_fuse_ftokens
  • dune_user_generated.rari_capital_fuse_ftokens

They will be updated from time to time. The rari_capital.view_rari_fuse_ftokens may lag as it requires a PR to be processed by Dune to update.

Prerequisites

Please install or have installed the following:

Installation

  1. Install Brownie, if you haven't already. Here is a simple way to install brownie.
pip install eth-brownie

Or, if that doesn't work, via pipx

pip install --user pipx
pipx ensurepath
# restart your terminal
pipx install eth-brownie
  1. Install ganache-cli
npm install -g ganache-cli
  1. Set up Brownie Environment

Configure .env file in the rari_fuse_sql folder with an Infura or Alchemy API ID, and an etherscan API id:

export ETHERSCAN_TOKEN=<your etherscan api id>
export WEB3_ALCHEMY_PROJECT_ID=<your api id>
#or
export WEB3_INFURA_PROJECT_ID=<your api id>

If using Alchemy, switch to Alchemy providers using:

brownie networks set_provider alchemy

Quickstart

  1. Clone this repo
git clone https://github.com/scottincrypto/dune-rari-fuse-assets
  1. Run the script
cd rari_fuse_sql
brownie run fusepools
  1. Execute the SQL

The contents of the resulting output file rari.sql can be copy/pasted into Dune Analytics to refresh the token list