Skip to main content

Produce comprehensive financial reports for your on-chain org

Project description

DAO Treasury is a comprehensive financial reporting and treasury management solution designed specifically for decentralized organizations. Built as an extension to eth-portfolio's Portfolio Exporter, DAO Treasury automates the collection and visualization of financial data, enabling organizations to monitor and report on treasury activities with clarity and transparency.

Key Features

  • Financial Reporting for DAOs: Extends core portfolio functionalities to generate detailed reports tailored for on-chain organizations.
  • Dashboard Provisioning: Utilizes Grafana dashboards—defined in JSON files within the .grafana/provisioning directories—to offer real-time, dynamic visualizations of treasury data.
  • Automated Data Export: Features a treasury export tool that, once configured (with a supported brownie network and Docker), continuously captures financial snapshots at set intervals.
  • Custom Buckets for Wallets: Assign custom categories ("buckets") to specific wallet addresses for more granular reporting using the --custom-bucket CLI option.
  • Ease of Contribution: Non-technical users can easily update or create dashboard visuals using Grafana’s intuitive UI. The Contributing Guidelines document provides a step-by-step guide to defining new visuals and dashboards and integrating those changes into the repository, ensuring that anyone can contribute to the visual reporting aspect of the project.

Requirements

  • Python 3.10 or higher.
  • At least 16GB of RAM.
  • All dependencies installed as specified in the project’s pyproject.toml file.

Prerequisites

  • First, you will need to bring your own archive node. This can be one you run yourself, or one from one of the common providers (Tenderly, Alchemy, QuickNode, etc.). Your archive node must have tracing enabled (free-tier Alchemy nodes do not support this option).
  • You must configure a brownie network to use your RPC.
  • You will need an auth token for Etherscan's API. Follow their guide to get your key, and set env var ETHERSCAN_TOKEN with its value.
  • You'll also need Docker installed on your system. If on MacOS, you will need to leave Docker Desktop open while DAO Treasury is running.

Debug logging

DAO Treasury relies on ypricemagic for price lookups. If you need to spot long-running price calls, enable the y.stuck? logger at DEBUG. Details: y.stuck? logger.

Installation

pip install dao-treasury

Usage

Run the treasury export tool:

# For pip installations:
dao-treasury run --wallet 0x123 --network mainnet --interval 12h

For local development (from source installation), use:

poetry run dao-treasury run --wallet 0x123 --network mainnet --interval 12h

Assigning Custom Buckets to Wallets:

You can assign custom categories ("buckets") to specific wallet addresses for more granular reporting. Use the --custom-bucket option one or more times, each with the format address:bucket_name:

dao-treasury run --wallet 0x123 --network mainnet --custom-bucket "0x123:Operations" --custom-bucket "0x456:Grants" --custom-bucket "0x789:Investments"

CLI Options:

Only optional arguments are listed here. Required arguments (such as --wallet or --wallets) are shown in the usage examples above.

  • --network: The id of the brownie network the exporter will connect to (default: mainnet)
  • --interval: The time interval between each data snapshot (default: 12h)
  • --concurrency: The max number of historical blocks to export concurrently. (default: 30)
  • --daemon: Run the export process in the background (default: False) (NOTE: currently unsupported)
  • --sort-rules: Directory containing sort rules definitions for transaction categorization.
  • --nicknames: File containing address nicknames for reporting.
  • --grafana-port: Set the port for the Grafana dashboard where you can view data (default: 3004)
  • --renderer-port: Set the port for the report rendering service (default: 8091)
  • --victoria-port: Set the port for the Victoria metrics reporting endpoint (default: 8430)
  • --start-renderer: If set, both the Grafana and renderer containers will be started for dashboard image export. By default, only the grafana container is started.
  • --custom-bucket: Assign a custom bucket/category to a wallet address for reporting. Specify as address:bucket_name. Can be used multiple times.

After running the command, the export script will run continuously until you close your terminal. To view the dashboards, open your browser and navigate to http://localhost:3004. Log in with the Grafana admin credentials you set via GF_SECURITY_ADMIN_USER and GF_SECURITY_ADMIN_PASSWORD (or enable anonymous access with DAO_TREASURY_GRAFANA_ANON_ENABLED=true).

Docker

