Skip to main content

Gas Benchmarks

The gas usage of the Lockup protocol is not deterministic and varies by user. Calls to third-party contracts, such as ERC-20 tokens, may use an arbitrary amount of gas. The values in the table below are rough estimations on Ethereum mainnet - you shouldn't take them for granted. The gas usage may vary depending on the network.

Batch Contract

FunctionStream TypeSegments/TranchesBatch SizeGas Usage
createWithDurationsLLLinearN/A5937,003
createWithTimestampsLLLinearN/A5898,916
createWithDurationsLDDynamic2454,123,217
createWithTimestampsLDDynamic2453,895,052
createWithDurationsLTTranched2454,013,105
createWithTimestampsLTTranched2453,822,707
createWithDurationsLLLinearN/A101,740,955
createWithTimestampsLLLinearN/A101,747,416
createWithDurationsLDDynamic24108,202,890
createWithTimestampsLDDynamic24107,741,699
createWithDurationsLTTranched24107,974,447
createWithTimestampsLTTranched24107,597,402
createWithDurationsLLLinearN/A203,433,786
createWithTimestampsLLLinearN/A203,447,467
createWithDurationsLDDynamic242016,380,960
createWithTimestampsLDDynamic242015,440,827
createWithDurationsLTTranched242015,896,070
createWithTimestampsLTTranched242015,152,551
createWithDurationsLLLinearN/A305,125,959
createWithTimestampsLLLinearN/A305,155,292
createWithDurationsLDDynamic243024,603,376
createWithTimestampsLDDynamic243023,157,026
createWithDurationsLTTranched243023,818,565
createWithTimestampsLTTranched243022,725,003
createWithDurationsLLLinearN/A508,532,644
createWithTimestampsLLLinearN/A508,582,221
createWithDurationsLDDynamic125024,275,049
createWithTimestampsLDDynamic125023,058,857
createWithDurationsLTTranched125023,611,123
createWithTimestampsLTTranched125022,718,936

Linear Stream

FunctionConfigurationGas Usage
burnN/A16,141
cancelN/A65,381
renounceN/A27,721
createWithDurationsLLbroker = 0 & cliff = 0122,287
createWithDurationsLLbroker > 0 & cliff = 0138,649
createWithDurationsLLbroker = 0 & cliff > 0164,278
createWithDurationsLLbroker > 0 & cliff > 0169,335
createWithTimestampsLLbroker = 0 & cliff = 0120,038
createWithTimestampsLLbroker > 0 & cliff = 0125,100
createWithTimestampsLLbroker = 0 & cliff > 0164,614
createWithTimestampsLLbroker > 0 & cliff > 0169,682
withdrawendTime < blockTime & msgSender = recipient33,179
withdrawendTime > blockTime & msgSender = recipient23,303
withdrawendTime < blockTime & msgSender != recipient29,561
withdrawendTime > blockTime & msgSender != recipient22,815

Dynamic Stream

FunctionSegmentsConfigurationGas Usage
burnN/AN/A16,141
cancelN/AN/A65,381
renounceN/AN/A27,721
createWithDurationsLD2broker = 0200,461
createWithDurationsLD2broker > 0216,788
createWithTimestampsLD2broker = 0192,627
createWithTimestampsLD2broker > 0197,652
withdraw2endTime < blockTime & msgSender = recipient23,885
withdraw2endTime > blockTime & msgSender = recipient29,903
withdraw2endTime < blockTime & msgSender != recipient19,175
withdraw2endTime > blockTime & msgSender != recipient29,992
createWithDurationsLD10broker = 0417,189
createWithDurationsLD10broker > 0422,199
createWithTimestampsLD10broker = 0397,126
createWithTimestampsLD10broker > 0402,125
withdraw10endTime < blockTime & msgSender = recipient24,167
withdraw10endTime > blockTime & msgSender = recipient37,190
withdraw10endTime < blockTime & msgSender != recipient24,278
withdraw10endTime > blockTime & msgSender != recipient37,279
createWithDurationsLD100broker = 02,894,573
createWithDurationsLD100broker > 02,898,563
createWithTimestampsLD100broker = 02,702,660
createWithTimestampsLD100broker > 02,706,641
withdraw100endTime < blockTime & msgSender = recipient81,920
withdraw100endTime > blockTime & msgSender = recipient119,603
withdraw100endTime < blockTime & msgSender != recipient82,009
withdraw100endTime > blockTime & msgSender != recipient119,692

Tranched Stream

FunctionTranchesConfigurationGas Usage
burnN/AN/A16,141
cancelN/AN/A65,381
renounceN/AN/A27,721
createWithDurationsLT2broker = 0199,665
createWithDurationsLT2broker > 0215,994
createWithTimestampsLT2broker = 0191,964
createWithTimestampsLT2broker > 0196,988
withdraw2endTime < blockTime & msgSender = recipient23,599
withdraw2endTime > blockTime & msgSender = recipient18,503
withdraw2endTime < blockTime & msgSender != recipient18,889
withdraw2endTime > blockTime & msgSender != recipient18,592
createWithDurationsLT10broker = 0409,394
createWithDurationsLT10broker > 0414,411
createWithTimestampsLT10broker = 0392,026
createWithTimestampsLT10broker > 0397,045
withdraw10endTime < blockTime & msgSender = recipient23,318
withdraw10endTime > blockTime & msgSender = recipient25,403
withdraw10endTime < blockTime & msgSender != recipient23,427
withdraw10endTime > blockTime & msgSender != recipient25,492
createWithDurationsLT100broker = 02,804,166
createWithDurationsLT100broker > 02,808,652
createWithTimestampsLT100broker = 02,645,177
createWithTimestampsLT100broker > 02,649,659
withdraw100endTime < blockTime & msgSender = recipient74,530
withdraw100endTime > blockTime & msgSender = recipient103,255
withdraw100endTime < blockTime & msgSender != recipient74,619
withdraw100endTime > blockTime & msgSender != recipient103,344