Elsevier

Computers & Security

Volume 96, September 2020, 101892
Computers & Security

Randpay: The technology for blockchain micropayments and transactions which require recipient's consent

https://doi.org/10.1016/j.cose.2020.101892Get rights and content

Abstract

Randpay is a technology developed in Emercoin for blockchain micropayments that can be more effective in some scenarios than the Lightning Network, as seen in the paper. The protocol is based on the concept of Ronald L. Rivest published in the paper ‘Electronic Lottery Tickets as Micropayments’ (1997). The “lottery ticket” was designed for centralized systems where a trusted third party is required to provide payments, and in some scenarios, is also a lottery facilitator. The existing blockchain protocol cannot accommodate peer-to-peer “lottery” micropayments at least, without creating payment channels. Therefore, the implementation requires the development of an upgrade to the blockchain core. In the result, RandpayUTXO was introduced – an infinitely spendable zero output that requires the payee's signature to be published in the blockchain. Randpay is considered to be the first blockchain protocol to require the payee to sign the transaction by their private key. This is a significant feature to improve, not only microtransactions but also extend the use of the blockchain for legal deeds that require a payee's consent to be recognized in legal applications. The second important innovation of this research is the implementation of Blum's ‘coin flipping by telephone’ problem to design a ‘lottery ticket’ that does not require any third party to facilitate the lottery. The paper offers an analysis of the mathematical model, and proof of how ‘lottery’ can be beneficial, an API description is also added. There is also an attack analysis and an overview of existing solutions.

Introduction

THE problem of micropayments on the blockchain (Nakamoto, 2008) is that they trigger several issues in the scalability of the system: blockchain bloat, bandwidth, growth of fees, issues of trust, and security.

The Lightning Network (Poon and Dryja, 2016) is a well-known project designed for micropayments. Such projects as SegWit (Understanding 2018) (reduction of included data in the ledger), Ethereum's sharding plan (Sharding 2019) (segmentation of the ledger), and Ardor's two-level (parent-child) blockchains (Ardor 2019) are aimed at addressing some of the scalability aspects. However, they do not address the issue of micropayments and should be considered instead as complementary solutions for micropayments than an alternative.

The problem of system load and ledger bloat due to the high amount of records produced by micropayments is not an exclusive blockchain issue. It also relates to earlier centralized technologies, where the most common approach to address these issues is an aggregation, which is supported by the following conclusions. Payment aggregation replaces many micropayments with a small number of total payments to be recorded in the ledger. With the aggregate, transactional payments (fees) are paid only for such consummated transactions. In other words, aggregation reduces not only the number of entries but also the transactional costs per payment. There two types of aggregation in centralized systems: 1) accurate; for instance, all phone calls are accounted but paid as a lump sum once a month, and 2) probabilistic. One of the most known probabilistic protocol was proposed by Ronald L. Rivest in 1997 when he published his research on ‘Electronic Lottery Tickets as Micropayments’ (Rivest, 1997).

There are no known mass implementations of Rivest's method, probably because in central-server systems, there are other more effective approaches.

The implementation of Rivest's lottery ticket required redesigning the standard blockchain Emercoin protocol, as well as the Rivest's protocol itself, because it was designed for three parties: seller, buyer, and bank (broker).

Emercoin was chosen as a development stand, and it has the following features. Launched in 2014, it is a combination of Bitcoin's PoW and Peercoin's PoS (initially was adopted the original Peercoin PoS, but then, the security was improved) currently running with the approximate ratio 1:6 of blocks created by PoW and PoS respectively; hash rate is approximately ¼ of Bitcoin because of the merged mining protocol that allows nodes simultaneous mining of both Bitcoin and Emercoin. Randpay concept was implemented in the wallet from version 0.7.1 (Emercoin 2017).

The off-chain portion of Randpay was challenged by the requirement to exclude trusted third parties; to provide users to interact with each other peer-to-peer, and at the same time, not to use an existing approach for peer-to-peer protocols that require the creation of so-called “payment channels” because they typically require also performing opening and closing blockchain transactions (but the aim was to reduce them).

