Gas and transaction fees
Every transaction on the chain costs a small fee, paid in L2P. This page explains what you are paying for, how much it is, and where the money goes.
What gas is
Gas is a measure of work. Sending coins from one address to another is a small amount of work. Asking a smart contract to do something is more, and a complicated contract is more again.
Two numbers make up your fee.
Gas used is how much work the transaction turned out to be. A plain transfer of L2P is always 21,000 gas, because it is always the same amount of work. A contract call depends on what the contract does.
Gas price is what you pay per unit of gas, quoted in gwei. One gwei is a billionth of an L2P.
The fee is those two multiplied together. Nothing else goes into it.
What it costs here
The chain has a minimum gas price of 0.1 gwei, and while the chain is quiet that is what you pay.
A plain transfer at that price works out at 0.0000021 L2P. Two millionths of a coin, and it takes a great many transactions before that adds up to anything you would notice.
A contract call, such as delegating to a validator or voting on a proposal, uses more gas than a transfer, so it costs more. It is still a very small number.
Gas prices rise when the chain is busy, because everyone is bidding for room in the same block. A block holds about 70 million gas, so a busy block is thousands of transfers, and a quiet chain has no competition to bid against.
Where the fee goes
Your fee is split three ways by the chain itself, in the block that includes your transaction.
| Share | Goes to |
|---|---|
| 10% | Destroyed. See Fee burn |
| 6.25% | The system reward pot, which funds fast finality and pays whistleblowers |
| The rest | The validator that produced the block, and through it the people who delegated to that validator |
Those shares are governance parameters, so they can change through a vote and the timelock. They are the same for everyone and they are applied by the chain, not decided per transaction.
Things that surprise people
A failed transaction still costs the fee. The network did the work of trying, and that work is what the fee pays for. Nothing else about a failed transaction changes: no coins move, and the state goes back to what it was.
You cannot send your entire balance. The fee has to come out of the same balance, so something has to be left over. Sites that let you stake or delegate keep a little back for exactly this reason, and doing it by hand means leaving that room yourself.
Gas limit is not gas used. Your wallet reserves a gas limit up front, and you are charged for what was actually used. A transaction that runs out of that limit fails, and then you are charged for the whole limit, because all of it was spent trying.
The amount you send has nothing to do with the fee. Sending one coin and sending a million coins cost exactly the same, because both are the same amount of work.
Reading it on the explorer
Any transaction page on l2pscan.com shows the fee, the gas used, the gas limit and the gas price side by side. That is the honest record of what a transaction cost and why. See Reading a transaction page.
Keeping a little spare
Keep a small amount of L2P in any address you use. Not for the amounts above, which are tiny, but because an address with a balance of exactly zero cannot do anything at all, including moving the tokens it may be holding.