Skip to content

Instantly share code, notes, and snippets.

@bsodmike
Created May 26, 2024 15:09
Show Gist options
  • Save bsodmike/23e234dbcdd58cbc6bfdfa1d754be543 to your computer and use it in GitHub Desktop.
Save bsodmike/23e234dbcdd58cbc6bfdfa1d754be543 to your computer and use it in GitHub Desktop.
Komodo DeFi Challenge feat-metrics

Your task is to extend the functionality of the Komodo DeFi Framework by adding a new node type called a Metrics Node. This will serve as a foundational piece for further development and integration within our framework.

Detailed Requirements:

Repository Setup:

Please fork the Komodo DeFi Framework repository and create a new branch off the dev branch to work on this task. Metrics Node Development:

  • Develop this node based on our existing seed node configuration, ensuring it retains all functionalities of a seed node.
  • Introduce a new config parameter, "i_am_metric": true, to denote its additional metric-gathering capabilities.

Data Collection:

For this POC, the Metrics Node should collect data on executed swaps. Specifically, it should prepare hourly candlestick data representing the price graph of a coin in the DeFi Framework. This data should be structured so that GUIs can utilize it flexibly. While hourly data is sufficient for this test, providing data with more detailed granularity, such as every 15 minutes or every 4 hours—similar to other platforms—will be viewed favorably and can enhance your evaluation. Data Handling and Performance:

  • You are free to decide on how to handle data storage, processing, and caching. The key evaluation criterion will be how efficiently and quickly the data can be retrieved. The handling and implementation of data retrieval are critical parts of this test, as data should always be available promptly.

Implementation Constraints:

  • The implementation of the Metrics Node itself must be native-target only, similar to stats_swaps. However, ensure that the RPC method that requests data from this Metrics Node should work seamlessly across all nodes, whether they are WebAssembly (Wasm) based or native.

RPC Method Addition:

  • Implement a new RPC method in the dispatcher to handle requests for the data collected by the Metrics Node.

Communication and Independence:

Support: While I will be off next week, you can reach out to Onur for any queries or guidance. Feel free to ask about specific parts of the code or any other details relevant to your task. Evaluation Aspect: How much you engage with Onur and how independently you navigate this task will also be part of your evaluation.

Time Frame and Submission Guidelines:

Completing this task efficiently and within a reasonable time frame is part of the evaluation. Ensure your code is well-documented and includes any necessary tests. Once you have completed the task, submit a pull request to the dev branch of the original repository for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment