Increase of Long-Term Success Ratio Using Novel Splitting Methods in Interdimensional Speedymurmurs
Total Page:16
File Type:pdf, Size:1020Kb
Increase of long-term success ratio using novel splitting methods in Interdimensional SpeedyMurmurs 1 1 1 Han Heijmans , Stefanie Roos , Oguzhan˘ Ersoy 1 TU Delft Abstract tial sending party, or source of the transaction, which has no knowledge of the channel balances of the intermediaries. Popular cryptocurrencies lack scalability. Payment A protocol called Interdimensional SpeedyMurmurs Channel Networks (PCN’s) allow a large increase (INTSM) increased the success ratio significantly. It does so in transaction throughput. However, transaction by having each intermediary on the path decide what the next failures are frequent when transactions are routed step will be and by using a improved routing algorithm, based through multiple intermediaries. A previously in- on SpeedyMurmurs [8], which is more flexible allowing for troduced protocol, Interdimensional SpeedyMur- more possible paths to be taken [2]. To increase the success murs, increased the success ratio of transactions ratio even further the transaction can be split over multiple in PCN’s by allowing routing to be more flexible paths using several splitting methods that were introduced and transactions to be split into multiple smaller with the protocol. transactions. This protocol also introduced several Other protocols exist that allow for multi-pathrouting [6; methods of splitting transactions that increased the 9; 1]. They all have a different approach. One removes the success ratio even further in the short term. The requirement of atomicity, meaning that transactions still suc- splitting methods were not good for the short term ceed if not all of the transaction value is received. And in a as they often depleted channels completely. This lot of protocols the path is fully decided by the source. paper aims to introduce novel methods of splitting INTSM achieved a high success ratio in the short term. transactions that easily integrate into Interdimen- What we mean with short term is that after initializing the sional SpeedyMurmurs in order to increase the suc- PCN in the simulator and performing a payment on this PCN, cess ratio in the long term. A thorough evaluation the PCN is reset before another payment is performed. of the novel splitting methods was conducted us- In this research we aim to introduce and evaluate novel ing simulations on a snapshot of a real world used splitting methods to increase the long term success ratio of PCN. In one scenario an increase of 2.4% over pre- transactions in payment channel networks, meaning after a vious methods was achieved. payment is performed the effects of the payment remain on the PCN when performing every subsequent transaction. 1 Introduction The current splitting methods which were introduced with The most popular blockchains, like Bitcoin [5] and Ethereum the INTSM protocol split ties, which occur frequently, ran- [13], are limited in their scalability [12]. Even now, when domly. Also they deplete a lot of channels and make them [ cryptocurrency are not massively adopted, this limited trans- imbalanced which negatively affects the success ratio 2; 9; ] action throughput results in high fees and long transaction 11; 4 . The splitting methods in this paper improve upon times. Certain layer-two protocols, like Lightning [7] for Bit- these methods by splitting these ties more strategically. They coin, try to mitigate this problem by use of payment channel showed an increase between 0.8% and 2.4% with respect to networks. Using such a payment channel network, users can the already existing splitting methods in INTSM. exchange funds off-chain only using the blockchain for in- We will start with explaining how payment channel net- stantiating a payment channel, resolving disputes and closing works work and how the current protocol works on which a payment channel. This has the potential to drastically re- we intent to build. Then we shall continue by going over duce the load on the blockchain. some splitting methods that already exist and why the might Parties often do not want to instantiate too many payment or might not be beneficial for specifically increasing the long- channels due to the fact that it locks a certain amount of cur- term success ratio of transactions. After going over the ex- rency. In case two parties want to exchange funds whilst isting splitting methods we shall go over the novel splitting not having a direct payment channel between them, they can methods. We will then evaluate these splitting methods to route the transaction through multiple intermediaries. These determine by how much the splitting methods increase the transactions fail frequently however, due to insufficient chan- success ratio. nel capacities and the routing being done entirely at the ini- 2 Background termining the next step compared to shortest path routing. It also allows for transactions to split while maintaining atom- 2.1 Payment Channel Networks icity, meaning if one partial payment fails the entire payment Payment channel networks (PCN’s ), like Lightning [7], are will fail. Routing a transaction in this protocol happens in two protocols that mostly run off-chain while maintaining the steps: generating a set of candidate PC’s and then allocating guaranties that the underlying blockchain provides. A PCN the transaction value over these candidates (splitting). is essentially a network of payment channels (PC’s). On a When generating a set of candidate channels, some mea- PC parties could perform many transactions without broad- sure of closeness is needed so that the transaction moves to- casting any of them to the blockchain. When two parties are wards the receiver. Also loops have to be prevented for obvi- looking to exchange funds without having a direct PC be- ous reasons. Due to these facts, when considering a channel tween them, they can route this payment through multiple in- to be placed in the candidate set, the node at the other side of termediaries. the PC needs to be closer to the destination than the current To create a PC between parties an initial transaction is re- node and must not have been visited before. INTSM’s dis- quired on the blockchain locking in a certain amount of cryp- tance measure generates several spanning trees from the PCN, tocurrency. The amount every party chooses to lock in con- the amount of which is called the dimensionality of INTSM. stitutes the initial balances on the PC. Payments made on If the node connected on the other side of the PC is closer in the PC can not exceed the balance of the sending party and at least one of these spanning trees, the PC is added to the changes the channel balance with a value equal to the trans- set of candidate channels. Another distance measure (which action value. So if A sends v coins to B, B’s balance will is also used in Lightning [7]) that was evaluated was the hop now be v higher and A’s v lower. The capacity of a PC is distance which indicates the least amount of hops towards the all the balances of the parties added up. To change the bal- destination. ances all participating parties have to unanimously agree on After a set of candidate channels is created, the protocol the updated balances. Upon termination of a PC a transaction can choose how to allocate the transaction value over these is broadcast to the blockchain containing the final balances. channels. In order to do so several methods of splitting the In case of the Lightning network [7], when a payer and transaction were also introduced and evaluated in INTSM. payee want to perform a transaction the payee, or receiver of the transaction, sends a hash of a randomly generated value • No Split: As the name suggests, it does not split the to the sender. Upon receiving this hash the sender creates a transactions. It considers the candidate channels in in- Hash Time Locked Contract or HTCL to the next intermedi- creasing order of closeness, splitting ties randomly, and ary on the path. A HTCL is a conditional payment that gets selects the first channel with enough balance. If no such performed upon showing the preimage of the hash. To cre- channel exists the transaction fails. ate a HTCL the creator locks in the value of the payment and can therefore not use this for any other payments. When a fi- • Split By Distance (Dist): Like No Split it considers the nal HTCL reaches the receiver, the receiver shows the preim- channels in increasing order of closeness. This method age of the hash to redeem the funds from this HTCL and this however, allocates a part of the transaction value to the preimage is now known to the creator of this HTCL. All in- channel even when the balance is not high enough to ac- termediaries will do so likewise, using the preimage, until the commodate the total transaction value. It continues to final HTCL, from the original sender of the payment, is re- do so until either no candidate channels are left, which deemed. means there is not enough balance to forward the pay- There are many PCN’s that all work in a different way with ment and the transaction fails, or until all the transaction regard to routing or how balances are updated on the channels value has been allocated. [3]. When looking at routing, one usually distinguishes be- tween two types of routing: global routing and local routing. • Split If Necessary (IfN): In case there exists a channel With global routing the party sending funds decides the path that has enough balance this method corresponds to No the transaction will take through the PCN entirely. This party Split. When no such channel exists however, candidate will therefore need to know the topology of the entire PCN.