CarmineOptions / konoha

A toolkit for DAO-like governance on Starknet
Apache License 2.0
23 stars 33 forks source link

ODHack: Deposits to support ZKLend #81

Closed tensojka closed 3 weeks ago

tensojka commented 1 month ago

Extend treasury.cairo to support deposit and withdraw to/from ZkLend. support for multiple tokens (ETH, USDC, USDT, STRK, WBTC)

You can use the feature of depositing into Carmine liquidity pools in treasury.cairo as inspiration.

Definition of Done

The Cairo code works as expected, has nearly full test coverage, is reasonably documented (docstrings or similar suffice) and readable. An end-to-end integration test is provided.

mubarak23 commented 1 month ago

@tensojka can i work on this, kindly assign

tensojka commented 1 month ago

@mubarak23 Refer to https://github.com/CarmineOptions/konoha/blob/master/CONTRIBUTING.md please, you are missing an estimated delivery timeline. I would also appreciate a brief summary of your relevant skills, though not strictly required.

It would also be nice of you to join the Konoha Dev Telegram group for faster communication.

od-hunter commented 1 month ago

@tensojka can i be assigned to ths? I have good experience incairo, It's my first time and i'd love to be given the opportunity

princeibs commented 1 month ago

I would like to take this task.

ghost commented 1 month ago

@tensojka I’m ready to start work can I hop on this?

tensojka commented 1 month ago

You are kindly requested to provide an estimated delivery timeline and possibly your approach to the task @od-hunter @princeibs

od-hunter commented 1 month ago

@tensojka When I am assigned this issue, I’ll begin my research on all that it entails, so my estimated delivery timeline is 3 days highest starting from the day of my assignment. I’ll like to be given this opportunity as proof myself as I have a wide on developing/working on Starknet and others. And with my Cairo and solidity solid skills I’m sure I can deliver, thank you.

od-hunter commented 1 month ago

@tensojka Hello, I just went through this again and below are my approaches for this project:

  1. Understand Existing Code and Requirements, that is I’ll review treasury.cairo, research how ZkLend works and identify Supported Tokens: Confirm the tokens you need to support (ETH, USDC, USDT, STRK, WBTC).
  2. Plan the Extension, that is to determine the functions I’ll need to implement or extend any new data structures required for managing multiple tokens. I’ll also specify Workflow.
  3. Implement Deposit and Withdrawal Functions. If necessary, I’ll modify existing functions to integrate with the new deposit and withdrawal functionalities.
  4. I’ll write Comprehensive Tests. And lastly;
  5. Documentation. Please I’d like to be given this opportunity to proof my skills. I’m a fullstack engineer and I assure you I have full knowledge on this.
tensojka commented 1 month ago

@princeibs You have been assigned the task as od-hunter was assigned a different task, congrats

tensojka commented 1 month ago

@princeibs How are you progressing? Could you open a draft PR so I can review?

princeibs commented 1 month ago

I am still putting the work all together, coupled with some research. I will create the PR ASAP

princeibs commented 1 month ago

Hi @tensojka, I'm facing a blocker here. I need the interface of market.cairo defined inside https://github.com/zkLend/zklend-v1-core/blob/master/src/market.cairo in order to make deposit and withdraw from within treasury.cairo. However, I noticed that the package zklend-v1-core does not have a scarb.toml file, making it hard to import in scarb.toml of this project. Here is the error I get whenever I add

zklend = { git = "https://github.com/zkLend/zklend-v1-core.git" }

to the dependencies section of scarb.toml:

image