Autor Cointelegraph By Murtuza Merchant

What is an Ethereum Virtual Machine (EVM) and how does it work?

Ether (ETH), which is the second largest cryptocurrency in terms of market capitalization, is popular among cryptocurrency investors because of its native ETH token. However, its native Solidity programming language and Ethereum Virtual Machine (EVM) are instrumental in the adulation it receives from the developer community. In fact, the Ethereum blockchain continues to attract decentralized application (DApp) developers due to its flexibility, the vast range of developer tools available and the platform’s large user base.Forming the core of the blockchain’s architecture, the EVM is the program that executes its application code or smart contracts, as they are called, providing a run-time environment for them that runs on top of the Ethereum network. What’s more, the EVM is Turing-complete and can thus run any program coded in any programming language, thereby allowing developers to easily create custom smart contracts and DApps for the burgeoning Web3 space. In addition to these important functionalities, EVM has access to all nodes in the network, handles smart contracts execution and effectively handles all transactions on the Ethereum blockchain, making it one of the most powerful virtual machines in existence today.What is Ethereum Virtual Machine (EVM) and how does it work?Conceptualized in 2013 by programmer Vitalik Buterin, the Ethereum network owes its phenomenal success as the preferred blockchain for DApp developers to the Ethereum Virtual Machine (EVM) that was designed by Gavin Wood during his tenure at Ethereum. Written in C++ and using the LLVM Project compiler, EVM is a special state machine that operates continuously and whose immutable operations determine the state of each block in the Ethereum blockchain. The EVM not only governs what nodes can or cannot do to the distributed ledger maintained by the Ethereum blockchain but also defines the specific rules of changing state from block to block. The latter functionality is what enables the smart contract functionality that Ethereum has come to be known for.To understand what an Ethereum Virtual Machine does, one needs to look at each of the different functions it serves in ensuring the smooth operation of the Ethereum network. For every input that it receives, the EVM produces an output that is deterministic in nature and follows a mathematical function in the simplest sense. Operating like a stack machine that pushes transient values to and from a pushdown stack, the EVM has a depth of 1024 items, with each of them being a 256-bit word. It also maintains a temporary memory in the form of a byte array, which changes between two transactions on the Ethereum blockchain. Smart contract codes that have been compiled are executed by the EVM in the form of a collection of 140 standard opcodes, while other blockchain-specific stack operations are also implemented by it.Thus, the EVM has a machine state that is volatile by nature during the processing of any transaction and a global or world state that contains information regarding the different accounts maintained on the Ethereum blockchain. All actions are governed by the EVM code, which in itself has gone through several iterations since the launch of the Ethereum network in 2015, leading to the existence of different implementations of the EVM currently in use.In fact, the EVM is responsible for maintaining a level of abstraction between thousands of Ethereum nodes and the executing code, acting as a function that delivers consistent results without divulging many details to clients or nodes.What is the purpose of the Ethereum Virtual Machine (EVM)?The EVM has been reliably powering all applications running on the Ethereum network without any major downtime reported. For developers, the EVM acts as the overarching program that runs smaller executable programs which are known as smart contracts in Ethereum, while providing them the freedom to write these smart contracts in a variety of programming languages including Solidity, Vyper, Python and Yul, among others.Due to this flexibility offered by the EVM, the Ethereum blockchain has spawned thousands of DApps in the decentralized finance (DeFi) and nonfungible token (NFT) space. Each of these DApps and the smart contracts that they are made of are converted into bytecode that is fed into the EVM and distributed among all nodes in the Ethereum network. When a smart contract is deployed, the EVM is responsible for communicating with all nodes and effecting state changes when a consensus has been arrived at.It can be said that the EVM is inserted inside every Ethereum node to execute smart contracts using bytecode instead of the base programming language, thus isolating the physical host computer from the machine code on which Ethereum runs.Benefits of Ethereum Virtual Machine (EVM)On account of the way in which the EVM operates, developers can execute code without worrying about its impact on the rest of the network or the possibility of it playing truant with data or personal files hosted on any of the node computers. Additionally, they can run complex smart contracts on different computing environments with distributed consensus. This ensures that the failure of a single node does not have any negative impact on the running of the DApp or smart contract, since the EVM code remains the same across all nodes. Moreover, since account data is maintained at a global level in the EVM, developers find it perfect for writing custom smart contract code and creating distinct DApps that can access this global data set and produce reliable outputs. The sanctity of the outcome is what makes the EVM, in particular, and the Ethereum blockchain in general well-suited to the sustainable expansion of the DApps and smart contract Ethereum ecosystem. Add to this the library of standard codes available for developers to choose from, an increasing number of EVM-compatible layer-2 blockchains and a large number of potential EVM use cases possible, and it is easy to see why the EVM is the preferred platform for Web3 development.Drawbacks of Ethereum Virtual Machine (EVM)Despite the many advantages offered by the EVM, there are certain downsides that need to be considered by developers and entrepreneurs building on Ethereum. The most important of these is the high transaction fees or gas costs associated with running a smart contract on the Ethereum network. Paid in ETH, these fees vary depending on the complexity of the contract and the network congestion at the time of execution, making it imperative for developers and entrepreneurs to price their services accordingly. Additionally, since Solidity is the most preferred language for coding on the EVM, it does imply that developers need to have adequate experience with it and possess a modicum of technical expertise to create efficient smart contracts by using it. The latter is important since any additional computation requirement will lead to higher gas costs and ultimately prove detrimental to the project’s success. If developers choose to code using other languages, they need to be careful in resolving any inherent repetitions in the code since the EVM will proceed to compile them anyway. While upgrading smart contracts is possible at a later stage, it comes with security risks associated with creating an intermediary smart contract that references the address of the original smart contract.The future of EVMsNotwithstanding the revolutionary changes brought about by the EVM to the blockchain ecosystem, this technology for reading and executing code is being improved upon by a number of blockchain projects. With cross-chain interoperability being the most important aspect for developers, many EVM-compatible blockchains have propped up, with most offering lower gas and faster transaction speeds than the Ethereum protocol. As a result, these blockchains are now able to interact with Ethereum users seamlessly and are facilitating fund transfers to their own networks using blockchain bridges.However, with the Ethereum protocol successfully completing the Merge in September 2022, the next target is to shift from EVM to Ethereum WebAssembly (eWASM). Designed to be highly modular and platform-independent, eWASM is being touted as the next game-changer for the Ethereum protocol and could motivate other blockchains to employ this run-time environment for smart contracts as well. However, whether eWASMs will replace the EVM as the most trusted mechanism for smart contracts is a question that only time will answer.