When you run DAO Treasury, eth-portfolio will build and start 4 required Docker containers on your system. Additionally, DAO Treasury will build and start 2 more required containers:

  • grafana

    • Provides a web-based dashboard for visualizing your treasury data.
    • Pre-configured with dashboards and plugins for real-time monitoring.
    • Uses persistent storage to retain dashboard settings and data.
    • Accessible locally (default port 3004, configurable via --grafana-port).
    • Requires login by default using GF_SECURITY_ADMIN_USER and GF_SECURITY_ADMIN_PASSWORD.
    • Optional anonymous access via DAO_TREASURY_GRAFANA_ANON_ENABLED=true (Viewer-only).
    • Sign-ups are disabled for safety.
    • Validates admin credentials on startup and fails fast if they are incorrect.
    • Integrates with the renderer container for dashboard image export.
    • Loads dashboards and data sources automatically via provisioning files.
  • renderer

    • Runs the official Grafana image renderer service.
    • Enables Grafana to export dashboards as images for reporting or sharing.
    • Operates on port 8091 by default (configurable via --renderer-port).
    • Tightly integrated with the Grafana container for seamless image rendering.
    • Note: The renderer container is only started if you pass the --start-renderer CLI flag.

How it works:

  1. DAO Treasury collects and exports treasury data.
  2. Grafana displays this data in pre-built dashboards for analysis and reporting.
  3. The renderer container allows dashboards to be exported as images directly from Grafana (if enabled).

Additional Information:

  • All containers are orchestrated via Docker Compose and started automatically as needed.
  • Grafana provisioning ensures dashboards and data sources are set up out-of-the-box.
  • All dashboard data and settings are persisted for durability.
  • Dashboard images can be generated for reporting via the renderer (if enabled).

Screenshots

DAO Transactions Dashboard

image

Contributing

We welcome contributions to DAO Treasury! For detailed guidelines on how to contribute, please see the Contributing Guidelines.

Enjoy!

Project details


Release history Release notifications | RSS feed

This version

