Written by KomoDeFi Editorial Team on February 19, 2020

P2P Micropayment Channels - Private & Direct

Sub-atomic swaps using direct P2P micropayment channels dates back to 2014 in the Komodo timeline when SuperNET and the early Komodo sub-projects were part of the NXT Asset Exchange. With the DEXP2P technology recently developed & tested, more use cases have been requested. Further development continues and pay-per-slice file sharing is on the horizon. Similar streaming money technology from other projects can be found with the COIL project and the InterLedger Protocol v4.

Sub-atomic Swap Features

sub-atomic micropayment swap dev gui
sub-atomic dev GUI

Quick Note Comparison To Lightning Network

Discord user Arno asked "What would be the difference in comparison to Lightning and its channels?" & the response was: here the channels are point to point, so we avoid all the routing issues it works with normal CLTV channels. Here is a link to malleability in micropayment channels from a stack exchange question. Orderbook, ordermatching and the swap negotiation is done via the dexp2p network, that is something LN doesnt have. (Link to discord chat)

Micropayment Channel Technology Description

Source of this description. Are you familiar with OTC swap? This is where you want to swap with someone directly, over the counter style.

lets say you sort of trust him, but not so much
you have a price
you agree to amount, but it is so small that worst case it wont bother you and you assume the other party wont put his reputation at risk over it
maybe $1so you send $1 worth of PIRATE
and he sends $1 worth of KMD
notice you trusted him with $1, so it isnt fully trustless
now lets do a trade for $100 worth
but now you hesitate as maybe for $100 this guy would just take the money and not send it back
today, you would need to do 100 separate trades for $1 each and make sure each one is complete to do $100 worth. quite a hassle, but maybe it can be automated so not so bad, but the OTC method has much to be desired as each $1 swap is 2 transactions onchain, with the txfees and blockchain space
so, now that the OTC mode is working, the next step is to make channels. what that does is create a way to do N microtransactions with only 4 blockchain transactions. you can do 100 or 1000 or even more microtransactions between each other
so now, it definitely needs to be automated, but i send 1% in an offchain transaction
you send me 1%we repeat until one side stops or we reach 100% swapped
the channels are closed and it becomes confirmedthis is a direct p2p channel between the two parties, so you need to make a special deposit tx and have it confirm firm, maybe even wait for it to notarize if it is for a lot of money
once it is notarized, it can be done for larger amounts
so the people running the bob nodes, they could decide to support many different coins. in this case alice can open a channel with X amount of funds. then she only has to wait for that to confirm (notarize) and then can do many different subatomic swaps (at speed) for all the different coins the bob has
additionally, all the bobs could open channels between themselves to help them replenish inventory as the alice is buying up all of one coin.by having a network of bobs that are interconnected to each other, each bob would be able to rapidly replenish any coin that is low in inventory and all the alices that are connected to any bob would be able to do the shopping spree i explain above
for smaller amounts, the subatomic swap is probably a lot faster than atomic swaps, and subatomics is not really for mobile, need to have full nodes. theoretically its possible but the bandwidth needed to do all the hundreds or thousands of swaps, it just isnt something i would want on a phone
so for desktop users that want speed and can run full nodes, that is the usecase for subatomic swaps
maybe in time it can be ported to mobile, but that wont be me, so maybe it will take a year or more to get that working
i can get it to work with fullnodes, i think relatively quickly
of course, there is no gui... so maybe its like it doesnt exist

Other Links Developer Activity

Back to Top
Experience Web3
© 2024 komodefi.com