Joystream / Joystream/joystream

P2P swaps of project tokens

Open
#3,822 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue post-mainnet project_token runtime
Dominant language
Rust
Stars
1.4k
Forks
116
PR merge metrics
No merged PRs in 30d

Description

Background

Currently, there is not way for holders to trustlessly do p2p (e.g. OTC) trades for $CRT, this would be a nice feature. This means such trades would now have to involve some sort of custodian - which may or may not exist, or engage in risky transactions where there is a risk of defection.

Question

The ability of a holder to offer $CRT in exchange for specified amount of $JOY to a specific beneficiary member, where this member will need to accept and pay to execute the swap. The $CRT have to be liquid at the time of initiation. It should, like normal transfers, also be possible for the channel owner to initiate such swaps with an accompanying vesting schedule aligned with the time of acceptance, just like they can for normal transfers. The initiator can always cancel the pending swap at any time while it has not yet accepted. $CRT which is encumbered by a such a pending swap cannot be used for any other activity, like staking for revenue splits, transfers, issuer sale, AMM, etc., they should not count as liquid any longer

The main challenge here will be to add a new way of locking $CRT for this purpose which dose not complicate accounts much further. We have a recurring need to add new ways of locking funds, beyond staking. This can get messy.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing account locking, staking, transfer, and vesting flows in the Joystream repository to understand how funds are currently encumbered. Define how a pending $CRT-for-$JOY swap is created, accepted, cancelled, vested, and excluded from other activities; done means the design resolves these lifecycle and locking interactions without complicating accounts.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.