Encode-Club-Solidity-Foundations / Lesson-03

4 stars 7 forks source link

Liquidity Pools Initiation Gas Fees #5

Open andrewfowl opened 2 years ago

andrewfowl commented 2 years ago

I was trying to figure out why the liquidity pool initiation requires very significant amount of gas on most of protocols?

MatheusDaros commented 2 years ago

Hello @andrewfowl The gas usage of every transaction is directly linked with the amount of operations that are being executed by the EVM when running the functions being called. These kind of operations like you mentioned usually involve heavy operations, like deploying contract instances, external calls, storage writes and such, and thus they end up summing huge amounts of gas units per transaction, sometimes almost filling a whole block of data.