konoha icon indicating copy to clipboard operation
konoha copied to clipboard

ODHack: Deposits to support ZKLend

Open ondrejsojka opened this issue 1 year ago • 11 comments

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.

ondrejsojka avatar May 22 '24 16:05 ondrejsojka

@tensojka can i work on this, kindly assign

mubarak23 avatar May 22 '24 16:05 mubarak23

@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.

ondrejsojka avatar May 22 '24 16:05 ondrejsojka

@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

od-hunter avatar May 22 '24 20:05 od-hunter

I would like to take this task.

  • I will need two working days for research and 1 working day for implementation. 23rd - 24th may (for research), 25th may for implementation.
  • I am a fullstack engineer and I have vast experience building on both ethereum and starknet. I have also deployed a couple of projects to the mainnet and contributed to a number of core projects in the ecosystem.
  • I have the following skills relevant for this task: Cairo, Solidity.

0xibs avatar May 23 '24 02:05 0xibs

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

ghost avatar May 23 '24 02:05 ghost

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

ondrejsojka avatar May 23 '24 09:05 ondrejsojka

@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 avatar May 23 '24 09:05 od-hunter

@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.

od-hunter avatar May 23 '24 10:05 od-hunter

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

ondrejsojka avatar May 23 '24 11:05 ondrejsojka

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

ondrejsojka avatar May 27 '24 14:05 ondrejsojka

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

0xibs avatar May 27 '24 15:05 0xibs

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

0xibs avatar May 29 '24 11:05 0xibs