What is an Algorithm?
What is the definition of an algorithm?
An algorithm is a sequence of instructions or steps that can help ensure that a specific task or computation is completed. Additionally, algorithms also can deterministically achieve predictable results given the same inputs and/or conditions at the start of the sequence. Algorithms don’t need to be digital or computerized algorithms. For example, some or all of a math proof on a blackboard can be an algorithm. But, when an algorithm is represented as programmed computer code, the computer or systems that execute that code can scale the application of that algorithm to complete the task at speeds and volumes that are not achievable by humans.
What are examples of algorithms in everyday life?
In modern life, most humans are engaged with algorithms — often subconsciously — every day. Whereas some algorithms are more computational, others embody business logic and help to automate business processes and decisions. Never mind the algorithms that are running in our smartphones, smartwatches, and other smart devices (or in the platforms they rely on) that do everything from reminding us to buy groceries to filtering spam, most of today’s simple consumer electronics are often built with specialized computer chips into which device-specific algorithms have been permanently programmed. Yes, your coffee machine probably has some algorithms in it!
Most people who trade stocks and bonds have probably heard about algorithmic trading; the business process by which many trades are triggered by computerized algorithms that keep close watch on specific market conditions. Split-second timing in market trades can make the difference between profiting millions of dollars or gaining nothing. Therefore, many retail and institutional investors have entrusted their trades to computerized algorithms not just because of their speed of execution, but also because they can respond to shifting market conditions involving a multitude of variables in a nanosecond, something a human trader could never do. Like algorithmic trading, almost any business process that’s automated through the application of an algorithm is considered to be “algorithmic.”
The application of algorithms has evolved significantly over time. In the early days of computerized systems and devices, most algorithms were relatively simple and helpful in the areas of task acceleration and accuracy. Over the decades, however, algorithms have become more sophisticated as they tackle significantly more complex areas of computer science such as machine learning and artificial intelligence.
What is the relevance of algorithms to Distributed Ledger Technology?
Algorithms play a big role in Distributed Ledger Technology (DLT) and the blockchain industry. Perhaps the most talked about (and debated) algorithm in the crypto space is a business process known as the consensus algorithm. In the blockchain world, the word “consensus” describes the point at which all the nodes of a distributed ledger are in agreement about the content and order of the transactions that have been recorded to it. Before distributed ledgers existed, centralized ledgers and even paper ledgers formed the basis of this agreement on transaction content and order between multiple parties such as a bank customer and a bank. If the customer and the bank agree on the balance of funds in the customer’s bank account at the end of the month, then it is implied that that bank’s ledger (representing the customer’s transactions and their order) matches the customer’s ledger. In other words, a consensus regarding the customer’s transactions exists between the customer and the bank.
If the bank and the customer disagree over the closing balance at the end of the month, one or both parties must go through a reconciliation process to discover why their two ledgers lack consensus over the content and order of the customer’s transactions. If the lack of consensus can be traced to a business logic problem in the bank’s computer systems, then the algorithm for recording the content and order of the customer’s transactions may be problematic. On the other hand, maybe the customer’s system for recording the content and order of her transactions is the issue. Either way, the discrepancy has to be resolved so a consensus can be achieved.
With public DLT, there is no bank or central institution that maintains a centralized ledger for achieving consensus with its customers. In fact, in the same way there are no customers of the internet (there are just users), there are no customers of a digital ledger — just users of an internationally distributed ledger that lives on the internet. But in order for a decentralized system (again, there’s no central entity like a bank that runs a public distributed ledger) to essentially take the place of a bank, that same consensus that exists between banks and their customers must still exist across all of the distributed computers that together, in peer-to-peer fashion, are responsible for the ledger’s function and availability to its users. To achieve this consensus, those computers rely on a special algorithm known as the distributed ledger’s consensus algorithm.
A distributed ledger’s consensus algorithm is one of its most distinguishing features. Therefore, for enterprises that are choosing one or more distributed ledgers for an upcoming blockchain project, it is imperative to understand the differences in consensus algorithms from one digital ledger to the next. There are major and minor differences (some very nuanced) between consensus algorithms that may, or may not, matter to certain enterprise use cases.
How can blockchain technology algorithmically support the automated business processes of an enterprise?
While the various competing distributed ledger consensus algorithms are the subject of many conversations and debates, there are many other algorithms at work across the blockchain industry. For example, algorithms play a key role in the smart contracts that are responsible for the human-unattended operation of many decentralized finance (DeFi) projects such as decentralized exchanges. Likewise, algorithms are important in the automatic liquidation of a crypto borrower’s collateral should the value of their collateral as a percentage of the loan drop below a certain threshold.
Whereas some so-called “stablecoins” (tokens whose value is stabilized by pegging them to the value of another asset such as the US dollar) are referred to as asset-backed stablecoins, other more controversial stablecoins—algorithmic stabelcoins—are algorithmic in nature.
As more businesses and enterprises discover the ability of smart contract-enabled public ledgers to host and execute their business algorithms, it is expected that those organizations will increasingly turn to DLT for business process management, workflow automation, and decision support when it comes to the specific use cases to which DLT and blockchain are inherently suited.
Enumerating all the use cases for algorithms across the blockchain industry is beyond the scope of this glossary definition. The important thing to know is that there are many more algorithms at work across the blockchain industry than just the one that’s the subject of so much conversation and debate (the consensus algorithm).