Cryptocurrency exchange

A coin selection strategy based on the greedy and genetic algorithm Complex & Intelligent Systems

A study co-authored by Dr Andrei Kirilenko of Cambridge Judge Business School, presented at a recent CERF in the City event, develops an app-based recommendation framework for investor adoption of crypto assets. Study co-authored by Dr Andrei Kirilenko of Cambridge Judge Business School, presented at CERF in the City event, develops app-based recommendation framework for investor adoption of crypto assets. Every Bitcoin transaction has a transaction hash which is calculated for the entire transaction content by Secure Hash Algorithm-256 (SHA-256). Transaction hash is also called transaction ID, and the size of the hash is 32 bytes. The UTXO as transaction input is indicated by the hash value of the referenced transaction and the index, which occupies 4 bytes of the UTXO in the transaction output. The sequence field is used to indicate the relative lock-time for this input, and it occupies 4 bytes.

Study investigates crypto selection

Transaction output has a value field, which indicates the value contained in the transaction output and occupies 8 bytes. The unlocking and locking scripts are used respectively to prove that the input UTXOs are owned by the payer and that the output UTXOs are locked to the beneficiary. The study is designed to provide a guide to which crypto assets may become more widespread over time. Based on these modeling scenarios, “we are able to predict the subset of the most widely adopted crypto assets and their features,” the study says. The Bitcoin UTXO selection method makes up to 2000 attempts(each attempt is called a ’round’) to find a near optimal combination of input UTXOs.

A coin selection strategy based on the greedy and genetic algorithm

Also, take notice that when large coins are spent rapidly there will be an accumulation of low value coins left that may become impossible to transact due to being lower than the required transaction fee. The integration of the greedy algorithm and genetic algorithm can formulate a solution that efficiently selects coins based on their individual values in a way to get as close as possible to the target with the least number of coins. Under this premise, the method also prevents the production of dust as it prioritizes using a combination of coins that comes to the specific target amount, therefore, eliminating excessive “change”. Miners first pack the transactions with high priority into blocks, followed by those with high transaction fees. The transactions without fees and low priority are likely to wait a long time for confirmation 14. Since Bitcoin’s mining reward is halved every four years, transaction fees will become the primary means of income for miners in the future.

The Multicriteria Model

A well-designed coin selection algorithm can accomplish multiple optimization objectives while reducing the administrative cost of the system. Hence, we consider the coin selection problem as a multi-objective optimization problem. Amidst the abundance of research on cryptocurrencies, there are few papers on coin selection methods specifically. Thus, our review of related work looks at selection strategies that prioritize target value accuracy 17, 18, enhance the knapsack algorithm 19, and protect user privacy 20. Our work proposes a coin selection method that aims to meet the exact target requirement whilst maintaining a small and stable number of UTXO inputs, and avoiding the production of dust. This paper interprets the method through an explanation of the algorithms concerned and illustrates the effectiveness through visualized data sets from simulations.

1. Key Findings

  • Moreover, the algorithm used does not take into consideration change output of the transaction and therefore overlooks dust production.
  • Although, transactions generated using this method cannot guarantee the lowest possible transaction fees, it does not produce excessively high transaction fees.
  • Figure 12 visualizes the dust quantity fluctuations in each wallet over 300 rounds.
  • Figures 10 and 11 show the comparison of the results obtained by the real account 1 and real account 3.
  • For example, Bitcoin requires that the size of a block be less than or equal to 1 MB, and the block header occupies 80 bytes.

Table 3 shows the minimum, maximum, and average of dust quantity in the three wallets in each 100 rounds. Figure 12 visualizes the dust quantity fluctuations in each wallet over 300 rounds. Overall, the selection method employed by Bitcoin prioritizes selecting UTXOs whose sum of the amount is closest to the target on study investigates crypto selection a random selection recursion.

study investigates crypto selection

Coin selection method refers to the process undergone when selecting a set of unspent transaction outputs (UTXOs) from a cryptocurrency wallet or account to use as inputs in each transaction. The most applied coin selection method that UTXO-based cryptocurrencies currently employ is an algorithm that decides on a certain set of UTXOs that matches the target amount and limits the transaction fee. However this approach trades off favourable maintenance overhead of the entire network for low transaction fees, as many low-value UTXOs known as “dust” is produced. Over time, this will impact the scalability and management of the cryptocurrency network as the global set of UTXOs become larger.

study investigates crypto selection

5. Snapshot of the Methodology

In this selection process, the basic task is to reach the amount required for this transaction. Therefore, the coin selection problem is usually interpreted as a subset-sum problem. In practice, the wallet will design its own coin selection method and the transaction fee is the main consideration when designing the coin selection algorithm. But the amount requirement and transaction fee are not the sole factors contributing to the coin selection problem. Designing an appropriate coin selection algorithm should consider utilizing dust, ensuring user privacy, accounting for specific user requirements as well as the transaction fee.

  • We created three identical wallets, with 2000 UTXOs and 10% of dust where the fee-per-byte rate is 22.
  • In almost every simulation, the distance to the target of UTXOs chosen by our method is significantly closer than of the other methods whilst maintaining a similar mean number of UTXOs selected.
  • When a user needs to generate a transaction, the Bitcoin core will use its own strategy to select the set of UTXOs in the user’s account 4.
  • There is no relationship between the account and password in the traditional financial system, therefore the account and password are stored in the back-end database.

Article Metrics

Increasing transaction fees to attract the attention of miners is not a sustainable solution with possible future consequences such as overly high fees that render more transactions economically meaningless. The method proposed in this article takes the approach of increasing the number of transactions that a block can accommodate by reducing the transaction size. In turn, the transaction fee will also be lower than before with the size reduction of the transaction. Since one user can have more than one wallet, the number of active users cannot be observed, it is also a rapidly growing number as more people become new users of Bitcoin.

Detecting Potential Investors in Crypto Assets: Insights from Machine Learning Models and Explainable AI

This strategy cannot ensure accuracy of target value matching and lack effectiveness in minimizing transaction fee. Moreover, the algorithm used does not take into consideration change output of the transaction and therefore overlooks dust production. In 4, they quantitatively examine Bitcoin’s coin selection method in regards to dust production and observed a trend of increasing number of unprofitable UTXOs.

Back to list