The solution was found based on Blum's ‘coin flipping by telephone’ problem. In the findings, the Randpay protocol works off-chain and does not require third parties to facilitate the lottery play-act, and only payable transactions are directed to the blockchain. At the same time, there are no “channels” as found in other protocols. Therefore, anyone can pay to anyone and settle the transaction without opening the channel, maintaining the state of the channel, and closing it to pay or to release the funds back.

The core idea of Rivest's ‘lottery tickets’ is to aggregate microtransactions using a probabilistic method. During the purchase, the parties settle the transaction not with the payment, but with a ‘ticket,’ which is winning for one of two sides: either the buyer or the merchant. The probability on the side of buyers who will not pay if they win this ‘lottery.’ If the merchant wins, the buyer pays, and in this case, only this transaction is recorded to the blockchain ledger.

Presumably, the ‘lottery ticket microtransactions’ are ideal for regular small payments; for example, phone calls with per-second charge. The merchant regulates the price and the probability in a way so to receive payments fewer times but in more considerable amounts.

Buyers with a higher probability do not pay, but when they do pay, the price is “probability times” higher than if it was a regular payment. Nevertheless, they should not feel like they are being mistreated, because they did not pay for services in previous ‘plays’ and with the same probability will not pay in the future. In the long term, paid and unpaid services tend to equate to a fair balance for both sides, which is proven, using probability theory discussed later. Of course, the payment amount in the ticket and the probability all are a matter of bargain; any of the parties are free not to accept an unfavorable deal.

Section snippets

Micropayments retrospective

This section outlines the chronology of academic discussion on micropayments, which takes place over three decades. As it comes from the analysis, most of the protocols are not relevant for comparison with Randpay because they require third parties and are designed for centralized payment systems. As to found protocols for micropayments in cryptocurrency, they either require payment channels or are not flexible in terms of probability variation.

Randpay concept

In this section, it is explained how Randpay protocol was designed. In the first subsection, it is discussed the concept of probabilistic payments. The second subsection explains the probabilistic nature of profits in lottery ticket payments in comparison to classical payments. The next subsection shows how the off-chain part of the protocol provides for peer-to-peer interaction of parties, where they play the lottery. In the beginning, it is explained what objectives were defined, and which

Attack analysis

Randpay is a peer-to-peer protocol that is designed to prevent malicious behavior and does not require any third party for settlement.

As a result of a lottery, the client Alice can lose and therefore pay a lump sum, which is larger “probability” times than if it was a classical purchase.

Bob's safe strategy is to supply the product not before but after the ‘lottery’ action. Therefore, in the worst scenario, Alice does not pay the lump sum but does not get the product – nobody loses.

There is, of

Economic analysis and mathematical model

The economic model of Randpay as any other protocol for probabilistic payments is different from the traditional one. It works better for products of a small value which are supplied in a large amount that can be paid by micropayments.

A tariff for phone calls per second is a relevant example here. When each phone call ends with a settlement, it is easy to calculate that with a transaction size of 200 bytes (usually more), 2 trillion world telecom calls per year (Wansink, 2018) will require an

The Lightning Network comparison

There is no obvious answer as to which micropayments are better. Randpay and the Lightning Network (Lightning Network 2017) have conceptually different approaches with pros and cons.

In the Lightning Network (LN), the payment aggregation system is a separate network of agents connected by payment off-chain channels. In the LN “channel,” Alice or Bob, or both if they have mutual payments, can make an initial blockchain transaction to lock some cryptocurrency as a deposit for their further

Conclusions

The research and tests show that Randpay is a sustainable technology for micropayments.

The model is based on the buyer's desire to gain the product for free and acceptance of the possibility of having to pay a higher price from time to time, but which tends to become a fair price during regular use for both parties.

The seller is a supplier of low-priced products. In traditional business, it typically leads to high transactional costs, either in cash payments or cryptocurrency. The model offers

Author contributions

