Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

IDEA: "Penny Trust" Swaps (like Atomic Swaps but can be implemented now)

Discussion in 'Development Tech Discussion' started by Elmo, Sep 6, 2017.

Tags:
  1. Elmo

    Elmo New Member
    Masternode Owner/Operator

    Joined:
    Sep 4, 2017
    Messages:
    18
    Likes Received:
    5
    Trophy Points:
    3
    I posted this before to the general discussion but think here is a better place. Also I clarified it a little bit.

    This is to be implemented at the wallet level.

    The Basic idea is to swap two currencies a penny at a time to eliminate the risk of default from one party. The risk would be limited to a penny (or any other small amount).

    Lets suppose two users, A and B want to swap 300 BCH for 500 DASH

    They each open a unidirectional payment channel on the blockchain each has the money in.
    (2 Channels, 1 on each blockchain.)

    This has to be done on a wallet that can handle those 2 blockchains. And programed to do this particular type of transaction.

    A opens a unidirectional channel to pay B 300 BCH on the BCH Blockchain
    B opens a unidirectional channel to pay A 500 DASH on the DASH Blockchain

    Then the following transactions are transmitted within the channels.
    They are NOT Blockchain transactions:

    A sends 0.00003 BCH to B.
    B receives 0.00003 BCH and then sends 0.00005 DASH to A
    A receives 0.00005 DASH and then sends 000003 BCH to B
    B receives 0.00003 BCH and then sends 0.00005 DASH to A
    A receives 0.00005 DASH and then sends 000003 BCH to B

    and so on Until B receives 300 BCH and A receives 500 DASH

    Then Both users publish the transaction of what they received to each blockchain to close each channel.

    For this example of swap, each user sends the other a total of 10,000,000 single "pennies" to the other user. This could be about 5GB of data in each direction.
    For us humans this would be a crazy transaction. But 2 connected wallets could do this in a few minutes. (And in this example its a US$ 150,000 transaction.)

    The risk to user A is to lose .00003 BCH. (1.5 pennies)
    In this particular example user B has no risk.

    Could people use this to steal a few pennies? Yes, but probably not worth the effort.

    Channels need to be funded before transactions start, so it is a very expensive way to earn a few pennies.
    Websites listing this type of transactions could have a rating system. Also they could require both users to send a small amount of money (to the website) to start the transaction, and if one party defaults, they send all the money to the other party. This last point greatly increases the speed of the transaction since users could transfer a bigger quantity at a time.

    This method would work with 1 user trusting and the other not. It would be faster if both trust. Users could have different trust settings (One trusts a penny the other one 10 cents, etc.). The higher the trust the faster the transaction.

    It is my understanding that this can be implemented using existing technology.

    Will something like this work?