Čítaj viac

What is a 51% attack and how to detect it?

Despite being underpinned by blockchain technology that promises security, immutability, and complete transparency, many cryptocurrencies like Bitcoin SV (BSV), Litecoin (LTC) and Ethereum Classic (ETC) have been subject to 51% attacks several times in the past. While there are many mechanisms by which malicious entities can and have exploited blockchains, a 51% attack, or a majority attack as it is also called, occurs when a group of miners or an entity controls more than 50% of the blockchain’s hashing power and then assumes control over it. Arguably the most expensive and tedious method to compromise a blockchain, 51% of attacks have been largely successful with smaller networks that require lower hashing power to overcome the majority of nodes.Understanding a 51% attack Before delving into the technique involved in a 51% attack, it is important to understand how blockchains record transactions, validate them and the different controls embedded in their architecture to prevent any alteration. Employing cryptographic techniques to connect subsequent blocks, which themselves are records of transactions that have taken place on the network, a blockchain adopts one of two types of consensus mechanisms to validate every transaction through its network of nodes and record them permanently.While nodes in a proof-of-work (PoW) blockchain need to solve complex mathematical puzzles in order to verify transactions and add them to the blockchain, a proof-of-stake (PoS) blockchain requires nodes to stake a certain amount of the native token to earn validator status. Either way, a 51% attack can be orchestrated by controlling the network’s mining hash rate or by commanding more than 50% of the staked tokens in the blockchain.To understand how a 51% attack works, imagine if more than 50% of all the nodes that perform these validating functions conspire together to introduce a different version of the blockchain or execute a denial-of-service (DOS) attack. The latter is a type of 51% attack in which the remaining nodes are prevented from performing their functions while the attacking nodes go about adding new transactions to the blockchain or erasing old ones. In either case, the attackers could potentially reverse transactions and even double-spend the native crypto token, which is akin to creating counterfeit currency.Needless to say, such a 51% attack can compromise the entire network and indirectly cause great losses for investors who hold the native token. Even though creating an altered version of the original blockchain requires a phenomenally large amount of computing power or staked cryptocurrency in the case of large blockchains like Bitcoin or Ethereum, it isn’t as far-fetched for smaller blockchains. Even a DOS attack is capable of paralyzing the blockchain’s functioning and can negatively impact the underlying cryptocurrency’s price. However, it is improbable that older transactions beyond a certain cut-off can be reversed and thus puts only the most recent or future transactions made on the network at risk.Is a 51% attack on Bitcoin possible?For a PoW blockchain, the probability of a 51% attack decreases as the hashing power or the computational power utilized per second for mining increases. In the case of the Bitcoin (BTC) network, perpetrators would need to control more than half of the Bitcoin hash rate that currently stands at ~290 exahashes/s hashing power, requiring them to gain access to at least a 1.3 million of the most powerful application-specific integrated circuit (ASIC) miners like Bitmain’s Antminer S19 Pro that retails for around $3,700 each. This would entail that attackers need to purchase mining equipment totaling around $10 billion just to stand a chance to execute a 51% attack on the Bitcoin network. Then there are other aspects like electricity costs and the fact that they would not be entitled to any of the mining rewards applicable for honest nodes. However, for smaller blockchains like Bitcoin SV, the scenario is quite different, as the network’s hash rate stands at around 590PH/s, making the Bitcoin network almost 500 times more powerful than Bitcoin SV. In the case of a PoS blockchain like Ethereum, though, malicious entities would need to have more than half of the total Ether (ETH) tokens that are locked up in staking contracts on the network. This would require billions of dollars only in terms of purchasing the requisite computing power to even have some semblance of launching a successful 51% attack. Moreover, in the scenario that the attack fails, all of the staked tokens could be confiscated or locked, dealing a hefty financial blow to the entities involved in the purported attack.How to detect and prevent a 51% attack on a blockchain?The first check for any blockchain would be to ensure that no single entity, group of miners or even a mining pool controls more than 50% of the network’s mining hashrate or the total number of staked tokens. This requires blockchains to keep a constant check on the entities involved in the mining or staking process and take remedial action in case of a breach. Unfortunately, the Bitcoin Gold (BTG) blockchain couldn’t anticipate or prevent this from happening in May 2018, with a similar attack repeating in January 2020 that lead to nearly $70,000 worth of BTG being double-spent by an unknown actor. In all these instances, the 51% attack was made possible by a single network attacker gaining control over more than 50% of the hashing power and then proceeding to conduct deep reorganizations of the original blockchain that reversed completed transactions.The repeated attacks on Bitcoin Gold do point out the importance of relying on ASIC miners instead of cheaper GPU-based mining. Since Bitcoin Gold uses the Zhash algorithm that makes mining possible even on consumer graphics cards, attackers can afford to launch a 51% attack on its network without needing to invest heavily in the more expensive ASIC miners. This 51% attack example does highlight the superior security controls offered by ASIC miners as they need a higher quantum of investment to procure them and are built specifically for a particular blockchain, making them useless for mining or attacking other blockchains.However, in the event that miners of cryptocurrencies like BTC shift to smaller altcoins, even a small number of them could potentially control more than 50% of the altcoin’s smaller network hashrate. Moreover, with service providers such as NiceHash allowing people to rent hashing power for speculative crypto mining, the costs of launching a 51% attack can be drastically reduced. This has drawn attention to the need for real-time monitoring of chain reorganizations on blockchains to highlight an ongoing 51% attack. MIT Media Lab’s Digital Currency Initiative (DCI) is one such initiative that has built a system to actively monitor a number of PoW blockchains and their cryptocurrencies, reporting any suspicious transactions that may have double-spent the native token during a 51% attack.Cryptocurrencies such as Hanacoin (HANA), Vertcoin (VTC), Verge (XVG), Expanse (EXP), and Litecoin are just a few examples of blockchain platforms that faced a 51% attack as reported by the DCI initiative. Of them, the Litecoin attack in July 2019 is a classic example of a 51% attack on a proof-of-stake blockchain, even though the attackers did not mine any new blocks and double-spent LTC tokens that were worth less than $5,000 at the time of the attack. This does highlight the lower risks of 51% attacks on PoS blockchains, deeming them less attractive to network attackers, and is one of the many reasons for an increasing number of networks switching over to the PoS consensus mechanism.

