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

FunctionGas Usage
burn16,141
cancel65,381
renounce27,721
createWithDurationsLL (Broker fee set) (cliff not set)138,649
createWithDurationsLL (Broker fee not set) (cliff not set)122,287
createWithDurationsLL (Broker fee set) (cliff set)169,335
createWithDurationsLL (Broker fee not set) (cliff set)164,278
createWithTimestampsLL (Broker fee set) (cliff not set)125,100
createWithTimestampsLL (Broker fee not set) (cliff not set)120,038
createWithTimestampsLL (Broker fee set) (cliff set)169,682
createWithTimestampsLL (Broker fee not set) (cliff set)164,614
withdraw (After End Time) (by Recipient)33,179
withdraw (Before End Time) (by Recipient)23,303
withdraw (After End Time) (by Anyone)29,561
withdraw (Before End Time) (by Anyone)22,815

Dynamic Stream

FunctionGas Usage
burn16,141
cancel65,381
renounce27,721
createWithDurationsLD (2 segments) (Broker fee set)216,788
createWithDurationsLD (2 segments) (Broker fee not set)200,461
createWithTimestampsLD (2 segments) (Broker fee set)197,652
createWithTimestampsLD (2 segments) (Broker fee not set)192,627
withdraw (2 segments) (After End Time) (by Recipient)23,885
withdraw (2 segments) (Before End Time) (by Recipient)29,903
withdraw (2 segments) (After End Time) (by Anyone)19,175
withdraw (2 segments) (Before End Time) (by Anyone)29,992
createWithDurationsLD (10 segments) (Broker fee set)422,199
createWithDurationsLD (10 segments) (Broker fee not set)417,189
createWithTimestampsLD (10 segments) (Broker fee set)402,125
createWithTimestampsLD (10 segments) (Broker fee not set)397,126
withdraw (10 segments) (After End Time) (by Recipient)24,167
withdraw (10 segments) (Before End Time) (by Recipient)37,190
withdraw (10 segments) (After End Time) (by Anyone)24,278
withdraw (10 segments) (Before End Time) (by Anyone)37,279
createWithDurationsLD (100 segments) (Broker fee set)2,898,563
createWithDurationsLD (100 segments) (Broker fee not set)2,894,573
createWithTimestampsLD (100 segments) (Broker fee set)2,706,641
createWithTimestampsLD (100 segments) (Broker fee not set)2,702,660
withdraw (100 segments) (After End Time) (by Recipient)81,920
withdraw (100 segments) (Before End Time) (by Recipient)119,603
withdraw (100 segments) (After End Time) (by Anyone)82,009
withdraw (100 segments) (Before End Time) (by Anyone)119,692

Tranched Stream

FunctionGas Usage
burn16,141
cancel65,381
renounce27,721
createWithDurationsLT (2 tranches) (Broker fee set)215,994
createWithDurationsLT (2 tranches) (Broker fee not set)199,665
createWithTimestampsLT (2 tranches) (Broker fee set)196,988
createWithTimestampsLT (2 tranches) (Broker fee not set)191,964
withdraw (2 tranches) (After End Time) (by Recipient)23,599
withdraw (2 tranches) (Before End Time) (by Recipient)18,503
withdraw (2 tranches) (After End Time) (by Anyone)18,889
withdraw (2 tranches) (Before End Time) (by Anyone)18,592
createWithDurationsLT (10 tranches) (Broker fee set)414,411
createWithDurationsLT (10 tranches) (Broker fee not set)409,394
createWithTimestampsLT (10 tranches) (Broker fee set)397,045
createWithTimestampsLT (10 tranches) (Broker fee not set)392,026
withdraw (10 tranches) (After End Time) (by Recipient)23,318
withdraw (10 tranches) (Before End Time) (by Recipient)25,403
withdraw (10 tranches) (After End Time) (by Anyone)23,427
withdraw (10 tranches) (Before End Time) (by Anyone)25,492
createWithDurationsLT (100 tranches) (Broker fee set)2,808,652
createWithDurationsLT (100 tranches) (Broker fee not set)2,804,166
createWithTimestampsLT (100 tranches) (Broker fee set)2,649,659
createWithTimestampsLT (100 tranches) (Broker fee not set)2,645,177
withdraw (100 tranches) (After End Time) (by Recipient)74,530
withdraw (100 tranches) (Before End Time) (by Recipient)103,255
withdraw (100 tranches) (After End Time) (by Anyone)74,619
withdraw (100 tranches) (Before End Time) (by Anyone)103,344