Segments
Definition
A Lockup Dynamic stream can be composed of multiple segments, which are separate partitions with different streaming amount and rates. The protocol uses these segments to enable custom streaming curves, which power exponential streams, cliff streams, etc.
Requirements
The sum of all segment amounts must equal the deposit amount.
There is a limit to how many segments there can be in a stream, and that is 300 segments. This requirement is due to the block gas limit. If it didn't exist and someone created a stream with an excessively large number of segments, the transaction would revert as it wouldn't fit within a block.
The milestones must be sorted in ascending order. It's not possible for the
i-1
th milestone to be greater thani
th milestone (given we are dealing with increasing monotonic functions).
Last updated