Feature request: Enhanced conditional logic for multisig and transactions

Open
#77 6 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reviewing the four requested capabilities in this issue alongside the Stellar 2018 roadmap and the linked bonds-on-Stellar discussion. Determine whether each request belongs in the protocol or an off-chain marketplace, and identify the required design and compatibility decisions. Done would require an agreed scope and protocol design, not a single implementation edit.

Written by the indexing model from the issue text.

Description

CAP help wanted needs draft

feature request

My startup is trying to build licensed securities as smart contracts on Stellar. We have a working proof-of-concept for an asset-backed-loan on the Stellar test net. However before we can move to the livenet there are a number of features not currently available that we need to figure out a way to provide.

In the recent Stellar 2018 roadmap post it was mentioned that one of the top priorities is SDEX and getting more financial instruments like the ones I am trying to build onto stellar. During the process of building our POC I found that there are a number of features currently missing that prevent Stellar from fully being used for this purpose.

I'm willing to help contribute to the development of these features but I've only been working with the Stellar api a few weeks so I would really appreciate some guidance so that I can contribute in a way that is in harmony with the current spirit of the stellar codebase.

I see a lot of potential in stellar with trustlines, the ability for anybody to issue an asset, and pathfinding. Stellar can be much more than just a cryptocurrency. With the changes I am requesting Stellar will be able to support a much wider ranger of financial instruments and I am hoping I can get some assistance and advice in how to implement them.

Things I am looking for:

  1. More granularity with the security thresholds. For example I can set different thresholds for different operations, but all payments count under the same operation. So I can't for example authorise an employee to be able to sign transactions up to a total of 10k usd per month, and if he wants to go above that he needs another sig. Or another usecase would be to authorise the employee to make any transaction that exchanges btc for usd, but if he wants to transfer usd out of the account he needs to get another sig. I know some of this functionality can be approximated by using multiple accounts. But I think this is not a great solution, as for non developers it is very hard for them to keep track of all these accounts, especially if you are trying to sell a security on stellar and every time you transfer a security you transfer 4-5 accounts at the same time and the amounts in those accounts are all changing programatically over time.. it is not ideal.

  2. Right now you can make an offer that exchanges one asset for another asset, but you cannot make an offer for a transaction that contains multiple operations. Jed talks about one way to implement securities in his blog (http://jedmccaleb.com/blog/bonds-on-stellar/) and in this blog he talks about "signing and making public a transaction" but not submitting it yet. AFAIK there isn't really a marketplace for transactions yet? Maybe that is already on the roadmap for SDEX? The ability to make an offer for a transaction instead of just a basic token swap would be very useful for many types of financial instruments. This part doesn't necessarily have to be on chain but I think it would be nice for SDEX to be able to provide this functionality.

  3. Right now you have to specify the amounts that are to be transferred in the transaction at the time that the transaction is created and signed, not at the time that the transaction is submitted. So for example if I want to sell a bond that contains eth-backed tokens as collateral, and it's supposed to make monthly repayments of usd based on the exchange rate between eth and usd at the time of the payment, there isn't really a way to do that. Another example use case is if I have a financial instrument that is supposed to pay out based on a floating rate based on some index.

  4. Also while there is some conditional logic that is possible by creating multiple transactions with the same sequence number, currently whichever transaction gets submitted first is the one that gets accepted. It would be nice to be able to specify more conditional logic on what allows a transaction to be submitted other than the time bounds. An example would be a transaction that can only be submitted if the eth/usd exchange rate goes below a certain threshold.

Dominant language
RPC
Stars
632
Forks
399
Avg merge
1d 23h
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

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.

More from stellar/stellar-protocol

All issues in stellar/stellar-protocol

Similar issues

More Blockchain issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.