1.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dao_treasury-1.0.0.tar.gz (80.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dao_treasury-1.0.0-cp312-cp312-win_amd64.whl (281.7 kB view details)

Uploaded CPython 3.12Windows x86-64

dao_treasury-1.0.0-cp312-cp312-win32.whl (258.5 kB view details)

Uploaded CPython 3.12Windows x86

dao_treasury-1.0.0-cp312-cp312-musllinux_1_2_x86_64.whl (503.7 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

dao_treasury-1.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (505.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

dao_treasury-1.0.0-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl (524.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ i686manylinux: glibc 2.5+ i686

dao_treasury-1.0.0-cp312-cp312-macosx_11_0_arm64.whl (331.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

dao_treasury-1.0.0-cp311-cp311-win_amd64.whl (279.7 kB view details)

Uploaded CPython 3.11Windows x86-64

dao_treasury-1.0.0-cp311-cp311-win32.whl (257.2 kB view details)

Uploaded CPython 3.11Windows x86

dao_treasury-1.0.0-cp311-cp311-musllinux_1_2_x86_64.whl (491.2 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

dao_treasury-1.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (484.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

dao_treasury-1.0.0-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl (490.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ i686manylinux: glibc 2.5+ i686

dao_treasury-1.0.0-cp311-cp311-macosx_11_0_arm64.whl (329.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

dao_treasury-1.0.0-cp310-cp310-win_amd64.whl (280.1 kB view details)

Uploaded CPython 3.10Windows x86-64

dao_treasury-1.0.0-cp310-cp310-win32.whl (257.7 kB view details)

Uploaded CPython 3.10Windows x86

dao_treasury-1.0.0-cp310-cp310-musllinux_1_2_x86_64.whl (499.0 kB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

dao_treasury-1.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (493.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

dao_treasury-1.0.0-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl (498.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ i686manylinux: glibc 2.5+ i686

dao_treasury-1.0.0-cp310-cp310-macosx_11_0_arm64.whl (334.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file dao_treasury-1.0.0.tar.gz.

File metadata

  • Download URL: dao_treasury-1.0.0.tar.gz
  • Upload date:
  • Size: 80.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for dao_treasury-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6030b78a03bc94c4411157d9043fc61fb987658685c6f53ce6c8a4195e784dde
MD5 0549b4fed910e3bdd60dd819dc5b71ff
BLAKE2b-256 62f455809b6aec8e9d9baa9dc8473424ed85625dd47e1c9be363f777efd1876e

See more details on using hashes here.

File details

Details for the file dao_treasury-1.0.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for dao_treasury-1.0.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3ca3d16ad908135860919dbbb13466600d9e363c106bc7285dc03ff8ee6abaac
MD5 f90b7b310e9c1c6a7f8ef73c0c9388df
BLAKE2b-256 455620b592c0bdc4b8538a319ece5ca059404a6e6c5270f62906a3e31060d44a

See more details on using hashes here.

File details

Details for the file dao_treasury-1.0.0-cp312-cp312-win32.whl.

File metadata

  • Download URL: dao_treasury-1.0.0-cp312-cp312-win32.whl
  • Upload date:
  • Size: 258.5 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for dao_treasury-1.0.0-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 12ba01349e54722ba0edc65a04c93c1f4fe609397061304e61a94e6cd72e6bd8
MD5 bad2e98883e1edc6fe27329a13940593
BLAKE2b-256 c1615a420d61517c7453ff1b9e9c3f7b7d7e3da4a7225f78492a39db54337259

See more details on using hashes here.

File details

Details for the file dao_treasury-1.0.0-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for dao_treasury-1.0.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 04489d3e8d5a82fb566d7786a4401a1e72b150da4881feaa1a425fb01f03a51e
MD5 c4324d9f3b2a8f8cd16dfff8a5911343
BLAKE2b-256 791e1a337fdd22f51a2c617ed3f933aaffd69b9d613bd4c6e724a713fcfb15a0

See more details on using hashes here.

File details

Details for the file dao_treasury-1.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dao_treasury-1.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 61a6438003524e253373101c094f773d3978a0805239709fb83e95c52671eadd
MD5 c0220aa5ab42bcaec13001df581f5e52
BLAKE2b-256 98820b44213abceeebfca4e408300c4c5ebeddd03d32a07eed95fc9db470c242

See more details on using hashes here.

File details

Details for the file dao_treasury-1.0.0-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl.

File metadata

File hashes

Hashes for dao_treasury-1.0.0-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl
Algorithm Hash digest
SHA256 c4cec0bf3e88edf7b0f1f2015e7ebfda5f61fe0d9701dde4cadf3d93df32a9dd
MD5 fea0d306563cf97a6023759f7ec56438
BLAKE2b-256 80ea79423b482bb857d3e763116e90de31da27fe412c506b101e3dd647fe7639

See more details on using hashes here.

File details

Details for the file dao_treasury-1.0.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dao_treasury-1.0.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 be79fe708dc427c9e0db492f7616dfde19382420dea9cca4012ae2c81536125d
MD5 5d30de9aa7a47bc45df46f98637d81e8
BLAKE2b-256 4504e852ca2fdbc3cd6806f1b463f58750fda8539af244d2743c48295e7cd700

See more details on using hashes here.

File details

Details for the file dao_treasury-1.0.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for dao_treasury-1.0.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f327dae696fb5095c871f3821353aee0f45f2a4fcfcb81791a4331c536e6e184
MD5 a0963306699bfe156953220a009d9315
BLAKE2b-256 a42952ace5cad90e99c930a5ae5ef9b1ba96efd13f20f805554a843d00450359

See more details on using hashes here.

File details

Details for the file dao_treasury-1.0.0-cp311-cp311-win32.whl.

File metadata

  • Download URL: dao_treasury-1.0.0-cp311-cp311-win32.whl
  • Upload date:
  • Size: 257.2 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for dao_treasury-1.0.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 c66f04cb9e6f9ef6c1dc34c92fcd1630bda97b5a67537e30a8d41948eca0adfd
MD5 e31552d6fbabfab6766cb1afc88fb7e8
BLAKE2b-256 5aafea10159eb286219914c88234f563708b3dcb98735cb64efb941389d359e6

See more details on using hashes here.

File details

Details for the file dao_treasury-1.0.0-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for dao_treasury-1.0.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 cd90f2bd16bcfaf9f07a54ed3b5538e6f7198257c4b13f75ddc49600fc9292c3
MD5 955a8578ce2f10fd1415f57c7a39da6e
BLAKE2b-256 48ae2ba776f74816cc7a6de87d4a8c4efa7331c0525e66190f9e3f4580c6ccd0

See more details on using hashes here.

File details

Details for the file dao_treasury-1.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dao_treasury-1.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4699d5da66c815907a4b6027e6a44a020445eea5a2b1aaf1a5b48828f0a7ea30
MD5 e05e75a22d518bd2eb15eb87f6ffa868
BLAKE2b-256 387b566720e9bb57d5df48f93e3f97c3fa0aa2910ff7cfc9735ff74efa5c9211

See more details on using hashes here.

File details

Details for the file dao_treasury-1.0.0-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl.

File metadata

File hashes

Hashes for dao_treasury-1.0.0-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl
Algorithm Hash digest
SHA256 8d8ef029a3dc0ad009d33b925932f435c839de6a155a774f7fcd7ffb565dbe63
MD5 f5008237c34fa7372ca40700591c0e5e
BLAKE2b-256 dbe5c4717d988ce54b490cf83b34bd98aab796595a9ba22420a561b4d8059c9d

See more details on using hashes here.

File details

Details for the file dao_treasury-1.0.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dao_treasury-1.0.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 566cb1f7f9f207a1886119cfe90cd3a3ac8f2acc6bad84f6ec5d2532db3cf892
MD5 6d0e2818fa34e87c68c8eeff21103901
BLAKE2b-256 e432e297a74b4d075dcabbfcaab32e450c0e5f1fd22e98494b16f5f40ee385d8

See more details on using hashes here.

File details

Details for the file dao_treasury-1.0.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for dao_treasury-1.0.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 678fcd28461b76008268f5317c9587982715d8ddba7fb72f0e4d9c8ae39d5c05
MD5 e97bad0ffef3805a89acaf9a76d0e132
BLAKE2b-256 48ae974a27b0e71c2d5930825264e7934d42d23ca32b6b739cd0b785b8ea0410

See more details on using hashes here.

File details

Details for the file dao_treasury-1.0.0-cp310-cp310-win32.whl.

File metadata

  • Download URL: dao_treasury-1.0.0-cp310-cp310-win32.whl
  • Upload date:
  • Size: 257.7 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for dao_treasury-1.0.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 13dbdfe81d45643e8da502010796ed2547bad262581217b9381159dfe9f33ab4
MD5 b0e2e6e5f0cc181169286326745e52f6
BLAKE2b-256 7d40a268173c09f18ecbd562d635fc989bb51310c29e8ccafd878c698b50bee5

See more details on using hashes here.

File details

Details for the file dao_treasury-1.0.0-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for dao_treasury-1.0.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 acac93dc3f971c14addedf27432b66d95a21b1f82239d48310c3f8a67ab82cd3
MD5 c689380c75af653a505b518fac386b57
BLAKE2b-256 f6110e94c0bbdb33e4d92c553e4936ea991f8c3895fcddfc81315af9c4b660b2

See more details on using hashes here.

File details

Details for the file dao_treasury-1.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dao_treasury-1.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b703db00f5b2fe964c36ff25d1b0610243127c0c8fa8e97eb772f67a876bc702
MD5 47213c9e4e429644853e4a3673fd25f6
BLAKE2b-256 f26e210a5dfaf6e45ca2389bd92356b38f88279a1fb12d6e08a100b77f9bed71

See more details on using hashes here.

File details

Details for the file dao_treasury-1.0.0-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl.

File metadata

File hashes

Hashes for dao_treasury-1.0.0-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl
Algorithm Hash digest
SHA256 47bb031f10f2322dae124c708ccd480b4278a557ee2cabc348bc55a99bbd757b
MD5 4dca4ad0c53c54dcb132d547a65e2f16
BLAKE2b-256 7ccff731402ccc0b196b56d407a4a37ee28dda01f2a771878abfd198c92d38c3

See more details on using hashes here.

File details

Details for the file dao_treasury-1.0.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dao_treasury-1.0.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4813c9a0411d6703bffb1f0f955a7cdcbf6ce462dcef277b268a001f6f0b18e6
MD5 903a197cfd8a1892f2fbc0eb071d3327
BLAKE2b-256 ede382d813a19d4704c13e76f8c480c74ec8627343ea4365655a384af7410e53

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page