Replies: 2 comments
-
Today I thought about this issue and I tend to agree with you on the idea of removing the authorization system. These two are mainly my concern:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Locking, it's been a long time since we removed our custom made authorization system. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduction
My understanding is that we had initially wanted an allowance system similar to ERC-20's transfer approval flow because we thought we need it for our periphery contracts. But does that assumption hold water?
Let's explore the user flow in three cases. I shall assume that Alice wishes to create one $USDC stream toward Bob. What I refer to by "periphery contract" is either a bespoke implementation or an instance of PRBProxy (the logic is the same).
1. Authorization
2. Standard Transfer From
sender
argument to be Alice's address.3. EIP-2612 Permit
This only works with ERC-20 tokens compatible with EIP-2612.
sender
argument to be Alice's address.Conclusion
It turns out that the authorization system is the worst UX of all, because there are 3 separate transactions needed for creating the stream. EIP-2612 permit is the best, but few ERC-20 tokens support it, and the frontend implementation is non-trivial.
The only case that I can think of when the 1st method would be useful is when a DeFi protocol integrates Sablier V2 and, for some reason or another, they would also like their users to create the Sablier streams on their UI. But still, I don't see why they wouldn't go with the 2nd method described above.
Therefore, I would suggest sticking with the standard
transferFrom
flow and completely remove the authorization system from our contracts. It adds undue complexity, which costs time and money (remember we want to audit this). We can still keep a copy of the current logic on an archive branch, for historical purposes.Beta Was this translation helpful? Give feedback.
All reactions