Oleg Khovayko is an author and developer of the Randpay protocol. Oleksii Konashevych is a researcher who provided the analysis of the protocol and outlined the results in the paper. Co-authors contributed equally to writing this paper.

CRediT authorship contribution statement

Oleksii Konashevych: Writing - original draft, Methodology, Formal analysis, Visualization. Oleg Khovayko: Conceptualization, Software, Methodology, Validation, Supervision.

Declaration of Competing Interest

None.

Oleksii Konashevych Erasmus Mundus Joint International Doctoral Fellow in Law, Science and Technology (European Union). Degrees in Laws (2005) and Economics (2010). Reserach in blockchain, e-governance, e-democracy and real estate, http://oleksii.konashevych.com.

References (36)

  • L. Zhong et al.

    A secure large-scale instant payment system based on blockchain

    Comput. Secur.

    (2019)
  • Ali, S.T., Clarke, D., McCorry, P., 2017. “The Nuts and Bolts of Micropayments: A Survey.” ArXiv,...
  • “Ardor.” [Online]. Available: https://ardordocs.jelurida.com/Getting_started. [Accessed: 07-Feb-...
  • “Bitcoin address • Programming The Blockchain in...
  • “Bitcoin URIs | Bitcore.” [Online]. Available: https://bitcore.io/api/lib/uri. [Accessed: 15-Jan-2019]...
  • M. Blum

    Coin flipping by telephone a protocol for solving impossible problems

    ACM SIGACT News

    (1983)
  • G. Casella et al.

    Statistical Inference

    Popul. Trends

    (2001)
  • A. Chiesa et al.

    Decentralized anonymous micropayments

  • X. Dai et al.

    Comparing and Contrasting Micro-payment Models for Content Sharing in P2P Networks

  • J.R. Douceur

    The Sybil attack

  • M. Elsheikh et al.

    Deploying PayWord on Ethereum

  • “Emercoin.” [Online]. Available: https://emercoin.com/. [Accessed: 10-Nov-...
  • “Emercoin Blockchain.” [Online]. Available:...
  • “Emercoin Github.” [Online]. Available: https://github.com/emercoin. [Accessed: 05-Sep-2018]...
  • K. Hu et al.

    Fast lottery-based micropayments for decentralized currencies

  • R. Kaas et al.

    Mean, median and mode in binomial distributions

    Stat. Neerl.

    (1980)
  • Kelso, E., “Lightning Network Warning: Please Don't Lose Money, Learn from My Recklessness - CoinSpice.” [Online]....
  • King, S., Nadal, S., 2012. “PPCoin: Peer-to-Peer Crypto-Currency with...
  • Cited by (5)

    • Blockchain technology for enterprise credit information sharing in supply chain finance

      2022, Journal of Innovation and Knowledge
      Citation Excerpt :

      To improve the performance, a consistency algorithm is attractive to blockchain systems, which is to reach a consensus through voting to ensure the efficiency and safety of the consensus process in systems with less common nodes, even the Byzantine error nodes. The core of SCF is to help enterprises integrate their assets, reduce financing costs, and mitigate the risks from financing enterprises in the supply chain (Konashevych & Khovayko, 2020; Kumar et al., 2021). Before blockchain technology was formally introduced into the SCF industry, some scholars had already proposed that blockchain could promote the development of the capital market.

    • A Robust and Efficient Micropayment Infrastructure Using Blockchain for e-Commerce

      2021, Intelligent Computing - Proceedings of the 2021 Computing Conference
    • Cross-blockchain protocol for public registries

      2020, International Journal of Web Information Systems

    Oleksii Konashevych Erasmus Mundus Joint International Doctoral Fellow in Law, Science and Technology (European Union). Degrees in Laws (2005) and Economics (2010). Reserach in blockchain, e-governance, e-democracy and real estate, http://oleksii.konashevych.com.

    Oleg Khovayko MS in CS, National Research Nuclear University MEPhI (1994), has a background in the realm of IT, biotech, finance and specializes in the technical aspects of blockchains and cryptography, Tower Architect of Emercoin, https://emercoin.com.

    View full text