1inch Network All you need to know DeFi

How does blockchain technology work?

1inch Network-photo

by 1inch Network

• 4 min read

Blockchain technology, powering crypto transactions, offers a secure, transparent and efficient alternative to traditional data storage and transfer methods.

Key takeaways:

Blockchains are sequential databases containing recorded data for transactions – transfers of funds between users.
They can be decentralized, since no information is stored in a central location, but is spread across all the computers (nodes) participating in a blockchain network. Blockchain technology is based on distributed online ledgers.
Blockchains maintain a secure record of cryptocurrency transactions – they must be approved by consensus algorithms – for example Proof of Stake or Proof of Work.
Blockchains can only write data – its transaction history is unalterable.
Each attached block is considered as one blockchain confirmation.
A native token is a specific network’s inherent cryptocurrency. It is needed to compensate validators or miners for adding transactions to blocks.

What is a blockchain?

Blockchain is a technology based on distributed digital ledgers, to which various kinds of data can be recorded. These distributed ledgers are basically chains of blocks - data units added one after another.

In the context of decentralized finance (DeFi), blockchains are normally used to store data, including data for transactions - transfers of funds between users. 

One of the main features of a blockchain is its immutability – meaning that the data cannot be deleted or changed once recorded in a block. Another major feature is decentralization. Data recorded to a blockchain is stored on all the computers (nodes) participating in the blockchain network, rather than on a single server. As a result, if one or several computers crash, the network continues to operate and the data is not lost.

Key principles of blockchain technology

Transactions are grouped into blocks that are put together in a sequential chain – a blockchain. Once a block is complete, the next block is formed.

Miners or validators are responsible for adding transactions to blocks, and receive transaction fees for doing so.

Before a transaction is written to a block, it must be approved by consensus. For that, consensus algorithms are used. 

Consensus algorithms

The two most widespread consensus algorithms are Proof of Work (PoW), which sets the rules for miners’ work, and Proof of Stake (PoS), for regulating validators. Among others, PoW is used by the Bitcoin, Dogecoin and Litecoin networks. PoS serves as a consensus mechanism for Ethereum, BNB Chain, Cardano, Avalanche and many other networks.

The working principle, participation conditions and incentives of the two consensus mechanisms differ. However, both miners and validators process transactions and add new valid blocks to the blockchain. 

PoW and PoS differ foremost in the mechanism used to select the nodes to validate the blocks.

PoW involves competition between miners. They simultaneously solve computational tasks, and whoever does it faster validates the block. Computations require a significant amount of processing power. The more power miners use, the faster they perform the computation and form new blocks. As they compete in processing power (work), the consensus is called Proof of Work.

Miners benefit from block validation. They profit from transaction fees. To add a transaction to the block faster, a user can pay the miner a higher fee to prioritize and speed up the transaction. Miners checking the block are also rewarded with newly mined coins.

The PoS consensus selects validators based on their amount of staked native tokens – hence the name. Staking refers to locking cryptocurrency in a smart contract – a program on a blockchain network designed to perform similar functions as a paper contract.  

Proof of Stake requires a validator node to process the block of transactions. Participants who stake more native tokens over a longer period of time are more likely to be selected to add more blocks.

Validators profit from network fees and tips for prioritizing a transaction. The block value depends on the size of the validator's staking size and the number of validators in a blockchain.

New coins are created as a result of adding and validating new blocks. For instance, 6.25 BTC (Bitcoin) is currently minted with every new block on the Bitcoin network, and ETH (Ether) is released (minted) as a reward for each block on Ethereum.

Decentralization 

If transaction data were stored in a single location, it would be vulnerable to hacks and theft. Contrarily, with a decentralized blockchain, all the blocks are stored on thousands of nodes distributed around the planet. This is called decentralization. With this system, a malicious actor must attack multiple nodes, which is quite challenging.

Immutability

The blocks are connected sequentially, so that any attempt to change the data within ruins referencing within the system. 

Every transaction contains a unique hash value. The hash format is a string of numbers and letters. Any data can be transformed into a hash format through a mathematical function. Each block consists of the hash value of its transactions and the hash value from the previous block, all linked together. Changing some transaction data would mean altering the hash value, ruining the block data structure and invalidating the link to the following block. All network nodes automatically detect these discrepancies. So a hacker would have to change all hash values in every single block within the chain to succeed with blockchain data manipulation - a basically impossible task.

However, hackers have another way to gain control of a blockchain and its transactions - a 51% attack. In PoW, they need to control over 50% of the network’s mining hash rate. With PoS, they must command more than 50% of the staked tokens. Still, both scenarios are unlikely in the case of major networks such as Bitcoin and Ethereum, as they would require million-dollar investments in mining equipment or ETH staking. 

Blockchain confirmations

The more blocks are added to the blockchain after the transaction is posted, the "deeper" and more secure the transaction is. Each attached block is considered as one blockchain confirmation. The more confirmations the transaction has, the less likely it is to be reversed.

Protection from double-spending

Thanks to the validation process, one cryptocurrency unit cannot be spent twice in two separate transactions. If someone tries to send the same unit to different wallets, both transactions go to the mempool, but only one is being verified. The other one is automatically discarded.

Why do blockchains need native tokens?

Each network issues its inherent cryptocurrency, called a native token, which usually matches its name. 

Major networks and their native tokens:

When you need to exchange crypto or send it to someone (you can do it within your crypto wallet), you first need to choose the network and the asset you wish to interact with. Before performing any crypto transaction, check your wallet to ensure that there are some native tokens of the network you want to interact with. You may need them to pay for the transaction. Click here to learn how to perform transactions without native tokens on balance.

1inch Network-photo

1inch Network

Share the article

Copy done!
Copy done!