banner
Jrenc

Jrenc

There’s a million things I haven’t done。
x
github
email
bilibili

3.29 Stay awake and start learning

Stay awake and start learning.
There are no good projects in the cryptocurrency world. I'm here to make money, not to invest.
The project team is here to fleece the sheep, not to change the world.
Are there really projects that can change the world? Yes, but I can't become a project team member.
The ones who shout about changing the world are most likely to rug, because if they can't do it nearby, they can only draw pie in the sky.

I'm going to be laughed at by VT, the gossip in the cryptocurrency world is really delicious. It's much more exciting than the front-end entertainment circle.
Image
It's just a pity for friends who have been scammed.

I feel that in the future, when buying cryptocurrency, it's better to buy grid. Grid is arbitrage, it can reduce risks and earn compound interest. If you think the price will rise, buy an ascending grid; if you think it will fall, buy a descending grid.

I feel that blockchain is not as rich in computer information.

Learning directions:

  1. Learn about on-chain interactions and on-chain tools.
    Learn to judge market hotspots based on gas prices.
  2. Learn to use or even develop bots.
  3. Find a large number of bloggers to learn from their past experiences.
  4. Learn to effectively evaluate the efficiency of fund utilization.
  5. Understand new concepts such as brc420, erc404, 333.
  6. Learn to monitor the movements of major exchanges.

Learning about on-chain interactions and on-chain tools#

Learn to judge market hotspots based on gas prices#

What is Gas Fee?#

Gas fee refers to the fee required to be paid when conducting transactions or executing smart contracts in blockchain-based networks such as Ethereum. This fee is used to compensate for the computational resources consumed by executing transactions in the network. In simple terms, whenever you perform transactions (such as transfers, purchasing NFTs, participating in decentralized finance activities, etc.) on such networks, you need to pay a certain amount of gas fee to the miners or validators responsible for processing these transactions.

The level of gas fee is usually influenced by network congestion and transaction complexity. When there are more transaction requests in the network, gas fees tend to rise because everyone wants their transactions to be processed with priority. Conversely, when the network is less congested, gas fees will be relatively lower.

Gas fees consist of two main components: Gas Limit and Gas Price. Gas Limit refers to the maximum amount of computational work required to execute a transaction or smart contract, while Gas Price is the price users are willing to pay per unit of gas. The final gas fee is the product of these two factors.

Due to the fluctuation of gas fees, users need to carefully choose the appropriate gas price when conducting transactions to ensure that the transactions are not stuck due to low prices or unnecessarily high fees.

How does Gas Fee work in blockchain?#

Gas fee plays several key roles in blockchain networks:

Resource limitation: Performing operations (such as transfers, smart contract executions, etc.) on the blockchain requires computational resources. Gas fee is essentially a unit of measurement used to quantify the amount of computational resources consumed by these operations. This helps prevent malicious users from unlimitedly using network resources, as each operation requires a corresponding fee.

Transaction priority: The Gas Price set in a transaction determines its processing priority. In general, miners or validators tend to prioritize transactions with higher gas prices because it means they can earn more fees. Therefore, users can speed up the processing of their transactions by increasing the gas price.

Network security: Gas fee also helps protect the network from certain attacks, such as denial-of-service (DoS) attacks. Attackers need to pay fees for each operation they execute, which greatly increases the cost of launching attacks.

Economic incentives: Gas fee provides economic incentives for miners or validators in the network. They earn fees by verifying transactions and maintaining the security of the blockchain. This incentive mechanism ensures the decentralized security and efficient operation of the network.

Market balance: The gas fee mechanism also helps establish a market balance between network demand and resource supply. When the network is congested, gas prices rise, which suppresses unnecessary transactions and releases network resources. When the network is less busy, gas prices decrease, attracting more users to engage in transactions.

In summary, gas fee is not only a means of measuring and paying for network resource consumption, but also an important mechanism for protecting the network, incentivizing participants, and regulating network activities.