Čítaj viac

Are crypto trading bots legit?

While most popular crypto trading bots are offered for free, they do come with associated costs, such as trading commissions and withdrawal fees, that need to be evaluated before proceeding. When choosing a crypto trading bot, investors need to weigh the pros and cons of “free” crypto trading bots compared to those that charge a flat monthly or annual subscription fee. Most popular crypto trading bots like Naga, Pionex, eToroX do not charge users for viewing but have trading commissions starting from as low as 0.05% for every trade executed via their platform. This is especially pertinent for those whose daily trading volumes regularly exceed tens of thousands of dollars. The trading fees due over a month could be far more than the subscription fee charged by other competitors. For example, cloud-based trading bots like CoinRule and CryptoHopper provide a free trial, after which users can be charged from as low as $19/month to as high as $450/month, depending on the plan and range of services selected. These trading bots make more sense for investors with high trading volumes and who want to enjoy these services from anywhere in the world. That said, investors or traders looking to purchase or rent a crypto trading bot need to verify if their crypto exchange supports bots. For example, CoinBase does not allow trading bots to interact with its platform, providing that utility with its CoinBase Pro platform. However, with Coinbase announcing that the CoinBase Pro platform will cease to exist by the end of 2022, all advanced trading features, including the use of trading bots, will be available to all its users by the start of 2023. Exchanges like Binance, on the other hand, support a range of crypto trading bots and are much more suited for those looking to indulge in the high-speed trading powered by these bots.

