Replies: 2 comments 1 reply
-
Feedback
(Note: I understand that errors may cause the proxy to retain funds, but this is a bug not a feature we should rely on.)
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem Situation
The cancel function in
v2-core
can be called by either the sender or the recipient:https://github.com/sablierhq/v2-core/blob/3883400911f5ec3a65f7a06deb0320e1835dd5c4/src/SablierV2LockupLinear.sol#L293
On cancellation, funds are auto-transferred to the sender and the recipient. In a non-proxy world, this wasn't an issue since the sender of the stream would receive the tokens in their typical wallet. But with a proxy, this is problematic because the funds would remain in the proxy itself. This is a con of the proxy approach I omitted when I wrote #11.
Solutions
deployAndExecute
in the BUI. This target would install a special plugin, which would implement theISablierV2LockupSender
interface, auto-transferring thesenderAmount
to the proxy owner.My Thoughts
The first option is the easiest, but I am uncomfortable taking the cancel functionality away from recipients. This is in the category of permissionless "escape hatches" that can help prevent accidental losses of funds.
The second option would demand more development cycles from the frontend team, but it would provide our users with a utility that would be super useful to PRBProxy owners.
The third option would be the most elegant, but it would demand more effort from the contracts team. In the UI, little would change; they'd just have to call
deployAndExecute
instead ofdeploy
. The plugin would run autonomously every time a recipient cancels a stream, and the funds would be auto-transferred to the proxy owner.Your Thoughts
WDYT?
Beta Was this translation helpful? Give feedback.
All reactions