The mechanism
Deposit, stream, claim: the three steps and why they are ordered this way.
| Property | Value |
|---|---|
| name | mechanism |
| functions | deposit(), claim(to), syncSurplus() |
| time base | block.timestamp (block.number is an L1 estimate on this chain) |
1. Deposit
Anyone can call deposit() with ETH. The ETH joins a queue for the next epoch. A deposit is limited by a per-deposit cap and a cap on everything not yet claimed, both enforced by the contract.
ETH that reaches the contract another way, for example a forced send, is not lost: anyone can call syncSurplus() to queue it like a deposit. It can never be withdrawn.
2. Stream
Epochs have a fixed length set at deployment and count from the deployment time. ETH queued during epoch n is released linearly during epoch n + 1. A new deposit never delays ETH already queued or streaming.
Released ETH is split over eligible supply: total supply minus the balances of excluded addresses. Excluded addresses are contracts such as pools, where holding tokens does not mean a person holds them. Only contracts can be excluded, never a personal wallet.
If nobody is eligible for a while, the ETH released in that time is queued again for the next epoch instead of being lost or handed to the next buyer.
3. Claim
claim(to) sends everything released to the caller so far to the address the caller chooses. It pays only the caller's own amount, so copying someone's call cannot redirect their ETH. Claims cannot be paused by anyone.
Why deposits wait an epoch
If deposits were shared out the moment they arrived, someone could buy just before a large deposit and sell right after. Because each deposit waits and then streams evenly, holding for the stream is the only way to receive it.