{"id":36614885,"url":"https://github.com/diadata-org/fair-value","last_synced_at":"2026-01-30T12:04:57.548Z","repository":{"id":317230922,"uuid":"1053290016","full_name":"diadata-org/fair-value","owner":"diadata-org","description":"About Feeder node for the Lumina oracle network, providing support for fair-value feeds.","archived":false,"fork":false,"pushed_at":"2026-01-09T09:44:44.000Z","size":7278,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-12T17:53:24.983Z","etag":null,"topics":["blockchain","defi","docker","open-source","oracles","web3"],"latest_commit_sha":null,"homepage":"https://www.diadata.org/docs","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/diadata-org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-09T08:44:21.000Z","updated_at":"2026-01-09T09:35:08.000Z","dependencies_parsed_at":"2026-01-05T18:04:52.662Z","dependency_job_id":null,"html_url":"https://github.com/diadata-org/fair-value","commit_stats":null,"previous_names":["diadata-org/fair-value"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/diadata-org/fair-value","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diadata-org%2Ffair-value","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diadata-org%2Ffair-value/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diadata-org%2Ffair-value/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diadata-org%2Ffair-value/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diadata-org","download_url":"https://codeload.github.com/diadata-org/fair-value/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diadata-org%2Ffair-value/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478065,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: 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":["blockchain","defi","docker","open-source","oracles","web3"],"created_at":"2026-01-12T09:06:19.423Z","updated_at":"2026-01-30T12:04:57.532Z","avatar_url":"https://github.com/diadata-org.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fair-Value Feeder\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./assets/DIA_logo.png\" alt=\"Dia logo\" width=\"200\" height=\"auto\" style=\"padding: 20px;\"\u003e\n\u003c/p\u003e\n\nThe node setup instructions are available in our [Wiki](https://github.com/diadata-org/fair-value/wiki) page!\n\nThis repository hosts a self-contained application for running a fair-value feeder in the Lumina oracle network. The main purpose of a fair-value feeder is to determine the price of reserve backed assets. It consists of a class of scrapers which collect supply and price data from various on-chain sources. As there is a variety of implementations of such reserve backed asset products, the class consists of different ways on how to come up with a price for the considered asset. For the same reason, the meaning of the values determined by the feeder vary depending on the considered asset class.\nIn general, the executable feeds a smart contract by writing the following 5 values:\n\n```\nfairValue:   The dimensionless price of an asset backed by a single reserve asset given by the amount of the reserve divided by the amount of the asset.\nvalueUsd:    The USD price of the asset.\nnumerator:   The amount of the reserve asset in case of a single reserve asset. The USD price of the total of reserve assets in case of multiple reserve assets.\ndenominator: The amount of the asset in case of a single reserve asset. The USD price of the total amount of the asset in case of multiple reserve assets.\ntimestamp:   Unix timestamp of the oracle update.\n```\n\nIt does so by fetching the total supply and the associated reserve tokens along with their amounts for various reserve-backed assets.\\\nIt is worth noting that `fairValue` is only non-zero in case the considered asset has a single reserve asset, as in case of multiple reserve assets, we cannot assign a meaningful number to the considered quotient.\n\n## Requirements\n\n- Docker or Docker Compose installed\n\n- Container has minimal resource requirements, making it suitable for most machines, including Windows, macOS, Linux, and Raspberry Pi, as long as Docker is installed.\n\n- A private key from MetaMask or any other EVM wallet. Alternatively to generate a private key effortlesly, [eth-keys](https://github.com/ethereum/eth-keys) tool can be used for this.\n\n- DIA tokens in your wallet. For running a node in testnet, you can request tokens from the [faucet](https://faucet.diadata.org).\n\n## Quick Start\n\n\u003e **NOTE:** This guide is using docker compose for running a feeder node. You can explore alternative deployment methods [here](https://github.com/diadata-org/decentral-feeder/wiki/Node-deployment#alternative-deployment-methods).\n\n### Navigate to the Docker Compose Folder\n\n- Locate the `docker-compose` folder in this repository.\n- Inside, you will find a file named `docker-compose.yaml`.\n\n### Configure Environment Variables\n\n- Create a `.env` file in the same directory as `docker-compose.yaml`. This file should contain the following variables:\n\n```\n# Node operator configuration (MUST be filled by node operators)\nPRIVATE_KEY=\nNODE_OPERATOR_NAME=\"\"\n# Chain configuration\n# https://github.com/diadata-org/fair-value/wiki/Chain-Info\nCHAIN_ID=\nDEPLOYED_CONTRACT=\"\"\nBLOCKCHAIN_NODE=\"\"\nBACKUP_NODE=\"\"\nIMAGE_TAG=\"\"\n\n# Monitoring\nPUSHGATEWAY_USER=\nPUSHGATEWAY_PASSWORD=\nPUSHGATEWAY_URL=\n\n# Main parameters\nWRITE_TICKER_SECONDS=300\nCONFIG_UPDATE_SECONDS=86400\nWRITE_TICKER_SECONDS=3600\n\n# Scraper parameters\nCONTRACT_CREATION_PBTC=\"\"\nRPC_NODE_EVM_PBTC=\"\"\nBITCOIN_API_SOURCE_PBTC=\"\"\nANKR_BITCOIN_API_KEY=\"\"\n```\n\nPlease refer to the [.env.example](./docker-compose/.env.example) file for the exact environment variables to set.\n\n- Open a terminal in the `docker-compose` folder and start the deployment by running:\n  ```bash\n  docker-compose up\n  ```\n\n### Retrieve Deployed Contract\n\n- Once the container is deployed with `DEPLOYED_CONTRACT` env variable empty the logs will display the deployed contract address in the following format:\n  ```plaintext\n  │ time=\"2024-11-25T11:30:08Z\" level=info msg=\"Contract pending deploy: 0xxxxxxxxxxxxxxxxxxxxxxxxxx.\"\n  ```\n- Copy the displayed contract address (e.g., `0xxxxxxxxxxxxxxxxxxxxxxxxxx`) and stop the container with `docker rm -f \u003ccontainer_name\u003e`.\n\n- Update your `.env` file with `DEPLOYED_CONTRACT` variable mentioned above. Redeployed the container with `docker-compose up -d`\n\n  ```plaintext\n  DEPLOYED_CONTRACT=0xxxxxxxxxxxxxxxxxxxxxxxxxx\n  ```\n\n- Check if the container is running correctly by viewing the logs. Run the following command:\n\n  ```bash\n  docker-compose logs -f\n  ```\n\n- You can optionally cleanup the deployment once you're done by running:\n\n  ```\n  docker rm -f \u003ccontainer_name\u003e\n  ```\n\n- Verify the container has been removed:\n  ```\n  docker ps -a\n  ```\n\n## Error Handling\n\n\u003e **NOTE:** This guide is specific to docker compose. You can check how to handle errors based on your deployment method [here](https://github.com/diadata-org/decentral-feeder/wiki/Error-Handling).\n\nIf any issues arise during deployment, follow these steps:\n\n#### Check Logs:\n\n- Run `docker-compose logs -f`\n\n#### Verify Environment Variables:\n\n- Ensure all required variables (`PRIVATE_KEY`, `DEPLOYED_CONTRACT`,...etc) are correctly set by checking the `.env` file.\n\n#### Restart Deployment:\n\n- ```bash\n  docker-compose down \u0026\u0026 docker-compose up -d\n  ```\n\n#### Update or Rebuild:\n\n- Ensure you're using the correct image version:\n  ```bash\n  docker pull diadata/fair-value:\u003cVERSION\u003e:\u003cVERSION\u003e\n  ```\n- Apply fixes and redeploy.\n\n## Documentation\n\nFor the full node deployment instructions, you can visit our [Wiki](https://github.com/diadata-org/fair-value/wiki) page.\n\nTo learn about DIA's oracle stacks, you can visit our documentation [here](https://docs.diadata.org/).\n\n## Issues\n\nTo report bugs or suggest enhancements, you can create a [Github Issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/creating-an-issue) in the repository.\n\n## Contribution Guidelines\n\nComing soon...\n\n## Community\n\nYou can find our team on the following channels:\n\n- [Discord](https://discord.com/invite/RjHBcZ9mEH)\n- [Telegram](https://t.me/diadata_org)\n- [X](https://x.com/DIAdata_org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiadata-org%2Ffair-value","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiadata-org%2Ffair-value","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiadata-org%2Ffair-value/lists"}