StarknetByExample icon indicating copy to clipboard operation
StarknetByExample copied to clipboard

Feature: Bi-Directional Payment Channel

Open julio4 opened this issue 1 year ago • 15 comments

Description

A bi-directional payment channel implementation enable off-chain transactions between two parties (Alice and Bob). They allow both parties to exchange funds back and forth without creating on-chain transactions for each transfer.

Show an implementation of such channel on Starknet.

Criteria

  • Include integration tests

Resources:

  • https://solidity-by-example.org/app/bi-directional-payment-channel/
  • https://www.cyfrin.io/glossary/bi-directional-payment-channel-solidity-code-example

ODHack

To be eligible for additional rewards, be sure to review and follow the ODHack Common Guidelines and Contributing Guidelines.

Be sure to join the telegram group and introduce yourself.

julio4 avatar Nov 21 '24 18:11 julio4

Could I be assigned to this?

NueloSE avatar Nov 21 '24 18:11 NueloSE

Hi, I have experience in various open source Rust projects.

carbonable-labs/svgenerator#10

https://github.com/paradigmxyz/reth/commits/main/?author=TropicalDog17

https://github.com/foundry-rs/foundry/commits/master/?author=TropicalDog17

I also have some experience in Cairo, and Solidity: https://github.com/kfastov/worldcoin-bridge-linea/pulls?q=is%3Apr+author%3ATropicalDog17+is%3Aclosed

TropicalDog17 avatar Nov 21 '24 18:11 TropicalDog17

Hi, I've worked on several Cairo tasks in these projects: Shinigami, Raito, ArtPeace and have experience with both Solidity and Cairo development.

dlaciport avatar Nov 21 '24 18:11 dlaciport

Hi, I am proficient Blockchain developer expert in Cairo , Rust and Solidity and also in web development. I have contributed many cairo ,rust projects like chainevents , arkprojects etc . please /assign this issue . Thank You

ryzen-xp avatar Nov 21 '24 18:11 ryzen-xp

Can I try solving this issue?

Supa-mega avatar Nov 21 '24 19:11 Supa-mega

Can I start working on this?

saimeunt avatar Nov 21 '24 20:11 saimeunt


Hey! I'm Gerson. 👋

Member of Dojo Coding. I have contributed before to other projects like:

  • kakarot-rpc
  • kakarot-ssj
  • ef-tests
  • Raito
  • Starknet-Phone
  • Madara
  • stark-cairo-nodes

Can I work on this issue?

Check my OnlyDust profile, I've contributed to many projects: Profile


Plan to Solve the Issue:

  1. Study the codebase to understand the current structure and functionality.
  2. Understand the problem that needs to be solved by thoroughly reading the issue details.
  3. Leverage all provided resources within the issue to get a better grasp of the task at hand.
  4. If I encounter roadblocks, I will ask questions ASAP in the Telegram group to move forward effectively.
  5. I will open a PR and wait for ur feedback

Gerson2102 avatar Nov 21 '24 21:11 Gerson2102

I will solve this issue by implementing a bi-directional payment channel on Starknet, next i will create a smart contract with functions for deposit, transfer, close, and settle. I will then store each party's balance and handle off-chain transactions with cryptographic proofs. Allowing both parties to update balances off-chain, and finalize only when the channel is closed. Lastly i will integrate tests to ensure deposits, transfers, and dispute resolution work correctly, then deploy the contract to Starknet. Kindly assign .

ShantelPeters avatar Nov 21 '24 22:11 ShantelPeters

Hi, I would love to contribute to this issue. I have been learning Cairo for the past 3 months and been creating guides for Starknet contracts during my internship at Nethermind (already completed), including ERC-720 and ERC-20. I started to contribute to Open Source projects during this ODHack, this issue would be an amazing opportunity to start my path as open source contributor in the Starknet ecosystem.

To solve this issue I would create an implementation of bi-directional payment channel and write integration tests using the resources you shared as the inspiration for it.

sandragcarrillo avatar Nov 22 '24 00:11 sandragcarrillo

Hello Julio I'd like to work on this. I have experience in Cairo contributing to Kakarot-ssj, and I am confident in tackling this issue. I'll make sure to communicate if I encounter any problem along the way.

augustin-v avatar Nov 22 '24 01:11 augustin-v

@Gerson2102 Did you made any progress on this?

julio4 avatar Dec 03 '24 02:12 julio4

@julio4 hey Julio, I forgot to notify you on this, I'm sorry. I couldn't work on it because of other tasks that I was assigned during the Hackathon. And I asked a question on the Telegram group and no one replied. So when that happened I decided to move on to other tasks that I had to do in that moment.

Gerson2102 avatar Dec 03 '24 02:12 Gerson2102

@julio4 hey Julio, I forgot to notify you on this, I'm sorry. I couldn't work on it because of other tasks that I was assigned during the Hackathon. And I asked a question on the Telegram group and no one replied. So when that happened I decided to move on to other tasks that I had to do in that moment.

My bad, I missed it. If you still want to work on it, I'll be able to help you. Let me know

julio4 avatar Dec 03 '24 03:12 julio4

Hi, I would love to attempt on this issue @julio4

dlaciport avatar Dec 03 '24 03:12 dlaciport

@julio4 hey Julio, I forgot to notify you on this, I'm sorry. I couldn't work on it because of other tasks that I was assigned during the Hackathon. And I asked a question on the Telegram group and no one replied. So when that happened I decided to move on to other tasks that I had to do in that moment.

My bad, I missed it. If you still want to work on it, I'll be able to help you. Let me know

Seems like a challenging issue, now I have time to work on it. So yeah, let me see what can I do. It would really helpful for me to start if you can answer that question in Telegram. Thanks mate.

Gerson2102 avatar Dec 03 '24 03:12 Gerson2102