sablier-labs / flow

🍃 Smart contracts of the Sablier Flow protocol.
Other
8 stars 0 forks source link

Remove zero address check for sender #198

Closed PaulRBerg closed 2 months ago

PaulRBerg commented 2 months ago

Lockup doesn't check if the sender has a zero address.

To maintain parity between Lockup and Flow, we should remove the check in Flow.

More context here:

https://github.com/sablier-labs/v2-core/discussions/38#discussioncomment-10210887

smol-ninja commented 2 months ago

We should have zero address check on sender. Here is why:

Anybody can accidentally set sender as zero address when creating the stream. In Flow streams, tokens can be deposited by anyone. Now because other functions such as refund, pause etc. are sender only, it would lead to funds getting stuck.

Flow has much more granular control over the stream than Lockup and so a check on sender address is as equally important as a check on the recipient address. Even more because Lockup streams are expected to see an end whereas Flow can be never ending.

Having said that, I think we should also include this check in Lockup.

PaulRBerg commented 2 months ago

Good argument, I am persuaded by it.

Will you please create another issue in Lockup to re-add the zero address check?