-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CFP-2203-01: Public REST API For Historical DEX Prices (2 600 DFI) #125
Comments
Hey, pls read the Announcement: #103 All proposals are to be submitted by Monday, 31 January 2022 23:59:59 UTC and have its fee paid by the first block mined after the time. |
Hi, thanks for the hint. Since it was my first CFP, I was not sure about the process. I am sorry. Maybe I can keep it open as draft until the next round. Otherwise it can be closed and I will open a new issue, when the next round is announced. Thanks! |
How do you get old DEX prices? Are you analyzing the whole defichain and all transactions to reproduce these prices? |
cool idea |
|
|
defi-cli signmessage 8Ht3oDDj2uHeoae3mKALM6kVmsuJaj3SSm cfp-2203-01-yes defi-cli signmessage 8N5iyTHbJNQc1nTfF74khJ9rndj6kG9FzN cfp-2203-01-yes defi-cli signmessage 8YsdyhGMoJfjfujfQox1D2S8d4JTzGQivj cfp-2203-01-yes |
signmessage 8cZqD6X14ipFqmvz6pYYR5p7Dp5n4xc9VT "cfp-2203-01-yes" |
defi-cli signmessage 8amuDG4YEkV1NpePzYarvDZr94ZZVocPBU "cfp-2203-01-yes" |
signmessage 8GChxABDpeAPCr4sCRnNRYB8RucMH9d4dg "cfp-2203-01-yes" |
defi-cli signmessage 8WrcPiaoGhQgitWiBG6e3fW7dVTuZMvjot "cfp-2203-01-yes" |
$ defi-cli signmessage 8VSVVu5mC1pF9H4FHqiBmMKqEPEcCVpkXA "cfp-2203-01-yes" |
$ defi-cli signmessage 8W51RgRwPv5oGaRxygJKm2PX5RyJUe9tMj "cfp-2203-01-no" |
$ defi-cli signmessage 8L5epNpuRvabPJndh4xDaYGV4y8M3fAJGE "cfp-2203-01-yes" |
signmessage 8PaUEQqBGYw3Z5WXUoHVALcGTwwsz7pFta cfp-2203-01-yes |
$ defi-cli signmessage 8dXgX2qd82eyF4qRUhanypMTrcvVf86rVN "cfp-2203-01-neutral" |
$ defi-cli signmessage 8ZPSjYeJSgZtwvsJ8kDDYPJTZrnropZNn9 "cfp-2203-01-yes" |
$ defi-cli signmessage 8P24qRzccs9FJXkqrrzPZGa2aNXxqBkrmb cfp-2203-01-yes |
$ defi-cli signmessage 8a5JfgK8pEG7Wqrg7WbUNCVFVYiApCk13f "cfp-2203-01-yes" |
$ defi-cli signmessage 8RDhfdhFU9imkRc2zykt8kUkekCVrMM6LY cfp-2203-01-yes |
$ defi-cli signmessage 8ZqpfXbUU1iyiotPKwwoFqW42Wd9ogY2iu "cfp-2203-01-yes" |
$ defi-cli signmessage 8WmahtTo7vxBAui1J1zkPmrMs35tcu5jyV "cfp-2203-01-yes" |
$ defi-cli signmessage 8X9mSBVoeFfsk7XyAJmYCGu4SgrQzMj7Ud cfp-2203-01-yes |
$ defi-cli signmessage 8SHpGk5zdURWCZy7D7U4czpwtUUzcjnSJJ "cfp-2203-01-yes" |
$ defi-cli signmessage 8VPoToWdZFNf6oTryZNVSJpL9hdrYMXwqy "cfp-2203-01-yes" |
$ defi-cli signmessage 8ZazLdqc7T5au7jgUDhj2YYP2BKzEzcWNL cfp-2203-01-yes |
$ defi-cli signmessage 8QvxiC2T1pBC6SDFXMEkuGNZm2TnYQW3C6 "cfp-2203-01-yes" |
$ defi-cli signmessage 8VSaWgYYWTPK4yndVwcpL8dHQCpoYEnMar "cfp-2203-01-yes" |
$ defi-cli signmessage 8bqBT3B3Rn1vfSeAkmpSXsioEkfsJD9whh cfp-2203-01-yes |
$ defi-cli signmessage 8FbhMMBrUcvqqafe3LxwmRNrFJVxwJ4RXh "cfp-2203-01-yes" |
$ defi-cli signmessage 8YA5vk6reGxYeyviMuDnzDqz68FSkKZj4i "cfp-2203-01-yes" |
$ defi-cli signmessage 8UL765wzwtmjuyCDgYFroHuvMPLmoxCjVq "cfp-2203-01-yes" |
$ defi-cli signmessage 8TyY18SkykqwTLcEBgwjvycQmZ7udNNrmn "cfp-2203-01-yes" |
$ defi-cli signmessage 8J9cKafkM4wtjEVFUZs84jEhnEQE3sYier "cfp-2203-01-yes" |
$ defi-cli signmessage 8YMSx1ttnr5erxWCV7a8kooPzqwMw2xU6V "cfp-2203-01-yes" |
$ defi-cli signmessage 8UjcU5B7CbEBLyXU1A7u5K4Ug54VehHJqk "cfp-2203-01-yes" |
$ defi-cli signmessage 8Lp58RvNtuK7pe2oYKxz5H5XtQANai8guF cfp-2203-01-yes |
$ defi-cli signmessage 8Lup7XrpLTJNuHQkQd3meaPJ5ShbgyJKCE "cfp-2203-01-yes" |
$ defi-cli signmessage 8b6BF5S6ko9XBFAFbju8bUvoRXCswocRvA cfp-2203-01-yes |
$ defi-cli signmessage 8Lu34LXZANVcTY3BHkVsJ3CrAepRtz3XiD "cfp-2203-01-no" |
$ defi-cli signmessage 8X3KaUcjjwUFoZSRCTGEHe4SfW3eQYdhaF "cfp-2203-01-yes" |
$ defi-cli signmessage 8eDL3yMf4jNFp7U5u95szn68hoWgfTNzJb "cfp-2203-01-yes" |
defi-cli signmessage 8YdCFyJ7e6tkFUvG7S7Ukq2yADe1kXVdaQ "cfp-2203-01-yes" |
$ defi-cli signmessage 8UtzxhiHWnb8Q9G82z7o4USAHSC9yzY2o9 "cfp-2203-01-yes" |
Votes of the DFX CommunityIndividual votes can be viewed transparently here: https://docs.google.com/spreadsheets/d/1tvc1KhLuGGSCfUuZoDnTxqaLDurXcftd8MBA57YfhKQ/edit#gid=1139627798 Votes: signmessage 8KirKNGVgrsQsmWuy1Ee4ZmsnXVVkAEzh2 cfp-2203-01-yes |
defi-cli signmessage 8XjGQuumUBGyevsG8Jn4yZQ6QBpkA4ukgM cfp-2203-01-yes |
$ defi-cli signmessage 8U4PbNps1AuFstQ3UtxurWNmBmZPNHzzYv "cfp-2203-01-yes" |
$ defi-cli signmessage 8e7hbrMLxpXir6YmFsTaj2eDttueXUspmu "cfp-2203-01-yes" |
mnstate_validate.log |
CFP payments have been processed. Please refer to #135 (comment) for detailed info and hashes. Thanks! |
Overview
Purpose: A Public REST API For Historical DEX Prices - Data Is The Key!
The Problem
When I started writing an application that generates tax reports for Liquidity Mining, I quickly ran into the issue that there is no available public API for querying historical prices of the DEX. Not only me, but also other developers from the community often ask about these data. Furthermore, applications like dfi.tax require historical DEX data, as dfi.tax uses CEX prices for the dTokens which makes the generated tax reports inaccurate and do not represent the real earned value.
The lack of a public API for retrieving historical DEX prices hinders the development of more high quality apps around DefiChain. Developers do not have these data at hand, which makes some projects hard to realize and only with a lot of effort.
The Solution
A public API for historical DEX prices (and potentially more data) for everyone.
I implemented a prototype for a public REST API where anyone can query historical prices of the DEX for all poolpairs. The prototype runs currently for TestNet only. TestNet needs less ressources and less disk space on my low-cost server. It's a development server and not production ready in order to showcase you that it works.
With the API you can:
Example using curl:
There is an OpenAPI specification online, where you can also directly play around with the API and test it in your browser:
http://104.131.103.139:8000/dex_api/docs
Documentation Screenshots:
You can try it out directly in the browser:
How will the fund be spent?
The funds will be spent for development and infrastructure costs of the REST API.
Infrastructure:
Costs for hosting the full node for indexing data, API + domain: 70$ / month. I propose to cover the costs for one year: 12 * 70$ = 840$ (~ 740€)
Development costs for next 3 months: 3 months (12 weeks) with 10 hours/week and 60€/hour. = 12 * 10 * 60€ = 7200€ (42% of it will be taxes in Germany)
At a DFI price of ~3€ it's 2600 DFI.
What comes next
✅ Moving from the prototype for TestNet to MainNet data
✅ Proper API Documentation
✅ Improving stability of the API (currently it is a development server), rate limits, improvement of response speed
✅ Additional features:
✅ Other types of data and features can be implemented if the community asks for it
How does this CFP benefit the DeFiChain community?
With the right DEX data available, new apps can be easily implemented for the community. Developers can focus on their area of expertise, e.g. UI/UX. There is no need for funding the development costs of projects, where one developer has to be able to do everything from backend to frontend and can't focus on doing one part really well. If developers can focus on the purpose of their app using existing data, more high quality apps can be pushed out within the community (generating tax reports, calculating the realised impermanent loss, etc..).
The text was updated successfully, but these errors were encountered: