Open lukaspetrasek opened 1 day ago
Hi
@lukaspetrasek, can I work on this? I have read through the guidelines and the README and also gone through the current implementation. I know exactly what needs to be done.
Hi @ooochoche! Maintainers during the ODHack # 8.0 will be tracking applications via OnlyDust. Therefore, in order for you to have a chance at being assigned to this issue, please apply directly here, or else your application may not be considered.
I am applying to this issue via OnlyDust platform.
@lukaspetrasek
Can I work on this? I have read through the guidelines and the README and also gone through the current implementation. I know exactly what needs to be done.
I am applying to this issue via OnlyDust platform.
Hello, i am Dprof-in-tech, an experienced Full Stack Blockchain Developer and I am excited to contribute my skills to this project in this ODHACK 8. With a strong background in Next.js, TypeScript, JavaScript, React, Node.js, Rust and Cairo, I've honed my technical skills across the blockchain development landscape.
My journey with OnlyDust began at Edition 2, and I've since made 34 contributions across 11 projects. This extensive experience on the platform has allowed me to develop a keen understanding of delivering high-quality solutions under tight deadlines. I bring a unique blend of technical prowess and user-centric design to every project, whether I'm crafting immersive 3D experiences or developing innovative smart contracts.
My track record demonstrates my ability to adapt quickly and contribute effectively to diverse challenges. I'm confident in my capacity to tackle new problems and drive innovation in the blockchain space. As we begin ODHACK 8, I'm eager to leverage my hackathon experience and technical skills to push the boundaries of what's possible in blockchain development.
Below is a link to my OnlyDust public profile. https://app.onlydust.com/u/Dprof-in-tech
Approach for Add informative warning message when the selected lending protocol doesn't use the selected token (#190):
I will read and understand the existing code: I will start by thoroughly going through the Contributor Guidelines and README to understand the project setup and best practices. Next, I will examine the current implementation of the Streamlit dashboard, specifically focusing on the code around the main chart titled "Liquidable debt and the corresponding supply" located in app.py around line 319.
I will identify how the dashboard processes user input when selecting a lending protocol, collateral tokens, and debt tokens to understand why a KeyError occurs.
I will replicate the issue locally: I will set up the project by following the instructions in the README and run the dashboard locally to reproduce the error where selecting an incompatible lending protocol and token pair causes the KeyError crash. This will help me identify the exact point of failure and the conditions that cause the error to arise.
I will implement error handling for unsupported tokens: Once I understand the failure point, I will introduce error handling in the part of the code where the dashboard checks for the existence of liquidable debt based on the selected lending protocol, collateral token, and debt token. Instead of letting the program crash with a KeyError, I will write conditional logic that checks if the selected protocol supports the given collateral or debt token.
If the tokens are not supported, I will display a user-friendly and informative warning message:
"No liquidable debt for the
I will ensure the remaining data displays properly: After showing the warning, I will update the chart to display data for the remaining valid protocols (i.e., protocols that do accept the tokens), so the user still gets useful information despite the mismatch.
I will handle this gracefully to avoid any further crashes or unhandled errors.
I will test the solution: I will thoroughly test the solution by selecting various combinations of lending protocols and tokens to ensure that the error handling works as expected.
Specifically, I will test: Supported protocol and token combinations. Unsupported protocol and token combinations to trigger the warning message. Scenarios where only the collateral or debt token is invalid. I will also ensure the chart refreshes and displays data for the remaining protocols in each case.
I will document the changes: I will update the project documentation to explain the new behavior, including the warning message and how it handles unsupported tokens. If there is a contributors' guide on error handling or messages, I will ensure my changes align with the project's standards.
I will submit the pull request and provide code coverage: I will write unit tests to cover the new error-handling logic and the warning message display, ensuring they pass and contribute to the overall code coverage. I will provide a screenshot of the updated test coverage, ensuring the coverage percentage aligns with the project's requirement (>=70%).
I will create a pull request following the project guidelines, ensuring my branch is rebased on the current master before submitting.
Estimated timeline: Start Date: Immediately upon assignment. Estimated Completion Date: 2 days from the start date (ETA: 2 days).
I am applying to this issue via OnlyDust platform.
I would like to take this task, this task will be delivered within 4 days (26, september, 2024-30, september, 2024). My name is Shawon James. I am a programmer who specializes in Python. I have been using Python for over 7 years. I have a very strong understanding of the language, its fundamentals and some of the more complicated things. I use python to solve problems (sometimes with the use of popular algorithms), automation of tasks, web scraping, backend development, data analysis.
I would make use of the "try, except" keywords that Python provides to catch the error. The try block would be used to check for the error. The except block would be used to handle the raised error or exception which is a Key error. In the except block the message "No liquidable debt for the
I am applying to this issue via OnlyDust platform.
Hello, I'm Daniel Calderón! I'm a passionate software engineer with over 3 years of experience, actively contributing to open-source projects through OnlyDust. I’m also a community moderator at Dojo Coding, where I help new developers get started with blockchain development. Over the past few months, I've contributed to several Starknet projects, including cairo-vm-go by Nethermind. Currently, I’m a Cairo developer at ByteBuilders, working on ByteBeasts, a fully on-chain RPG game built using the Dojo Engine framework. My expertise spans full-stack development, with a focus on backend, frontend, and smart contract development in blockchain ecosystems.
I'm a returning contributor! I solved 2 issues of this project in the past, the last one couple of weeks ago, so I have good context of the code base and how to solve the issue!
To solve this I will follow your suggestions to avoid having that specific error and show a warning instead.
I can get this task done in 2 days
I am applying to this issue via OnlyDust platform.
Hello @lukaspetrasek I am Joseph I am a frontend developer and blockchain developer and I am also an active contributor here on only dust here is my profile https://app.onlydust.com/u/josephchimebuka. This is my first time to contribute to this repo ill appreciate the opportunity to contribute
To solve this issue the steps and guidelines to follow to solve the error have already being outlined I will follow them before submitting a PR.
I am applying to this issue via OnlyDust platform.
Approach to Fix the Issue:
The warning will inform the user that the selected lending protocol doesn't accept the chosen collateral token or debt token. Example Warning: st.warning(f"No liquidable debt for the {collateral_token} collateral token and the {debt_token} debt token exists on the {lending_protocol} lending protocol.")
Filter Valid Data: I would iterate over the remaining protocols and display the chart for combinations where valid data exists. This ensures the dashboard remains functional and provides the user with as much relevant information as possible. Example: valid_protocols = [protocol for protocol in data if data[protocol].get(collateral_token) and data[protocol].get(debt_token)]
for protocol in valid_protocols: st.write(f"Displaying data for {protocol}...")
I have experience with Python and building interactive applications using Streamlit. This allows me to modify the Streamlit dashboard efficiently, ensuring smooth error handling and user experience. Familiarity with data-driven dashboards allows me to ensure that the app can gracefully recover from missing data and continue providing valuable insights. Error Handling and Debugging:
I have experience identifying and fixing bugs like KeyError in Python applications. This skill allows me to implement robust error handling, preventing crashes, and improving application stability. User Experience Focus:
I focus on creating user-friendly applications, ensuring that error messages are informative and that the app remains functional even when part of the data is missing or invalid. My background helps me design solutions that keep users informed and the application responsive, even in the presence of incomplete data.
Step-by-Step Approach:
Link to the code:
GitHub app.py Line 319 Focus on the part of the code that fetches the lending protocol, collateral token, and debt token combinations.
Check for Valid Combinations: Before attempting to plot the chart, ensure that the selected lending protocol supports the chosen collateral and debt tokens. Example: try:
data = get_liquidable_debt_data(protocol, collateral_token, debt_token)
# If no KeyError is raised, proceed to plot the chart
plot_chart(data)
except KeyError:
st.warning(f"No liquidable debt for the {collateral_token} collateral token "
f"and the {debt_token} debt token exists on the {protocol} protocol.")
Example: def check_token_support(protocol, collateral_token, debt_token, data): if protocol not in data or \ collateral_token not in data[protocol]['collateral'] or \ debt_token not in data[protocol]['debt']: return False return True Apply Before Chart Creation: Use this function to check the combination before proceeding with chart creation.
if check_token_support(protocol, collateral_token, debt_token, data):
plot_chart(data)
else:
st.warning(f"No liquidable debt for the {collateral_token} collateral token "
f"and the {debt_token} debt token exists on the {protocol} protocol.")
Loop Through Protocols: If a user selects multiple protocols, check each protocol individually and generate the chart only for those that support the selected tokens. Example: for protocol in selected_protocols: if check_token_support(protocol, collateral_token, debt_token, data): plot_chart_for_protocol(protocol, data) else: st.warning(f"No liquidable debt for {collateral_token} and {debt_token} on {protocol}.")
I am applying to this issue via OnlyDust platform.
I have a strong background in Python and experience with dashboard development using Streamlit. My expertise in error handling and user experience will allow me to effectively implement the informative warning system, ensuring the dashboard provides helpful feedback instead of crashing
I would first replicate the KeyError issue by running the dashboard locally. Then, I’d implement a check to verify if the selected lending protocol supports the chosen tokens. If not, I’d display an informative warning message and ensure the chart still loads data for other protocols. Finally, I’d test the implementation for robustness
I am applying to this issue via OnlyDust platform.
I am a full-stack developer with experience in QA testing and languages like Python, Cairo, Solidity, React, and JavaScript.
i will Identify Protocol and Token Combinations Create a mapping of supported lending protocols and their corresponding tokens: Use a data structure (e.g., JSON, database) Update the mapping as new protocols and tokens are added, Validate Protocol-Token Combination Check if the selected protocol and token are compatible Use the mapping from Step 1 Return a boolean indicating compatibility
I am applying to this issue via OnlyDust platform.
hello i am a frontend dev and blockchain developer please can i work on this issue :) and would love to be a contributor
please assign me and i'll get to work
The maintainer lukaspetrasek has assigned Dprof-in-tech to this issue via OnlyDust Platform. Good luck!
Hi everyone, assigning @Dprof-in-tech!
@Dprof-in-tech Let me know if everything is clear. If you have any questions, please ask here. What is you TG handler please? 🙏🏼
Consider joining our TG group. See also our contributor guidelines.
Steps:
0) Read our Contributor Guidelines and README. 1) Check out the current implementation of our streamlit dashboard, specifically the part that displays the main chart titled "Liquidable debt and the corresponding supply ...": https://github.com/CarmineOptions/derisk-research/blob/master/app.py#L319. The dashboard can be found here. 2) On the very top, users specify lending protocols and collateral and debt tokens. However, if the selected lending protocol doesn't accept the selected collateral token as collateral, or doesn't lend out the selected debt token, the dashboard crashes on a "KeyError" error. Run the dashboard locally and try it yourself. 3) Handle such cases by showing an informative warning, e.g. "No liquidable debt for the collateral token and the debt token exists on the lending protocol.", and display the chart with data for the remaining protocols.