Čítaj viac

What is a cryptocurrency mining pool?

In the early days of Bitcoin (BTC), crypto enthusiasts only required a basic personal computer with an internet connection to generate new BTC tokens through a distributed computing process known as mining. However, with more people chasing the same number of block rewards, Bitcoin’s mining process has become more challenging with time. In fact, the quantum of rewards will progressively reduce by half every four years, making it less rewarding for individual miners who will need to allocate greater computational resources with time.Available on blockchain protocols that employ a proof-of-work (PoW) consensus mechanism, this mining process requires application-specific integrated circuits (ASICs) to be deployed in the form of large rigs so as to complete the complex nature of mathematical problems within the time needed to mine a block.With the increasing difficulty of the mining algorithm and the rewards for mining a block reducing with time, it has become impossible for a piece of single personal computing equipment to successfully mine a block. This has brought the concept of a cryptocurrency mining pool to the forefront, where individual miners or users come together and pool their computational resources in order to improve their chances of mining a block and share the rewards received among them. In existence since 2010, when Slush Pool was formed as the first Bitcoin mining pool, there are now many popular mining pools for cryptocurrencies like Ether (ETH), Zcash (ZEC), Bitcoin Cash (BCH), Bitcoin SV (BSV) and more to choose from.Replete with their own dashboards that provide status on aspects like the mining hardware’s status, the current hash rate, estimated earnings and other parameters, the mining pools offer crypto users the opportunity to participate in the mining process of a particular cryptocurrency consistently and earn regular rewards in proportion to the computing power contributed.Understanding the cryptocurrency mining processBefore we delve into what is a cryptocurrency mining pool and how an individual can join one, let us look at how cryptocurrency mining takes place and understand the key difficulties involved. Firstly, for any PoW blockchain protocol, the process of mining its native token involves solving math problems using computing power, where the correct answer is represented as the block’s hash number, and rewards are presented to the entity that solves the fastest. These rewards are presented in the form of native tokens, with the mining process programmed such that a new transaction block is mined after specific durations of time. In the case of Bitcoin, this time is around ten minutes and the complexity, or hash rate, is adjusted depending on the amount of computing power available on the network.With more computing power, the hash rate proportionately increases and requires even more powerful computing power to be having any chance of solving the mathematical puzzle within each cycle time. This is the reason why cryptocurrency miners have graduated from using personal computers or CPU mining to using graphic processing units (GPUs) and now shifting entirely to custom-built rigs using hundreds of ASICs in order to mine cryptocurrency. These ASIC miners continue to evolve and use the latest chip technology to provide a hash rate that can increase the chances of mining Bitcoin or any other cryptocurrency. Depending on the hash rate, power consumption, the noise produced, and profitability per day, ASIC miners like the Bitmain Antminer S19 Pro, AvalonMiner 1166 Pro, and WhatsMiner M32 are preferred among the crypto mining community today.Whether it be releasing new tokens into the system or verifying and adding transactions to the public ledger in the form of blocks, the mining process gets tougher as more miners compete for the same. Since the reward for mining a Bitcoin block is 6.25 BTC, it is quite lucrative from a monetary perspective and has motivated many miners to increase their computing capacity by purchasing expensive ASIC miners. Alternatively, those who would rather dedicate their existing computing capacity to earn lesser but consistent rewards prefer to join a cryptocurrency mining pool like F2pool, Slush Pool, or AntPool, and they like to combine resources and earn daily rewards for their contributions.How do crypto mining pools work? A cryptocurrency mining pool is a collection of miners that work together as one entity to augment their chances of mining a block and share rewards among each other in proportion to the computing power contributed by them in successfully mining a block. The mining pool operator manages activities such as recording the work performed by each pool member, managing their hashes, assigning reward shares to each member and even the work to be performed by them individually. In return, a mining pool fee is deducted from the rewards distributed to each member, which is computed based on the pool-sharing mechanism and depending on how these cryptocurrency mining pools share rewards, they can be of the proportional type, pay-per-share type or completely decentralized peer-to-peer (P2P) pool type. In a proportional mining pool, miners that are contributing their computational power receive shares until the time when the pool is successful in mining a block, which are then converted into rewards proportional to the number of shares received by each pool member.Pay-per-share pools differ slightly from proportional pools in the sense that each member can encash the shares received on a daily basis, irrespective of whether the pool has been successful in finding a block. Last but not least, P2P cryptocurrency mining pools are more advanced versions where the entire pool activity is integrated as a separate blockchain to prevent the operator or any single entity from cheating the pool members.Irrespective of the type of pool one chooses, it is important to check if the crypto mining pool is profitable after analyzing the computing power needed, electricity costs involved, the mining pool fee applicable and how often crypto mining pools payout. Usually, different cryptocurrency mining pools charge between 2% to 4% of the realized earnings, with most offering a daily pay-out mechanism at a predetermined time of the day. For contributors, though, the cost of purchasing dedicated ASIC miners and the regular cost of electricity needed to power them need to be carefully ascertained to understand if crypto mining pools are profitable.What are the different types of crypto mining pools and how to start mining a pool?There are a number of reputed cryptocurrency mining pools available for individual miners to join and start contributing toward. Binance, AntPool, F2pool, Pool BTC and Slush Pool are some of the best-known cryptocurrency mining pools that have an exemplary track record in terms of uptime efficiency and regular payouts being made to pool members. In fact,Slush Pool has been responsible for mining more than 1.3 million BTC since its inception, helping over 15,000 small individual miners collectively mining Bitcoin at a total hash rate accounting for 5-8% of the total Bitcoin network.Instead of participating in a Bitcoin mining pool, individual miners can also join in mining other cryptocurrencies like Litecoin (LTC), Bitcoin Gold (BTG), Monero (XMR), ETH, and Ethereum Classic (ETC) among others, by joining the right mining platform. Amongst Ethereum mining pools, Ethermine, 2Miners, F2pool, Nanopool, and Ezil are some of the more established options for users to choose from, with each offering a different network hash rate and comprising hundreds to thousands of individual miners. Choosing which cryptocurrency to start mining with depends upon its price stability, the hash rate required to consistently earn decent rewards and the mining platform’s fees that will be minus the overall earnings.Apart from registering for a cryptocurrency mining platform, individual miners will need to have mining hardware in the form of one or more ASIC miners, mining software installed and a secure cryptocurrency wallet to store rewards and other crypto holdings for transacting purposes. The more capital invested in advanced mining rigs or equipment, the brighter the chances of earning higher rewards, subject to the entire hardware being dedicated to the purpose of cryptocurrency mining. Additionally, having a fast internet connection and an uninterrupted electricity supply are essential to perform the work allocated by the mining pool operator at the fastest pace possible.Advantages and disadvantages of a crypto mining poolCryptocurrency mining pools offer even smaller miners the opportunity to utilize their computational resources to earn a regular income without having to invest heavily in developing a dedicated mining rig that can cost millions of dollars. Periodic payouts, clear and real-time visibility of the rewards potential and benefit from the professional management of a pool operator are just some of the advantages of joining a crypto mining pool.However, not all crypto mining pools are safe, as demonstrated by Poolin, which recently announced that it was suspending BTC and Ether (ETH) withdrawals due to liquidity concerns. Moreover, considering that crypto mining pools make money by deducting a mining pool fee from rewards earned by mining activities, the actual earnings for each pool member are considerably lower than what is possible in the case of being a sole miner. What’s more, is that the equipment needed for pursuing even mining pool operations can be very expensive and profits can be disproportionately affected by any increase in electricity or internet costs.Purchase a licence for this article. Powered by SharpShark.

Čítaj viac

Získaj BONUS 8 € v Bitcoinoch

nakup bitcoin z karty

Registrácia Binance

Burza Binance

Aktuálne kurzy