Fees on #StarkNet
The idea is to compute the L1 footprint of a transaction, including 2 dimensions:
- computational complexity: the heavier the transaction, the larger its portion in the proof verification cost
- on chain data: L1 call data cost
Let see how it works 🧵
Users can specify the maximum fee they are willing to pay via max_fee field of the transaction.
Fee mechanism: #Computation =
Number of Cairo steps and applications of each builtins, weighted by a vector: CairoResourceFeeWeights
Current weights:
#OnChainData = storage updates + L2 <> L1 messages + deployed contracts
- Storage updates
For each contract: the keys to update and the new values
- L2 <> L1 messages
L2 sender, L1 destination, payload
- Deployed contracts
Contract address, class hash, constructor arguments
It is good to know how fees are computed because it has an impact on the design of your smart contracts. Basically devs can roughly assume that computation is cheap, and storage is more expensive.
Data availability is an important topic, see this great thread from @henrlihenrli:
I am thrilled to announce that I'm joining @StarkWareLtd as #StarkNet Ecosystem Lead.
I will take this role with @GuthL, the pioneer Ecosystem Lead.
Our mission: spurring the growth of a community of developers around #StarkNet.
How I see this and what is my motivation ? 🧵
#mood
First of all, I want to say that I feel with #StarkNet the early vibes of #Ethereum.
The ecosystem is growing fast, and the community is vibrant.
I like to see all this creativity that is coming to StarkNet. I am convinced that we'll see a huge wave of innovation coming.
#bestL1
Ethereum is without any doubt the best settlement layer out there. Its security and decentralization are unmatched among all smart contract L1s. As well as the community of builders is truly awesome, and the research effort is impressive. However...