What is the process of initiating a transaction on the blockchain?#

Image

As shown in the above diagram, transaction data can be traced back at any time, and every step can be verified for past transactions.

The process of each transaction in the blockchain goes through these seven steps shown in the diagram. The third step is the so-called "mining". For example, if Alice wants to send 2 bitcoins to Bob, it means that the ownership of these 2 bitcoins on the network will be transferred. First, Alice initiates the transaction and broadcasts it to the entire network, letting the whole world know that Alice wants to send 2 bitcoins to Bob. After the broadcast, all nodes receive this message, and the miners know that there is a new transaction. Then all miners start mining.

As mentioned earlier, every transaction is recorded in a block on the blockchain. How does it get recorded and who does the recording? Mining is the process of competing for the right to record transactions. After winning the right, the miner needs to confirm whether the transaction is valid, pack the transaction information into a block, and generate a new block. After completing these tasks, the system rewards the miner with bitcoins and a certain transaction fee. The mining reward combined with the transaction fee constitutes the miner's income.

This recording right needs to be competed for by miners through calculations. The miner needs to calculate a value smaller than the given difficulty target in the shortest possible time by adding a random number to the timestamp, the content of the previous block, and the data of the current transaction (the difficulty target is determined based on the difficulty of the previous block's calculation, time, and the overall network computing power). To find this value, there is no fixed algorithm, only random hash collisions by computers. The random number can vary, and it needs to be tried from 0 to the maximum value of 2^32.

The first person to calculate the value and put the result on the block for everyone to agree on achieves consensus. After being confirmed for 6-7 consecutive times, the transaction can be considered reliable, and the miner can receive the reward. Bitcoins are generated during the mining process.

The transaction is packed into a block and placed on the chain, and the transaction parties cannot go back or default on the transaction because the transaction has been broadcasted and verified by the entire network. This is the process of generating and conducting transactions in Bitcoin.

Are there any differences in transactions on different blockchains?#

Yes, the transaction processes on different blockchains may vary depending on factors such as blockchain architecture, consensus mechanisms, transaction structures, and network rules. Here is a brief overview of some major differences:

Consensus mechanisms:

For example, Ethereum has transitioned from proof-of-work (PoW) to proof-of-stake (PoS) as its consensus mechanism, while Bitcoin still uses proof-of-work (PoW). Other blockchains may use different consensus mechanisms such as delegated proof-of-stake (DPoS) or practical Byzantine fault tolerance (PBFT). Different consensus mechanisms affect the speed and security of transactions.
Transaction speed and throughput:

Some blockchains, such as Bitcoin, are designed to generate a block every 10 minutes, while Ethereum generates a block approximately every 15 seconds. Other blockchains, such as EOS or Solana, achieve higher transaction speeds and throughput through different architectural designs.
Transaction fees:

Different blockchains calculate transaction fees in different ways. Gas fees on Ethereum are related to network congestion, while Bitcoin's transaction fees are usually based on the size of the transaction data. Some new blockchain networks even offer extremely low or zero transaction fees to attract users.
Smart contracts and transaction types:

Some blockchains support complex smart contracts and multiple types of transactions. For example, Ethereum allows the creation and execution of smart contracts that can contain very complex logic. Bitcoin, on the other hand, focuses more on currency transfers, although it also supports a certain level of scripting operations.
Transaction confirmation mechanisms:

On some blockchains, once a transaction is included in a block, it is considered confirmed. In other networks, more block confirmations may be required to increase the irreversibility of transactions.
Fork handling:

Different blockchains have different ways of handling blockchain forks, which affects the finality of transactions. For example, in the event of a fork, some networks may require a specific number of confirmations to determine which chain is the main chain.
In conclusion, although most blockchains have similarities in the basic flow of transactions, such as creating transactions, signing, broadcasting, verifying, and confirming, the specific details and implementations vary among different blockchains, reflecting their respective design priorities and trade-offs.

Don't read so many boring things, take a look at what's on the chain.#

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.