JLAND

Meramask 메타마스크 가스비

가스란?  거래가 왜 그렇게 오래 걸리나요?
매티슨 애셔


요약: 은행 계좌에서 송금할 때 전신환 또는 ACH 수수료를 지불하는 것처럼 이더리움에서 거래를 보내는 데에도 수수료(가스 수수료라고 함)가 있습니다.  이것은 이더리움을 사용하기 위해 통행료를 지불하는 것과 같습니다.

가스란?

차를 채우거나 이른 아침에 먹은 음식을 채우는 것을 생각할 수 있지만 가스라는 용어를 들었을 때 이 용어는 암호화 세계에서 특별한 맥락을 가지고 있습니다.  암호화에서 가스는 이더리움에서 특정 작업을 실행하는 데 필요한 계산 노력의 양을 측정하는 단위를 나타냅니다.  이더리움에서 트랜잭션을 실행하려면 가스 요금을 지불해야 합니다.  MetaMask 모바일을 사용하든 데스크톱 확장을 사용하든 트랜잭션을 실행할 때 항상 가스 비용을 지불해야 합니다.

엄마에게 ETH를 보내야 합니까?  그 거래에는 가스가 필요합니다.  Compound를 통해 돈을 대출하고 싶으십니까?  그 거래에도 가스가 필요합니다.  NFT를 사는 것은 어떻습니까?  당신은 그것을 추측했다 - 가스.  가스는 통행료와 같습니다.  고속도로를 이용하려면 통행료를 내야 하므로 정부가 고속도로를 유지하기 위한 자금을 확보해야 합니다.  차량이 도로를 압박할수록 운전자는 더 많은 통행료를 지불해야 합니다.  18세 이상 운전자의 통행료는 오토바이 운전자보다 훨씬 높습니다.

마찬가지로 이더리움의 거래가 복잡할수록 거래에 더 많은 계산 노력이 필요하기 때문에 가스 수수료가 높아집니다.


가스 제한이란 무엇입니까?

가스 요금은 Gwei로 표시되며 .000000001 ETH입니다.  1센트는 0.01달러이기 때문에 Gwei를 센트로 생각할 수 있습니다.  수행하려는 모든 거래에 대해 거래를 실행하기 위해 지불할 수수료를 설정해야 합니다.  특정 거래에서 지불할 용의가 있는 가스 단위의 최대 금액을 가스 한도라고 합니다.  트랜잭션을 실행하기 위해 지정해야 하는 가스 한도가 있는 것 외에도 입력해야 하는 가스 가격도 있습니다.  가스 한도 x 가스 가격 = 가스 수수료, 이는 거래가 실행되기 위해 지불해야 하는 금액입니다.

운 좋게도 MetaMask는 거래가 확인되기를 원하는 속도에 따라 대략적인 가스 요금을 계산합니다.

가스 요금이 어디로 가는지

"더 높은 가스 요금을 설정하면 내 거래가 확인되는 이유는 무엇입니까?"  훌륭한 질문입니다!

Ethereum에서 트랜잭션을 제출하면 동시에 트랜잭션을 제출하려는 많은 사람들과 경쟁하게 됩니다.  당신이 엄마에게 Ether를 보내는 동안 인도에 있는 누군가는 Uniswap에서 거래할 수 있고 네팔에 있는 누군가는 OpenSea에서 발행된 최신 NFT를 구매할 수 있습니다.  각 사람은 동시에 거래를 실행하려고 합니다.  그러나 이더리움 블록에 포함될 수 있는 트랜잭션은 너무 많고 대략 13초마다 새로운 블록만 생성됩니다.  이것은 모든 사람들이 다음 블록에 거래를 포함시키기 위해 서로 경쟁하고 있음을 의미합니다.  블록에 포함될 수 있는 거래의 수만큼 수요가 많고 공급이 제한되면 가격이 상승해야 합니다.

그러나 이러한 트랜잭션은 제출될 때 실제로 실행되기 전에 어디로 이동합니까?  이러한 트랜잭션은 "메모리 풀"의 약자인 mempool로 이동합니다.  mempool은 제출되었지만 아직 확인되지 않은 모든 트랜잭션이 있는 곳입니다. 간단히 말해서 mempool은 유효성 검사를 기다리는 대기열입니다.  트랜잭션이 악의적이지 않은지 확인하기 위해 트랜잭션을 실행하기 전에 유효성을 검사하는 광부는 mempool에서 다음 블록에 포함되어야 하는 트랜잭션을 선택합니다.

"그럼 왜 채굴자들은 내가 엄마에게 다음 블록에 포함될 ETH를 보내는 멤풀에서 내 거래를 선택할까요?"  물론 더 많은 돈을 지불할 용의가 있기 때문입니다!

채굴자는 사용자가 거래를 제출하기 전에 설정한 가스 수수료를 기준으로 다음 블록에 포함되어야 하는 거래를 선택합니다.  가스 요금이 높을수록 채굴자가 다음 블록에 거래를 포함할 가능성이 높아집니다.  이 상황에서 경쟁이 시작됩니다. 다른 모든 사람들과 경쟁하고 그 기간 동안 다음 블록에 포함될 가스 요금을 설정하기 때문입니다.

거래가 오래 걸리는 이유

