Skip to main content

Gas Benchmarks

The gas usage of the Sablier 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 - you shouldn't take them for granted.

V2 Core

Lockup Linear

FunctionGas Usage
burn15,694
cancel56,829
renounce19,381
createWithDurations (Broker fee set) (cliff not set)129,276
createWithDurations (Broker fee not set) (cliff not set)113,680
createWithDurations (Broker fee set) (cliff set)138,071
createWithDurations (Broker fee not set) (cliff set)133,273
createWithTimestamps (Broker fee set) (cliff not set)115,334
createWithTimestamps (Broker fee not set) (cliff not set)110,530
createWithTimestamps (Broker fee set) (cliff set)137,629
createWithTimestamps (Broker fee not set) (cliff set)132,827
withdraw (After End Time) (by Recipient)29,701
withdraw (Before End Time) (by Recipient)19,104
withdraw (After End Time) (by Anyone)24,799
withdraw (Before End Time) (by Anyone)19,002

Lockup Dynamic

FunctionGas Usage
burn15,716
cancel74,341
renounce39,007
createWithDurations (2 segments) (Broker fee set)200,602
createWithDurations (2 segments) (Broker fee not set)185,037
createWithTimestamps (2 segments) (Broker fee set)184,780
createWithTimestamps (2 segments) (Broker fee not set)180,015
withdraw (2 segments) (After End Time) (by Recipient)19,108
withdraw (2 segments) (Before End Time) (by Recipient)27,554
withdraw (2 segments) (After End Time) (by Anyone)14,239
withdraw (2 segments) (Before End Time) (by Anyone)27,485
createWithDurations (10 segments) (Broker fee set)395,084
createWithDurations (10 segments) (Broker fee not set)390,326
createWithTimestamps (10 segments) (Broker fee set)385,125
createWithTimestamps (10 segments) (Broker fee not set)380,375
withdraw (10 segments) (After End Time) (by Recipient)14,295
withdraw (10 segments) (Before End Time) (by Recipient)32,545
withdraw (10 segments) (After End Time) (by Anyone)14,246
withdraw (10 segments) (Before End Time) (by Anyone)32,476
createWithDurations (100 segments) (Broker fee set)2,740,781
createWithDurations (100 segments) (Broker fee not set)2,736,987
createWithTimestamps (100 segments) (Broker fee set)2,642,946
createWithTimestamps (100 segments) (Broker fee not set)2,639,185
withdraw (100 segments) (After End Time) (by Recipient)14,295
withdraw (100 segments) (Before End Time) (by Recipient)88,968
withdraw (100 segments) (After End Time) (by Anyone)14,226
withdraw (100 segments) (Before End Time) (by Anyone)88,899

Lockup Tranched

FunctionGas Usage
burn15,738
cancel63,994
renounce26,501
createWithDurations (2 tranches) (Broker fee set)199,536
createWithDurations (2 tranches) (Broker fee not set)183,969
createWithTimestamps (2 tranches) (Broker fee set)189,410
createWithTimestamps (2 tranches) (Broker fee not set)183,945
withdraw (2 tranches) (After End Time) (by Recipient)20,100
withdraw (2 tranches) (Before End Time) (by Recipient)14,797
withdraw (2 tranches) (After End Time) (by Anyone)15,199
withdraw (2 tranches) (Before End Time) (by Anyone)14,695
createWithDurations (10 tranches) (Broker fee set)388,757
createWithDurations (10 tranches) (Broker fee not set)383,998
createWithTimestamps (10 tranches) (Broker fee set)397,102
createWithTimestamps (10 tranches) (Broker fee not set)391,750
withdraw (10 tranches) (After End Time) (by Recipient)17,855
withdraw (10 tranches) (Before End Time) (by Recipient)19,616
withdraw (10 tranches) (After End Time) (by Anyone)17,760
withdraw (10 tranches) (Before End Time) (by Anyone)19,514
createWithDurations (100 tranches) (Broker fee set)2,672,918
createWithDurations (100 tranches) (Broker fee not set)2,668,643
createWithTimestamps (100 tranches) (Broker fee set)2,738,297
createWithTimestamps (100 tranches) (Broker fee not set)2,734,635
withdraw (100 tranches) (After End Time) (by Recipient)46,746
withdraw (100 tranches) (Before End Time) (by Recipient)73,989
withdraw (100 tranches) (After End Time) (by Anyone)46,644
withdraw (100 tranches) (Before End Time) (by Anyone)73,887

V2 Periphery

Batch Lockup

FunctionLockup TypeSegments/TranchesBatch SizeGas Usage
createWithDurationsLLLockup LinearN/A5771,013
createWithTimestampsLLLockup LinearN/A5732,772
createWithDurationsLDLockup Dynamic2453,951,599
createWithTimestampsLDLockup Dynamic2453,815,274
createWithDurationsLTLockup Tranched2453,862,651
createWithTimestampsLTLockup Tranched2453,744,523
createWithDurationsLLLockup LinearN/A101,417,180
createWithTimestampsLLLockup LinearN/A101,414,247
createWithDurationsLDLockup Dynamic24107,819,165
createWithTimestampsLDLockup Dynamic24107,585,616
createWithDurationsLTLockup Tranched24107,632,114
createWithTimestampsLTLockup Tranched24107,444,115
createWithDurationsLLLockup LinearN/A202,783,510
createWithTimestampsLLLockup LinearN/A202,779,081
createWithDurationsLDLockup Dynamic242015,617,207
createWithTimestampsLDLockup Dynamic242015,131,248
createWithDurationsLTLockup Tranched242015,211,892
createWithTimestampsLTLockup Tranched242014,846,363
createWithDurationsLLLockup LinearN/A304,143,337
createWithTimestampsLLLockup LinearN/A304,148,585
createWithDurationsLDLockup Dynamic243023,460,912
createWithTimestampsLDLockup Dynamic243022,697,560
createWithDurationsLTLockup Tranched243022,794,686
createWithTimestampsLTLockup Tranched243022,267,335
createWithDurationsLLLockup LinearN/A506,871,104
createWithTimestampsLLLockup LinearN/A506,893,797
createWithDurationsLDLockup Dynamic125022,990,726
createWithTimestampsLDLockup Dynamic125022,355,943
createWithDurationsLTLockup Tranched125022,413,554
createWithTimestampsLTLockup Tranched125022,006,169