diff --git a/404.html b/404.html index 4e2d07b28..570bf4a38 100644 --- a/404.html +++ b/404.html @@ -5,7 +5,7 @@ Lisk Documentation - + diff --git a/assets/js/0eafa1eb.cb8015db.js b/assets/js/0eafa1eb.cb8015db.js deleted file mode 100644 index 298cc0324..000000000 --- a/assets/js/0eafa1eb.cb8015db.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklisk_docs=self.webpackChunklisk_docs||[]).push([[1068],{7553:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>r,toc:()=>l});var n=s(5893),i=s(1151);const a={title:"Fees",sidebar_position:1,slug:"/fees",description:"Documentation about network fees on Lisk. This page covers details of the two-component cost system involving L2 execution fees and L1 data fees, and offers insights on fee variations and cost-saving strategies.",keywords:["Lisk fees","transaction fees","network fees","Lisk network fees","L2 execution fee","L1 security fee","L1 data fee","transaction costs","gas fees","fee calculation","cost-saving","transaction timing","fee variations","Lisk platform"]},o="Fees",r={id:"about-lisk/fees",title:"Fees",description:"Documentation about network fees on Lisk. This page covers details of the two-component cost system involving L2 execution fees and L1 data fees, and offers insights on fee variations and cost-saving strategies.",source:"@site/docs/about-lisk/fees.md",sourceDirName:"about-lisk",slug:"/fees",permalink:"/lisk-documentation/fees",draft:!1,unlisted:!1,editUrl:"https://github.com/LiskHQ/lisk-documentation/tree/main/docs/about-lisk/fees.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{title:"Fees",sidebar_position:1,slug:"/fees",description:"Documentation about network fees on Lisk. This page covers details of the two-component cost system involving L2 execution fees and L1 data fees, and offers insights on fee variations and cost-saving strategies.",keywords:["Lisk fees","transaction fees","network fees","Lisk network fees","L2 execution fee","L1 security fee","L1 data fee","transaction costs","gas fees","fee calculation","cost-saving","transaction timing","fee variations","Lisk platform"]},sidebar:"documentationSidebar",previous:{title:"Network information, official explorers & faucets",permalink:"/lisk-documentation/network-info"},next:{title:"Building on Lisk",permalink:"/lisk-documentation/category/building-on-lisk"}},c={},l=[{value:"Gas tracker",id:"gas-tracker",level:2},{value:"How are fees on Lisk calculated?",id:"how-are-fees-on-lisk-calculated",level:2},{value:"L2 Execution Fee",id:"l2-execution-fee",level:3},{value:"L2 Execution Fee calculation",id:"l2-execution-fee-calculation",level:4},{value:"L1 Data Fee",id:"l1-data-fee",level:3},{value:"L1 Data Fee calculation",id:"l1-data-fee-calculation",level:4},{value:"EIP-1559 Parameters",id:"eip-1559-parameters",level:2},{value:"How do fluctuations in gas price on Ethereum (L1) affect transaction costs on Lisk (L2)?",id:"how-do-fluctuations-in-gas-price-on-ethereum-l1-affect-transaction-costs-on-lisk-l2",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"fees",children:"Fees"}),"\n",(0,n.jsxs)(t.p,{children:["Fees on Lisk Mainnet are, for the most part, significantly lower than on the L1 Ethereum network.\nThe low transaction fees can be provided because Lisk is a ",(0,n.jsx)(t.a,{href:"https://ethereum.org/en/developers/docs/scaling/optimistic-rollups",children:"Layer 2 optimistic rollup"})," network."]}),"\n",(0,n.jsx)(t.h2,{id:"gas-tracker",children:"Gas tracker"}),"\n",(0,n.jsx)(t.p,{children:"To track the current and past gas fees on Lisk, check the gas tracker for the respective network on Blockscout:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["Lisk Mainnet: ",(0,n.jsx)(t.a,{href:"https://blockscout.lisk.com/gas-tracker",children:"https://blockscout.lisk.com/gas-tracker"})]}),"\n",(0,n.jsxs)(t.li,{children:["Lisk Sepolia Testnet: ",(0,n.jsx)(t.a,{href:"https://sepolia-blockscout.lisk.com/gas-tracker",children:"https://sepolia-blockscout.lisk.com/gas-tracker"})]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"how-are-fees-on-lisk-calculated",children:"How are fees on Lisk calculated?"}),"\n",(0,n.jsxs)(t.p,{children:["Every Lisk Mainnet transaction has two costs: An ",(0,n.jsx)(t.strong,{children:"L2 execution fee"})," and an ",(0,n.jsx)(t.strong,{children:"L1 data fee"}),".\nAt a high level, the L2 fee is the cost to execute your transaction on L2 and the L1 fee is the estimated cost to publish your transaction on L1 (in a rollup batch)."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-text",children:"transaction_fee = l2_execution_fee + l1_data_fee\n"})}),"\n",(0,n.jsx)(t.h3,{id:"l2-execution-fee",children:"L2 Execution Fee"}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.a,{href:"https://docs.optimism.io/stack/transactions/fees#execution-gas-fee",children:"L2 Execution Fee"})," is equal to the amount of gas used by the transaction multiplied by the gas price attached to the transaction."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:"l2_execution_fee = transaction_gas_price * l2_gas_used\n"})}),"\n",(0,n.jsxs)(t.p,{children:["Because Lisk Mainnet is EVM equivalent, the ",(0,n.jsx)(t.strong,{children:"gas used"})," by a transaction on Lisk Mainnet is ",(0,n.jsx)(t.strong,{children:"exactly the same"})," as the gas used by the same transaction on Ethereum.\nIf a transaction costs 100,000 gas units on Ethereum, it will cost 100,000 gas units on Lisk Mainnet.\n",(0,n.jsx)(t.strong,{children:"The only difference is that the gas price on Lisk Mainnet is much lower"})," than the gas price on Ethereum so you'll end up paying much less in ETH.\nThis also means that the total cost of the L2 Execution Fee of a transaction can be estimated using the same tools you would use to estimate the cost of a transaction on Ethereum."]}),"\n",(0,n.jsx)(t.h4,{id:"l2-execution-fee-calculation",children:"L2 Execution Fee calculation"}),"\n",(0,n.jsxs)(t.p,{children:["The transaction gas price is the sum of the ",(0,n.jsx)(t.a,{href:"https://ethereum.org/en/developers/docs/gas/#base-fee",children:"Base Fee"})," and the optional additional ",(0,n.jsx)(t.a,{href:"https://ethereum.org/en/developers/docs/gas/#priority-fee",children:"Priority Fee"}),"."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:"transaction_gas_price = l2_base_fee + l2_priority_fee\n"})}),"\n",(0,n.jsxs)(t.p,{children:["Like Ethereum, Lisk Mainnet uses the ",(0,n.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-1559",children:"EIP-1559"})," mechanism to set the Base Fee for transactions (although with ",(0,n.jsx)(t.a,{href:"#eip-1559-parameters",children:"different parameter values"})," compared to Ethereum)."]}),"\n",(0,n.jsxs)(t.p,{children:["You can read more about how Ethereum's gas fees work over on ",(0,n.jsx)(t.a,{href:"https://ethereum.org/en/developers/docs/gas/",children:"Ethereum.org"}),"."]}),"\n",(0,n.jsx)(t.h3,{id:"l1-data-fee",children:"L1 Data Fee"}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.a,{href:"https://docs.optimism.io/stack/transactions/fees#l1-data-fee",children:"L1 Data Fee"})," is the only part of the Lisk Mainnet transaction fee that differs from the Ethereum transaction fee.\nThis fee arises from the fact that the transaction data for all Lisk Mainnet transactions is published to Ethereum.\nThis guarantees that the transaction data is available for nodes to download and execute."]}),"\n",(0,n.jsx)(t.p,{children:"The L1 Data Fee is automatically charged for any transaction that is included in a Lisk Mainnet block.\nIt is deducted directly from the address that sent the transaction."}),"\n",(0,n.jsx)(t.p,{children:"The L1 Data Fee is most heavily influenced by the Ethereum base fee that is continuously and trustlessly relayed from Ethereum to Lisk Mainnet."}),"\n",(0,n.jsx)(t.p,{children:"The actual amount of this fee depends on the following input values:"}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsxs)(t.li,{children:["The ",(0,n.jsx)(t.strong,{children:"signed transaction"})," is serialized according to the standard Ethereum transaction RLP encoding."]}),"\n",(0,n.jsxs)(t.li,{children:["The ",(0,n.jsx)(t.strong,{children:"current Ethereum base fee"})," and/or blob base fee (trustlessly relayed from Ethereum)."]}),"\n",(0,n.jsxs)(t.li,{children:["Two ",(0,n.jsx)(t.strong,{children:"scalar parameters"})," that independently scale the base fee and blob base fee."]}),"\n"]}),"\n",(0,n.jsx)(t.h4,{id:"l1-data-fee-calculation",children:"L1 Data Fee calculation"}),"\n",(0,n.jsx)(t.p,{children:"The L1 data fee is calculated according to the following formula:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:"l1_data_fee = tx_compressed_size * weighted_gas_price\n"})}),"\n",(0,n.jsxs)(t.p,{children:["Where the ",(0,n.jsx)(t.code,{children:"tx_compressed_size"})," is calculated like this:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:"tx_compressed_size = [(count_zero_bytes(tx_data)*4 + count_non_zero_bytes(tx_data)*16)] / 16\n"})}),"\n",(0,n.jsxs)(t.admonition,{type:"note",children:[(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.code,{children:"tx_compressed_size"})," is an estimation of the size that a transaction will occupy in blobs.\nThe divisor of 16 represents the storage savings of using blobs vs calldata."]}),(0,n.jsxs)(t.p,{children:['The "L1 Gas used by txn" field of transaction details in ',(0,n.jsx)(t.a,{href:"https://blockscout.lisk.com/",children:"Blockscout"})," contains the ",(0,n.jsx)(t.code,{children:"tx_compressed_size"})," multiplied by 16 (i.e., the ",(0,n.jsx)(t.code,{children:"calldata"})," size)."]})]}),"\n",(0,n.jsx)(t.p,{children:"Next, the two scalars are applied to the base fee and blob base fee parameters to compute a weighted gas price multiplier."}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:"weighted_gas_price = 16*base_fee_scalar*base_fee + blob_base_fee_scalar*blob_base_fee\n"})}),"\n",(0,n.jsx)(t.p,{children:"The default values for the scalars are:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"base_fee_scalar"})," = 0.786381"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"blob_base_fee_scalar"})," = 0.01734"]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"They can be adjusted depending on network conditions, to mitigate spikes in the transaction fees."}),"\n",(0,n.jsxs)(t.admonition,{type:"note",children:[(0,n.jsxs)(t.p,{children:["It is currently ",(0,n.jsx)(t.strong,{children:"not"})," possible to limit the maximum L1 Data Fee that a transaction is willing to pay."]}),(0,n.jsxs)(t.p,{children:["For further information about transaction fees, please check the ",(0,n.jsx)(t.a,{href:"https://docs.optimism.io/stack/transactions/fees",children:"Optimism Developer Docs > Transaction Fees"})]})]}),"\n",(0,n.jsx)(t.h2,{id:"eip-1559-parameters",children:"EIP-1559 Parameters"}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-1559",children:"EIP-1559"})," parameters used by the Lisk Mainnet differ from those used by Ethereum as follows:"]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Parameter"}),(0,n.jsx)(t.th,{style:{textAlign:"right"},children:"Lisk Mainnet value"}),(0,n.jsx)(t.th,{style:{textAlign:"right"},children:"Ethereum value (for reference)"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Block gas limit"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"30,000,000 gas"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"30,000,000 gas"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Block gas target"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"1,500,000 gas"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"15,000,000 gas"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"EIP-1559 elasticity multiplier"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"20"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"2"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"EIP-1559 denominator"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"1,000"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"8"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Maximum base fee increase (per block)"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"1.9%"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"12.5%"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Maximum base fee decrease (per block)"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"0.1%"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"12.5%"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Block time in seconds"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"2"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"12"})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"how-do-fluctuations-in-gas-price-on-ethereum-l1-affect-transaction-costs-on-lisk-l2",children:"How do fluctuations in gas price on Ethereum (L1) affect transaction costs on Lisk (L2)?"}),"\n",(0,n.jsx)(t.p,{children:"While the L1 Data Fee will be always cheaper compared to posting the transaction directly to the Ethereum mainnet (due to the efficient encoding in batching transactions), its value will vary depending on the amount of transactions on the L1.\nIf the timing of your transaction is flexible, you can save cost by submitting transactions during periods when gas prices on L1 are lower than usual for example, over the weekend."}),"\n",(0,n.jsx)(t.p,{children:"Changes after the transaction is processed on the sequencer do not affect the cost the user pays."}),"\n",(0,n.jsx)(t.p,{children:"For an L2 transaction, the normal process is:"}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsx)(t.li,{children:"The wallet estimates the cost of the transaction and shows it to the user."}),"\n",(0,n.jsx)(t.li,{children:"The user then submits the transaction."}),"\n",(0,n.jsxs)(t.li,{children:["The sequencer processes the transaction in two phases.","\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"First, it processes the transaction."}),"\n",(0,n.jsx)(t.li,{children:"Then, it deducts the gas cost, based on the L1 and L2 gas prices at that time."}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(t.li,{children:"After that, the transaction is written to L1."}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"In principle, between steps 1 and 3 the gas price might change.\nHowever, it can not increase by more than 12.5%, therefore the difference between the price shown to the user in step 1 and the actual one is bounded by 12.5%.\nAfter step 3, the finality of the transaction is Lisk's responsibility.\nIf the L1 gas price spikes, Lisk pays the new cost."}),"\n",(0,n.jsxs)(t.p,{children:["In conclusion, the user will pay at most 12.5% more than expected.\nSee the ",(0,n.jsx)(t.a,{href:"https://docs.optimism.io/stack/transactions/fees#mechanism",children:"Optimism Docs > Transaction Fees"})," for more information about transaction fees."]})]})}function d(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},1151:(e,t,s)=>{s.d(t,{Z:()=>r,a:()=>o});var n=s(7294);const i={},a=n.createContext(i);function o(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0eafa1eb.f053d4c8.js b/assets/js/0eafa1eb.f053d4c8.js new file mode 100644 index 000000000..5ddad6286 --- /dev/null +++ b/assets/js/0eafa1eb.f053d4c8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklisk_docs=self.webpackChunklisk_docs||[]).push([[1068],{7553:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var n=s(5893),i=s(1151);const a={title:"Fees",sidebar_position:1,slug:"/fees",description:"Documentation about network fees on Lisk. This page covers details of the two-component cost system involving L2 execution fees and L1 data fees, and offers insights on fee variations and cost-saving strategies.",keywords:["Lisk fees","transaction fees","network fees","Lisk network fees","L2 execution fee","L1 security fee","L1 data fee","transaction costs","gas fees","fee calculation","cost-saving","transaction timing","fee variations","Lisk platform"]},r="Fees",o={id:"about-lisk/fees",title:"Fees",description:"Documentation about network fees on Lisk. This page covers details of the two-component cost system involving L2 execution fees and L1 data fees, and offers insights on fee variations and cost-saving strategies.",source:"@site/docs/about-lisk/fees.md",sourceDirName:"about-lisk",slug:"/fees",permalink:"/lisk-documentation/fees",draft:!1,unlisted:!1,editUrl:"https://github.com/LiskHQ/lisk-documentation/tree/main/docs/about-lisk/fees.md",tags:[],version:"current",sidebarPosition:1,frontMatter:{title:"Fees",sidebar_position:1,slug:"/fees",description:"Documentation about network fees on Lisk. This page covers details of the two-component cost system involving L2 execution fees and L1 data fees, and offers insights on fee variations and cost-saving strategies.",keywords:["Lisk fees","transaction fees","network fees","Lisk network fees","L2 execution fee","L1 security fee","L1 data fee","transaction costs","gas fees","fee calculation","cost-saving","transaction timing","fee variations","Lisk platform"]},sidebar:"documentationSidebar",previous:{title:"Network information, official explorers & faucets",permalink:"/lisk-documentation/network-info"},next:{title:"Building on Lisk",permalink:"/lisk-documentation/category/building-on-lisk"}},c={},l=[{value:"Gas tracker",id:"gas-tracker",level:2},{value:"How are fees on Lisk calculated?",id:"how-are-fees-on-lisk-calculated",level:2},{value:"L2 Execution Fee",id:"l2-execution-fee",level:3},{value:"L2 Execution Fee calculation",id:"l2-execution-fee-calculation",level:4},{value:"L1 Data Fee",id:"l1-data-fee",level:3},{value:"L1 Data Fee calculation",id:"l1-data-fee-calculation",level:4},{value:"EIP-1559 Parameters",id:"eip-1559-parameters",level:2},{value:"How do fluctuations in gas price on Ethereum (L1) affect transaction costs on Lisk (L2)?",id:"how-do-fluctuations-in-gas-price-on-ethereum-l1-affect-transaction-costs-on-lisk-l2",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h1,{id:"fees",children:"Fees"}),"\n",(0,n.jsxs)(t.p,{children:["Fees on Lisk Mainnet are, for the most part, significantly lower than on the L1 Ethereum network.\nThe low transaction fees can be provided because Lisk is a ",(0,n.jsx)(t.a,{href:"https://ethereum.org/en/developers/docs/scaling/optimistic-rollups",children:"Layer 2 optimistic rollup"})," network."]}),"\n",(0,n.jsx)(t.h2,{id:"gas-tracker",children:"Gas tracker"}),"\n",(0,n.jsx)(t.p,{children:"To track the current and past gas fees on Lisk, check the gas tracker for the respective network on Blockscout:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["Lisk Mainnet: ",(0,n.jsx)(t.a,{href:"https://blockscout.lisk.com/gas-tracker",children:"https://blockscout.lisk.com/gas-tracker"})]}),"\n",(0,n.jsxs)(t.li,{children:["Lisk Sepolia Testnet: ",(0,n.jsx)(t.a,{href:"https://sepolia-blockscout.lisk.com/gas-tracker",children:"https://sepolia-blockscout.lisk.com/gas-tracker"})]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"how-are-fees-on-lisk-calculated",children:"How are fees on Lisk calculated?"}),"\n",(0,n.jsxs)(t.p,{children:["Every Lisk Mainnet transaction has two costs: An ",(0,n.jsx)(t.strong,{children:"L2 execution fee"})," and an ",(0,n.jsx)(t.strong,{children:"L1 data fee"}),".\nAt a high level, the L2 fee is the cost to execute your transaction on L2 and the L1 fee is the estimated cost to publish your transaction on L1 (in a rollup batch)."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-text",children:"transaction_fee = l2_execution_fee + l1_data_fee\n"})}),"\n",(0,n.jsx)(t.h3,{id:"l2-execution-fee",children:"L2 Execution Fee"}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.a,{href:"https://docs.optimism.io/stack/transactions/fees#execution-gas-fee",children:"L2 Execution Fee"})," is equal to the amount of gas used by the transaction multiplied by the gas price attached to the transaction."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:"l2_execution_fee = transaction_gas_price * l2_gas_used\n"})}),"\n",(0,n.jsxs)(t.p,{children:["Because Lisk Mainnet is EVM equivalent, the ",(0,n.jsx)(t.strong,{children:"gas used"})," by a transaction on Lisk Mainnet is ",(0,n.jsx)(t.strong,{children:"exactly the same"})," as the gas used by the same transaction on Ethereum.\nIf a transaction costs 100,000 gas units on Ethereum, it will cost 100,000 gas units on Lisk Mainnet.\n",(0,n.jsx)(t.strong,{children:"The only difference is that the gas price on Lisk Mainnet is much lower"})," than the gas price on Ethereum so you'll end up paying much less in ETH.\nThis also means that the total cost of the L2 Execution Fee of a transaction can be estimated using the same tools you would use to estimate the cost of a transaction on Ethereum."]}),"\n",(0,n.jsx)(t.h4,{id:"l2-execution-fee-calculation",children:"L2 Execution Fee calculation"}),"\n",(0,n.jsxs)(t.p,{children:["The transaction gas price is the sum of the ",(0,n.jsx)(t.a,{href:"https://ethereum.org/en/developers/docs/gas/#base-fee",children:"Base Fee"})," and the optional additional ",(0,n.jsx)(t.a,{href:"https://ethereum.org/en/developers/docs/gas/#priority-fee",children:"Priority Fee"}),"."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:"transaction_gas_price = l2_base_fee + l2_priority_fee\n"})}),"\n",(0,n.jsxs)(t.p,{children:["Like Ethereum, Lisk Mainnet uses the ",(0,n.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-1559",children:"EIP-1559"})," mechanism to set the Base Fee for transactions (although with ",(0,n.jsx)(t.a,{href:"#eip-1559-parameters",children:"different parameter values"})," compared to Ethereum)."]}),"\n",(0,n.jsxs)(t.p,{children:["You can read more about how Ethereum's gas fees work over on ",(0,n.jsx)(t.a,{href:"https://ethereum.org/en/developers/docs/gas/",children:"Ethereum.org"}),"."]}),"\n",(0,n.jsx)(t.h3,{id:"l1-data-fee",children:"L1 Data Fee"}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.a,{href:"https://docs.optimism.io/stack/transactions/fees#l1-data-fee",children:"L1 Data Fee"})," is the only part of the Lisk Mainnet transaction fee that differs from the Ethereum transaction fee.\nThis fee arises from the fact that the transaction data for all Lisk Mainnet transactions is published to Ethereum.\nThis guarantees that the transaction data is available for nodes to download and execute."]}),"\n",(0,n.jsx)(t.p,{children:"The L1 Data Fee is automatically charged for any transaction that is included in a Lisk Mainnet block.\nIt is deducted directly from the address that sent the transaction."}),"\n",(0,n.jsx)(t.p,{children:"The L1 Data Fee is most heavily influenced by the Ethereum base fee that is continuously and trustlessly relayed from Ethereum to Lisk Mainnet."}),"\n",(0,n.jsx)(t.p,{children:"The actual amount of this fee depends on the following input values:"}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsxs)(t.li,{children:["The ",(0,n.jsx)(t.strong,{children:"signed transaction"}),", serialized according to the standard Ethereum transaction RLP encoding."]}),"\n",(0,n.jsxs)(t.li,{children:["The ",(0,n.jsx)(t.strong,{children:"current Ethereum base fee"})," and/or blob base fee (trustlessly relayed from Ethereum)."]}),"\n",(0,n.jsxs)(t.li,{children:["Two ",(0,n.jsx)(t.strong,{children:"scalar parameters"})," that independently scale the base fee and blob base fee."]}),"\n"]}),"\n",(0,n.jsx)(t.h4,{id:"l1-data-fee-calculation",children:"L1 Data Fee calculation"}),"\n",(0,n.jsx)(t.p,{children:"The L1 data fee is calculated according to the following formula:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:"l1_data_fee = tx_compressed_size * weighted_gas_price\n"})}),"\n",(0,n.jsxs)(t.p,{children:["Where the ",(0,n.jsx)(t.code,{children:"tx_compressed_size"})," is calculated like this:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:"tx_compressed_size = [(count_zero_bytes(tx_data)*4 + count_non_zero_bytes(tx_data)*16)] / 16\n"})}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.code,{children:"tx_data"})," is the byte representation of the serialized transaction."]}),"\n",(0,n.jsxs)(t.admonition,{type:"note",children:[(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.code,{children:"tx_compressed_size"})," is an estimation of the size that a transaction will occupy in blobs.\nThe divisor of 16 represents the storage savings of using blobs vs calldata."]}),(0,n.jsxs)(t.p,{children:['The "L1 Gas used by txn" field of transaction details in ',(0,n.jsx)(t.a,{href:"https://blockscout.lisk.com/",children:"Blockscout"})," contains the ",(0,n.jsx)(t.code,{children:"tx_compressed_size"})," multiplied by 16 (i.e., the ",(0,n.jsx)(t.code,{children:"calldata"})," size)."]})]}),"\n",(0,n.jsx)(t.p,{children:"Next, the two scalars are applied to the base fee and blob base fee parameters to compute a weighted gas price multiplier."}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{children:"weighted_gas_price = 16*base_fee_scalar*base_fee + blob_base_fee_scalar*blob_base_fee\n"})}),"\n",(0,n.jsx)(t.p,{children:"The current values for the scalars are:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"base_fee_scalar"})," = 0.786381"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"blob_base_fee_scalar"})," = 0.01734"]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"They can be adjusted depending on network conditions, to mitigate spikes in the transaction fees."}),"\n",(0,n.jsxs)(t.admonition,{type:"note",children:[(0,n.jsxs)(t.p,{children:["It is currently ",(0,n.jsx)(t.strong,{children:"not"})," possible to limit the maximum L1 Data Fee that a transaction is willing to pay."]}),(0,n.jsxs)(t.p,{children:["For further information about transaction fees, please check the ",(0,n.jsx)(t.a,{href:"https://docs.optimism.io/stack/transactions/fees",children:"Optimism Developer Docs > Transaction Fees"})]})]}),"\n",(0,n.jsx)(t.h2,{id:"eip-1559-parameters",children:"EIP-1559 Parameters"}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-1559",children:"EIP-1559"})," parameters used by the Lisk Mainnet differ from those used by Ethereum as follows:"]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Parameter"}),(0,n.jsx)(t.th,{style:{textAlign:"right"},children:"Lisk Mainnet value"}),(0,n.jsx)(t.th,{style:{textAlign:"right"},children:"Ethereum value (for reference)"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Block gas limit"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"30,000,000 gas"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"30,000,000 gas"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Block gas target"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"1,500,000 gas"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"15,000,000 gas"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"EIP-1559 elasticity multiplier"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"20"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"2"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"EIP-1559 denominator"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"1,000"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"8"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Maximum base fee increase (per block)"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"1.9%"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"12.5%"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Maximum base fee decrease (per block)"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"0.1%"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"12.5%"})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Block time in seconds"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"2"}),(0,n.jsx)(t.td,{style:{textAlign:"right"},children:"12"})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"how-do-fluctuations-in-gas-price-on-ethereum-l1-affect-transaction-costs-on-lisk-l2",children:"How do fluctuations in gas price on Ethereum (L1) affect transaction costs on Lisk (L2)?"}),"\n",(0,n.jsx)(t.p,{children:"While the L1 Data Fee will be always cheaper compared to posting the transaction directly to the Ethereum mainnet (due to the efficient encoding in batching transactions), its value will vary depending on the amount of transactions on the L1.\nIf the timing of your transaction is flexible, you can save cost by submitting transactions during periods when gas prices on L1 are lower than usual for example, over the weekend."}),"\n",(0,n.jsx)(t.p,{children:"Changes after the transaction is processed on the sequencer do not affect the cost the user pays."}),"\n",(0,n.jsx)(t.p,{children:"For an L2 transaction, the normal process is:"}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsx)(t.li,{children:"The wallet estimates the cost of the transaction and shows it to the user."}),"\n",(0,n.jsx)(t.li,{children:"The user then submits the transaction."}),"\n",(0,n.jsxs)(t.li,{children:["The sequencer processes the transaction in two phases.","\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"First, it processes the transaction."}),"\n",(0,n.jsx)(t.li,{children:"Then, it deducts the gas cost, based on the L1 and L2 gas prices at that time."}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(t.li,{children:"After that, the transaction is written to L1."}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"In principle, between steps 1 and 3 the gas price might change.\nHowever, it can not increase by more than 12.5%, therefore the difference between the price shown to the user in step 1 and the actual one is bounded by 12.5%.\nAfter step 3, the finality of the transaction is Lisk's responsibility.\nIf the L1 gas price spikes, Lisk pays the new cost."}),"\n",(0,n.jsxs)(t.p,{children:["In conclusion, the user will pay at most 12.5% more than expected.\nSee the ",(0,n.jsx)(t.a,{href:"https://docs.optimism.io/stack/transactions/fees#mechanism",children:"Optimism Docs > Transaction Fees"})," for more information about transaction fees."]})]})}function d(e={}){const{wrapper:t}={...(0,i.a)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},1151:(e,t,s)=>{s.d(t,{Z:()=>o,a:()=>r});var n=s(7294);const i={},a=n.createContext(i);function r(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.7a9da80d.js b/assets/js/runtime~main.7d8abcb5.js similarity index 98% rename from assets/js/runtime~main.7a9da80d.js rename to assets/js/runtime~main.7d8abcb5.js index 2a73b4091..b70d9509a 100644 --- a/assets/js/runtime~main.7a9da80d.js +++ b/assets/js/runtime~main.7d8abcb5.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,t,r,d,f={},c={};function b(e){var a=c[e];if(void 0!==a)return a.exports;var t=c[e]={exports:{}};return f[e].call(t.exports,t,t.exports,b),t.exports}b.m=f,e=[],b.O=(a,t,r,d)=>{if(!t){var f=1/0;for(i=0;i=d)&&Object.keys(b.O).every((e=>b.O[e](t[o])))?t.splice(o--,1):(c=!1,d0&&e[i-1][2]>d;i--)e[i]=e[i-1];e[i]=[t,r,d]},b.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return b.d(a,{a:a}),a},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var d=Object.create(null);b.r(d);var f={};a=a||[null,t({}),t([]),t(t)];for(var c=2&r&&e;"object"==typeof c&&!~a.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach((a=>f[a]=()=>e[a]));return f.default=()=>e,b.d(d,f),d},b.d=(e,a)=>{for(var t in a)b.o(a,t)&&!b.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce(((a,t)=>(b.f[t](e,a),a)),[])),b.u=e=>"assets/js/"+({53:"935f2afb",541:"99646cf4",568:"dad52d3b",895:"4984adb1",936:"a8c021bd",1068:"0eafa1eb",1388:"1224f3e7",1425:"d25e57c7",1602:"8c9e01c4",1817:"8b0f9f4a",2e3:"746da5eb",2086:"ad9ad9bc",2184:"6ce766bb",2375:"d9983e98",2672:"5f139d3e",3080:"2e7d4620",3085:"1f391b9e",3206:"f8409a7e",3445:"951748bc",3567:"8bcd76a4",3751:"3720c009",4121:"55960ee5",4195:"c4f5d8e4",4318:"b2059c63",4368:"a94703ab",5379:"f7633811",5469:"9636b8fc",6124:"de80008c",6633:"b04fc419",7195:"79ab6a57",7414:"393be207",7455:"61e03887",7918:"17896441",7920:"1a4e3797",7939:"8d261ba2",8040:"56867589",8518:"a7bd4aaa",8941:"860666a1",9462:"f58537f1",9468:"d38dfec1",9474:"7d66d443",9661:"5e95c892",9799:"6541bca2",9817:"14eb3368",9924:"df203c0f"}[e]||e)+"."+{53:"039cdbdf",325:"4aa58665",541:"69c850bd",568:"77f099aa",895:"ab908f0f",936:"90e138cb",1068:"cb8015db",1388:"585f52dd",1425:"c6521fe2",1426:"1068e9cf",1602:"87ec4313",1772:"62066f4b",1817:"75bea874",2e3:"e35030dc",2086:"2d86a0c1",2184:"09b37bd9",2375:"ad7da2a8",2672:"5e35a007",3080:"4f6415b6",3085:"eba24561",3206:"0b4717e0",3445:"1fdcb201",3567:"286253d8",3751:"b09343e7",4121:"b207ed5a",4195:"5c7484f6",4318:"c16049f6",4368:"0cf77eac",5379:"76d903e5",5469:"f2b77930",6124:"a657de38",6633:"856fbdc6",6945:"5ba1f545",7195:"1212f136",7414:"8b7be79a",7455:"89fab687",7918:"06db4250",7920:"f6ecb664",7939:"3cd1e204",8040:"211deb6b",8518:"88c72ec3",8894:"5fb01b92",8941:"21ccaecb",9462:"74a4d028",9468:"28fd5676",9474:"0012e43f",9661:"f983f3d6",9799:"f87ad16e",9817:"dfc14d8a",9924:"b62c66a4"}[e]+".js",b.miniCssF=e=>{},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r={},d="lisk-docs:",b.l=(e,a,t,f)=>{if(r[e])r[e].push(a);else{var c,o;if(void 0!==t)for(var n=document.getElementsByTagName("script"),i=0;i{c.onerror=c.onload=null,clearTimeout(s);var d=r[e];if(delete r[e],c.parentNode&&c.parentNode.removeChild(c),d&&d.forEach((e=>e(t))),a)return a(t)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=l.bind(null,c.onerror),c.onload=l.bind(null,c.onload),o&&document.head.appendChild(c)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.p="/lisk-documentation/",b.gca=function(e){return e={17896441:"7918",56867589:"8040","935f2afb":"53","99646cf4":"541",dad52d3b:"568","4984adb1":"895",a8c021bd:"936","0eafa1eb":"1068","1224f3e7":"1388",d25e57c7:"1425","8c9e01c4":"1602","8b0f9f4a":"1817","746da5eb":"2000",ad9ad9bc:"2086","6ce766bb":"2184",d9983e98:"2375","5f139d3e":"2672","2e7d4620":"3080","1f391b9e":"3085",f8409a7e:"3206","951748bc":"3445","8bcd76a4":"3567","3720c009":"3751","55960ee5":"4121",c4f5d8e4:"4195",b2059c63:"4318",a94703ab:"4368",f7633811:"5379","9636b8fc":"5469",de80008c:"6124",b04fc419:"6633","79ab6a57":"7195","393be207":"7414","61e03887":"7455","1a4e3797":"7920","8d261ba2":"7939",a7bd4aaa:"8518","860666a1":"8941",f58537f1:"9462",d38dfec1:"9468","7d66d443":"9474","5e95c892":"9661","6541bca2":"9799","14eb3368":"9817",df203c0f:"9924"}[e]||e,b.p+b.u(e)},(()=>{var e={1303:0,532:0};b.f.j=(a,t)=>{var r=b.o(e,a)?e[a]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^(1303|532)$/.test(a))e[a]=0;else{var d=new Promise(((t,d)=>r=e[a]=[t,d]));t.push(r[2]=d);var f=b.p+b.u(a),c=new Error;b.l(f,(t=>{if(b.o(e,a)&&(0!==(r=e[a])&&(e[a]=void 0),r)){var d=t&&("load"===t.type?"missing":t.type),f=t&&t.target&&t.target.src;c.message="Loading chunk "+a+" failed.\n("+d+": "+f+")",c.name="ChunkLoadError",c.type=d,c.request=f,r[1](c)}}),"chunk-"+a,a)}},b.O.j=a=>0===e[a];var a=(a,t)=>{var r,d,f=t[0],c=t[1],o=t[2],n=0;if(f.some((a=>0!==e[a]))){for(r in c)b.o(c,r)&&(b.m[r]=c[r]);if(o)var i=o(b)}for(a&&a(t);n{"use strict";var e,a,t,r,d,f={},c={};function b(e){var a=c[e];if(void 0!==a)return a.exports;var t=c[e]={exports:{}};return f[e].call(t.exports,t,t.exports,b),t.exports}b.m=f,e=[],b.O=(a,t,r,d)=>{if(!t){var f=1/0;for(i=0;i=d)&&Object.keys(b.O).every((e=>b.O[e](t[o])))?t.splice(o--,1):(c=!1,d0&&e[i-1][2]>d;i--)e[i]=e[i-1];e[i]=[t,r,d]},b.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return b.d(a,{a:a}),a},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var d=Object.create(null);b.r(d);var f={};a=a||[null,t({}),t([]),t(t)];for(var c=2&r&&e;"object"==typeof c&&!~a.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach((a=>f[a]=()=>e[a]));return f.default=()=>e,b.d(d,f),d},b.d=(e,a)=>{for(var t in a)b.o(a,t)&&!b.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce(((a,t)=>(b.f[t](e,a),a)),[])),b.u=e=>"assets/js/"+({53:"935f2afb",541:"99646cf4",568:"dad52d3b",895:"4984adb1",936:"a8c021bd",1068:"0eafa1eb",1388:"1224f3e7",1425:"d25e57c7",1602:"8c9e01c4",1817:"8b0f9f4a",2e3:"746da5eb",2086:"ad9ad9bc",2184:"6ce766bb",2375:"d9983e98",2672:"5f139d3e",3080:"2e7d4620",3085:"1f391b9e",3206:"f8409a7e",3445:"951748bc",3567:"8bcd76a4",3751:"3720c009",4121:"55960ee5",4195:"c4f5d8e4",4318:"b2059c63",4368:"a94703ab",5379:"f7633811",5469:"9636b8fc",6124:"de80008c",6633:"b04fc419",7195:"79ab6a57",7414:"393be207",7455:"61e03887",7918:"17896441",7920:"1a4e3797",7939:"8d261ba2",8040:"56867589",8518:"a7bd4aaa",8941:"860666a1",9462:"f58537f1",9468:"d38dfec1",9474:"7d66d443",9661:"5e95c892",9799:"6541bca2",9817:"14eb3368",9924:"df203c0f"}[e]||e)+"."+{53:"039cdbdf",325:"4aa58665",541:"69c850bd",568:"77f099aa",895:"ab908f0f",936:"90e138cb",1068:"f053d4c8",1388:"585f52dd",1425:"c6521fe2",1426:"1068e9cf",1602:"87ec4313",1772:"62066f4b",1817:"75bea874",2e3:"e35030dc",2086:"2d86a0c1",2184:"09b37bd9",2375:"ad7da2a8",2672:"5e35a007",3080:"4f6415b6",3085:"eba24561",3206:"0b4717e0",3445:"1fdcb201",3567:"286253d8",3751:"b09343e7",4121:"b207ed5a",4195:"5c7484f6",4318:"c16049f6",4368:"0cf77eac",5379:"76d903e5",5469:"f2b77930",6124:"a657de38",6633:"856fbdc6",6945:"5ba1f545",7195:"1212f136",7414:"8b7be79a",7455:"89fab687",7918:"06db4250",7920:"f6ecb664",7939:"3cd1e204",8040:"211deb6b",8518:"88c72ec3",8894:"5fb01b92",8941:"21ccaecb",9462:"74a4d028",9468:"28fd5676",9474:"0012e43f",9661:"f983f3d6",9799:"f87ad16e",9817:"dfc14d8a",9924:"b62c66a4"}[e]+".js",b.miniCssF=e=>{},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r={},d="lisk-docs:",b.l=(e,a,t,f)=>{if(r[e])r[e].push(a);else{var c,o;if(void 0!==t)for(var n=document.getElementsByTagName("script"),i=0;i{c.onerror=c.onload=null,clearTimeout(s);var d=r[e];if(delete r[e],c.parentNode&&c.parentNode.removeChild(c),d&&d.forEach((e=>e(t))),a)return a(t)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=l.bind(null,c.onerror),c.onload=l.bind(null,c.onload),o&&document.head.appendChild(c)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.p="/lisk-documentation/",b.gca=function(e){return e={17896441:"7918",56867589:"8040","935f2afb":"53","99646cf4":"541",dad52d3b:"568","4984adb1":"895",a8c021bd:"936","0eafa1eb":"1068","1224f3e7":"1388",d25e57c7:"1425","8c9e01c4":"1602","8b0f9f4a":"1817","746da5eb":"2000",ad9ad9bc:"2086","6ce766bb":"2184",d9983e98:"2375","5f139d3e":"2672","2e7d4620":"3080","1f391b9e":"3085",f8409a7e:"3206","951748bc":"3445","8bcd76a4":"3567","3720c009":"3751","55960ee5":"4121",c4f5d8e4:"4195",b2059c63:"4318",a94703ab:"4368",f7633811:"5379","9636b8fc":"5469",de80008c:"6124",b04fc419:"6633","79ab6a57":"7195","393be207":"7414","61e03887":"7455","1a4e3797":"7920","8d261ba2":"7939",a7bd4aaa:"8518","860666a1":"8941",f58537f1:"9462",d38dfec1:"9468","7d66d443":"9474","5e95c892":"9661","6541bca2":"9799","14eb3368":"9817",df203c0f:"9924"}[e]||e,b.p+b.u(e)},(()=>{var e={1303:0,532:0};b.f.j=(a,t)=>{var r=b.o(e,a)?e[a]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^(1303|532)$/.test(a))e[a]=0;else{var d=new Promise(((t,d)=>r=e[a]=[t,d]));t.push(r[2]=d);var f=b.p+b.u(a),c=new Error;b.l(f,(t=>{if(b.o(e,a)&&(0!==(r=e[a])&&(e[a]=void 0),r)){var d=t&&("load"===t.type?"missing":t.type),f=t&&t.target&&t.target.src;c.message="Loading chunk "+a+" failed.\n("+d+": "+f+")",c.name="ChunkLoadError",c.type=d,c.request=f,r[1](c)}}),"chunk-"+a,a)}},b.O.j=a=>0===e[a];var a=(a,t)=>{var r,d,f=t[0],c=t[1],o=t[2],n=0;if(f.some((a=>0!==e[a]))){for(r in c)b.o(c,r)&&(b.m[r]=c[r]);if(o)var i=o(b)}for(a&&a(t);n Deploying an ERC-20 Token to Lisk | Lisk Documentation - + diff --git a/building-on-lisk/add-token-to-lisk/custom-token.html b/building-on-lisk/add-token-to-lisk/custom-token.html index 350b17d34..84cc2117a 100644 --- a/building-on-lisk/add-token-to-lisk/custom-token.html +++ b/building-on-lisk/add-token-to-lisk/custom-token.html @@ -5,7 +5,7 @@ Deploying a custom token | Lisk Documentation - + diff --git a/building-on-lisk/add-token-to-lisk/standard-token.html b/building-on-lisk/add-token-to-lisk/standard-token.html index e98ad9df3..a621ae9d4 100644 --- a/building-on-lisk/add-token-to-lisk/standard-token.html +++ b/building-on-lisk/add-token-to-lisk/standard-token.html @@ -5,7 +5,7 @@ Deploying a standard token | Lisk Documentation - + diff --git a/building-on-lisk/deploying-smart-contract/with-Foundry.html b/building-on-lisk/deploying-smart-contract/with-Foundry.html index a108a85e2..83880cefd 100644 --- a/building-on-lisk/deploying-smart-contract/with-Foundry.html +++ b/building-on-lisk/deploying-smart-contract/with-Foundry.html @@ -5,7 +5,7 @@ ... with Foundry | Lisk Documentation - + diff --git a/building-on-lisk/deploying-smart-contract/with-Hardhat.html b/building-on-lisk/deploying-smart-contract/with-Hardhat.html index 73238d2ec..43a615f95 100644 --- a/building-on-lisk/deploying-smart-contract/with-Hardhat.html +++ b/building-on-lisk/deploying-smart-contract/with-Hardhat.html @@ -5,7 +5,7 @@ ... with Hardhat | Lisk Documentation - + diff --git a/building-on-lisk/deploying-smart-contract/with-thirdweb.html b/building-on-lisk/deploying-smart-contract/with-thirdweb.html index 75f7eef79..d128c039f 100644 --- a/building-on-lisk/deploying-smart-contract/with-thirdweb.html +++ b/building-on-lisk/deploying-smart-contract/with-thirdweb.html @@ -5,7 +5,7 @@ ... with thirdweb | Lisk Documentation - + diff --git a/building-on-lisk/interacting-with-the-blockchain/ethers.html b/building-on-lisk/interacting-with-the-blockchain/ethers.html index 1a6760f71..38dcb587e 100644 --- a/building-on-lisk/interacting-with-the-blockchain/ethers.html +++ b/building-on-lisk/interacting-with-the-blockchain/ethers.html @@ -5,7 +5,7 @@ ...with ethers.js | Lisk Documentation - + diff --git a/building-on-lisk/interacting-with-the-blockchain/web3.html b/building-on-lisk/interacting-with-the-blockchain/web3.html index 34287a78e..c2c2f6de4 100644 --- a/building-on-lisk/interacting-with-the-blockchain/web3.html +++ b/building-on-lisk/interacting-with-the-blockchain/web3.html @@ -5,7 +5,7 @@ ...with web3.js | Lisk Documentation - + diff --git a/building-on-lisk/migration-guide.html b/building-on-lisk/migration-guide.html index 05007e87e..3604a3d81 100644 --- a/building-on-lisk/migration-guide.html +++ b/building-on-lisk/migration-guide.html @@ -5,7 +5,7 @@ Lisk L1->L2 migration guide | Lisk Documentation - + diff --git a/building-on-lisk/run-a-lisk-node.html b/building-on-lisk/run-a-lisk-node.html index 22fdbb1b3..5ff07df48 100644 --- a/building-on-lisk/run-a-lisk-node.html +++ b/building-on-lisk/run-a-lisk-node.html @@ -5,7 +5,7 @@ Running a Lisk Node | Lisk Documentation - + diff --git a/category/building-on-lisk.html b/category/building-on-lisk.html index f3033093e..610705243 100644 --- a/category/building-on-lisk.html +++ b/category/building-on-lisk.html @@ -5,7 +5,7 @@ Building on Lisk | Lisk Documentation - + diff --git a/category/governance.html b/category/governance.html index 259ee879c..44c0f47e9 100644 --- a/category/governance.html +++ b/category/governance.html @@ -5,7 +5,7 @@ Governance | Lisk Documentation - + diff --git a/contracts.html b/contracts.html index 2bf7b0f19..e7e546576 100644 --- a/contracts.html +++ b/contracts.html @@ -5,7 +5,7 @@ Contracts | Lisk Documentation - + diff --git a/docs.html b/docs.html index 3e37c2bbf..03b2c740b 100644 --- a/docs.html +++ b/docs.html @@ -5,7 +5,7 @@ Introduction to Lisk | Lisk Documentation - + diff --git a/fees.html b/fees.html index a00327e17..9c31e81ea 100644 --- a/fees.html +++ b/fees.html @@ -5,7 +5,7 @@ Fees | Lisk Documentation - + @@ -46,7 +46,7 @@

L1 Data FeeThe L1 Data Fee is most heavily influenced by the Ethereum base fee that is continuously and trustlessly relayed from Ethereum to Lisk Mainnet.

The actual amount of this fee depends on the following input values:

    -
  1. The signed transaction is serialized according to the standard Ethereum transaction RLP encoding.
  2. +
  3. The signed transaction, serialized according to the standard Ethereum transaction RLP encoding.
  4. The current Ethereum base fee and/or blob base fee (trustlessly relayed from Ethereum).
  5. Two scalar parameters that independently scale the base fee and blob base fee.
@@ -55,11 +55,12 @@

L1 D
l1_data_fee = tx_compressed_size * weighted_gas_price

Where the tx_compressed_size is calculated like this:

tx_compressed_size = [(count_zero_bytes(tx_data)*4 + count_non_zero_bytes(tx_data)*16)] / 16
+

tx_data is the byte representation of the serialized transaction.

Next, the two scalars are applied to the base fee and blob base fee parameters to compute a weighted gas price multiplier.

weighted_gas_price = 16*base_fee_scalar*base_fee + blob_base_fee_scalar*blob_base_fee
-

The default values for the scalars are:

+

The current values for the scalars are:

  • base_fee_scalar = 0.786381
  • blob_base_fee_scalar = 0.01734
  • diff --git a/governance/delegation.html b/governance/delegation.html index 3c91c2ea2..8f1102c85 100644 --- a/governance/delegation.html +++ b/governance/delegation.html @@ -5,7 +5,7 @@ Delegation | Lisk Documentation - + diff --git a/governance/overview.html b/governance/overview.html index 358b8c7bc..a4927e5f2 100644 --- a/governance/overview.html +++ b/governance/overview.html @@ -5,7 +5,7 @@ Overview | Lisk Documentation - + diff --git a/governance/proposal-lifecycle.html b/governance/proposal-lifecycle.html index 6ef5db3a1..3b12cb323 100644 --- a/governance/proposal-lifecycle.html +++ b/governance/proposal-lifecycle.html @@ -5,7 +5,7 @@ Proposal Lifecycle | Lisk Documentation - + diff --git a/index.html b/index.html index 543ab87e8..70195a5e9 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Hello from Lisk Documentation | Lisk Documentation - + diff --git a/interacting-with-blockchain/viem.html b/interacting-with-blockchain/viem.html index 7fc15bce0..a48a7bdfd 100644 --- a/interacting-with-blockchain/viem.html +++ b/interacting-with-blockchain/viem.html @@ -5,7 +5,7 @@ ...with viem | Lisk Documentation - + diff --git a/lisk-l1/legacy-chain-service.html b/lisk-l1/legacy-chain-service.html index c9b70bfdf..4dc023fc4 100644 --- a/lisk-l1/legacy-chain-service.html +++ b/lisk-l1/legacy-chain-service.html @@ -5,7 +5,7 @@ Legacy Chain Service | Lisk Documentation - + diff --git a/lisk-tools/api-providers.html b/lisk-tools/api-providers.html index bba992b8f..c86d198e1 100644 --- a/lisk-tools/api-providers.html +++ b/lisk-tools/api-providers.html @@ -5,7 +5,7 @@ API Providers | Lisk Documentation - + diff --git a/lisk-tools/bridges.html b/lisk-tools/bridges.html index 02aaec027..efe49d31e 100644 --- a/lisk-tools/bridges.html +++ b/lisk-tools/bridges.html @@ -5,7 +5,7 @@ Bridges | Lisk Documentation - + diff --git a/lisk-tools/indexers.html b/lisk-tools/indexers.html index 668af951f..2b2e0b5c3 100644 --- a/lisk-tools/indexers.html +++ b/lisk-tools/indexers.html @@ -5,7 +5,7 @@ Data Indexers | Lisk Documentation - + diff --git a/lisk-tools/oracles.html b/lisk-tools/oracles.html index 47e4d2ca9..46a3b2fc4 100644 --- a/lisk-tools/oracles.html +++ b/lisk-tools/oracles.html @@ -5,7 +5,7 @@ Oracles | Lisk Documentation - + diff --git a/lisk-tools/utilities.html b/lisk-tools/utilities.html index 82125a2a1..bd96ca2d3 100644 --- a/lisk-tools/utilities.html +++ b/lisk-tools/utilities.html @@ -5,7 +5,7 @@ Utilities | Lisk Documentation - + diff --git a/markdown-page.html b/markdown-page.html index 0b1a574fa..bfd3eaadd 100644 --- a/markdown-page.html +++ b/markdown-page.html @@ -5,7 +5,7 @@ Markdown page example | Lisk Documentation - + diff --git a/network-info.html b/network-info.html index 134a9cbb1..a387ba89e 100644 --- a/network-info.html +++ b/network-info.html @@ -5,7 +5,7 @@ Network information, official explorers & faucets | Lisk Documentation - + diff --git a/search.html b/search.html index 8bae09c21..e3a08bf31 100644 --- a/search.html +++ b/search.html @@ -5,7 +5,7 @@ Search the documentation | Lisk Documentation - + diff --git a/tags.html b/tags.html index 7c3d1a64d..2f29b4595 100644 --- a/tags.html +++ b/tags.html @@ -5,7 +5,7 @@ Tags | Lisk Documentation - + diff --git a/tags/nodes.html b/tags/nodes.html index 38ab1e66d..643e7a5fe 100644 --- a/tags/nodes.html +++ b/tags/nodes.html @@ -5,7 +5,7 @@ One doc tagged with "nodes" | Lisk Documentation - + diff --git a/user.html b/user.html index 87fb32e45..eab6bc4c5 100644 --- a/user.html +++ b/user.html @@ -5,7 +5,7 @@ Overview | Lisk Documentation - + diff --git a/user/connecting-to-a-wallet.html b/user/connecting-to-a-wallet.html index a260dea1c..49a023d91 100644 --- a/user/connecting-to-a-wallet.html +++ b/user/connecting-to-a-wallet.html @@ -5,7 +5,7 @@ Connecting to a wallet | Lisk Documentation - +