거래를 제출하는 다른 사용자와 경쟁하고 있기 때문에 가스 수수료가 너무 낮으면 채굴자들은 가까운 장래에 거래를 블록에 포함하도록 인센티브를 받지 못할 것입니다.  따라서 가스 수수료가 가까운 미래 블록에 포함될 만큼 높게 설정되지 않았기 때문에 거래가 너무 오래 걸립니다.  다른 사용자가 기꺼이 지불할 가스 요금이 내려갈 때까지 기다려야 광부에게 매력적입니다.

시리즈 면책 조항:
이 시리즈 기사는 암호 화폐 및 DeFi에 참여하는 초보자만을 위한 일반적인 지침 및 정보 제공을 목적으로 합니다.  이 기사의 내용은 법률, 비즈니스, 투자 또는 세금 관련 조언으로 해석되어서는 안 됩니다.  모든 법률, 비즈니스, 투자, 세금 관련 영향 및 조언에 대해서는 고문과 상의해야 합니다.  ConsenSys는 손실된 자금에 대해 책임을 지지 않습니다.  스마트 계약과 상호 작용하기 전에 최선의 판단을 내리고 실사를 연습하십시오.

What is gas? Why do transactions take so long?
By Mattison Asher

TL;DR: Just like you pay a wire or ACH fee when transferring money out of your bank account, there is a fee (called gas fee) to send transactions on Ethereum. It is like paying a toll to use Ethereum.

What is gas?

While you may think of filling up your car, or even what you ate earlier in the day, when you hear the term gas, the term has a special context in the world of crypto. Gas in crypto refers to the unit that measures the amount of computational effort required to execute specific operations on Ethereum. You must pay a gas fee in order to execute a transaction on Ethereum. Whether you are on MetaMask mobile or the desktop extension, you will always need to pay for gas when executing transactions.

Need to send your mom some ETH? That transaction requires gas. Want to lend out your money via Compound? That transaction requires gas too. What about buying an NFT? You guessed it–gas. Gas is like a toll. If you want to use the highway, you have to pay the toll so the government has money to maintain the highway. The more duress a vehicle puts the road under, the higher the toll the driver must pay. Tolls are a lot higher for 18 wheelers than motorcycle drivers.

Similarly, the more complex the transaction on Ethereum, the higher the gas fee, since the transaction will require more computational effort.


What is a gas limit?

Gas fees are denoted in Gwei, which is just .000000001 ETH. You can think of Gwei like cents, since 1 cent is .01 of a dollar. For every transaction you want to make, you must set what fee you are willing to pay for your transaction to be executed. The maximum amount of gas units you are willing to pay for in a particular transaction is called the gas limit. In addition to there being a gas limit that needs to be specified for a transaction to execute, there is also a gas price that must be input as well. The gas limit x gas price = gas fee, which is what you have to pay for the transaction to be executed.

Lucky for you, MetaMask calculates the approximate gas fee you should set for you based on how fast you want your transaction to be confirmed.

Where your gas fees go

You might be wondering “why will my transaction be confirmed if I set a higher gas fee?” An excellent question!

When you submit a transaction on Ethereum, you are competing with a bunch of other people who also want to submit a transaction at the same time. While you might be sending your mom some Ether, someone in India might be trading on Uniswap, while someone in Nepal might be buying the latest NFT minted on OpenSea. Each person is trying to have their transaction executed at the same time. But, only so many transactions can be included in an Ethereum block, and there are only new blocks every roughly 13 seconds 187. In fact, only 12.5 million units of gas 107 can be included in each block. This means everyone is competing against one another to have their transaction included in the next block. When demand is high, and supply is constrained since only so many transactions can be included in a block, price must increase.

But where do these transactions go when they are submitted but prior to them actually being executed? These transactions go to the mempool, short for “memory pool.” The mempool is where all the transactions that have been submitted but not yet verified live.In short, the mempool is the waiting queue for validation. Miners, who validate transactions before they are executed to make sure they aren’t malicious, pick the transactions that should be included in the next block from the mempool.

“So why would miners pick my transaction from the mempool where I am sending my mom some ETH to be included in the next block?” Because I am willing to pay them more of course!

Miners select what transactions should be included in the next block based on how high the gas fee users set prior to submitting the transaction. The higher the gas fee, the higher chance a miner will be willing to include your transaction in the next block. This situation is where the competition comes in, since you are competing with everyone else setting gas fees during that time frame to be included in the next block.

Why do transactions take so long

Since you are competing against other users submitting transactions, if your gas fee is too low, miners won’t be incentivized to include your transaction in a block in the near future. Thus, your transaction takes so long because the gas fee was not set high enough for it to be included in a near-future block. You will have to wait for the gas fees that other users are willing to pay to go down for your gas fee to be attractive to miners.

Series Disclaimer:
This series article is intended for general guidance and information purposes only for beginners participating in cryptocurrencies and DeFi. The contents of this article are not to be construed as legal, business, investment, or tax advice. You should consult with your advisors for all legal, business, investment, and tax implications and advice. ConsenSys is not responsible for any lost funds. Please use your best judgment and practice due diligence before interacting with smart contracts.

'정보' 카테고리의 다른 글

상봉 코스트코 술 위스키 양주 가격 2022-02-20  (1) 2022.03.26
휴넷 안전보건교육 시험문제  (0) 2022.03.21
강쌤 4주차  (0) 2021.11.09
비트코인 할때 멘탈 관리 팁  (1) 2021.08.15
렌섬웨어 예방  (0) 2021.08.06

이 글을 공유합시다

facebook twitter googleplus kakaoTalk kakaostory naver band