Replies: 5 comments 2 replies
-
Live update on the cost of deploying a PRBPRoxy today (base gas price at 22 gwei): Completely doable IMO, given our emphasis on batch stream creation in V2 and our targeting of DAOs and organizations. Smaller players resort to non-mainnet chains, anyway. Also, the future of Ethereum is rollup-centric. |
Beta Was this translation helpful? Give feedback.
-
I admire the improvements a proxy would bring to our architecture. It's both a short term solution to achieve our bundled transactions, and a long term investment. Thinking that maybe airstreams will benefit from it, plus other Sablier v2.X contracts later on. The biggest costs at the moment would be: re-engineering the client stack with the new "proxy" actor, the gas costs for the user and the complexity it may add for integrators. All bearable, but I still need to map the first and the last one out more thoroughly before I give my educated opinion. Note: haven't read all the points in your original post yet. Out of curiosity, in the meantime: Let's say we do have the proxy system (in the app as well) and educate our users about it. Would supporting it in the contracts completely break compatibility with EOA senders, or just limit their powers (e.g. no cancel-and-create). My thinking here is possibly maintaining a low-cost/low-maintenance alternative in parallel with the proxy. |
Beta Was this translation helpful? Give feedback.
-
I do think the usage of proxy comes with great benefits, I especially like the future migration part. Also if we are able to allow users to use the core functionalities without the proxy, the extra costs will exist just for the users that want or need extra functionalities like cancelAndCreate and I think that is fair. The consumer education will become very important here IMO. Unfortunately I am not sure how long it will. take to implement all this changes at interface level, and I think this is a very important point. |
Beta Was this translation helpful? Give feedback.
-
Some food for thought for what can be built with the recently implemented plugin system in PRBProxy In our case, the proxy plugins will be super helpful to let senders react more elaborately to cancelations (via the callback system we already got). PRBProxy makes it possible to not have to explicitly implement the This is feedback coming from 0xJohannes, one of the lead devs of BarnBridge. Cc @razgraf, @andreivladbrg. |
Beta Was this translation helpful? Give feedback.
-
Closing, as we're deep down the proxy rabbit hole. |
Beta Was this translation helpful? Give feedback.
-
Problem Situation
It is not possible to batch multiple function calls in one Ethereum transaction. This limitation might be lifted when Account Abstraction gets added at the protocol level, but AA will take years to be implemented. Solutions like PRBProxy and DSProxy have emerged as interim solutions to this current limitation of the Ethereum protocol.
Internally, we have toyed with the prospect of using the proxy approach for quite some time now, but we have decided to let go of it in a recent discussion. The rationale was that the proxy was unnecessary for the batch create function.
However, more recent discussions have led us to realize that other features may only be implemented with a proxy mechanism, or it would be much easier to implement them with a proxy. For instance, see the discussion in sablier-labs/v2-core#331 regarding stream edits, which can only be implemented in the existing contracts by having a function that batches a call to
cancel
and a call to a create function. I have recently opened a draft PR that takes a first stab at implementing this inv2-core
, but I have done it somewhat grudgingly. Stuffing too much logic in the "core" contracts gnaws away the underlying reason why we named the way we did. Composing functions doesn't sound like something belonging to a "core". Thus, I think we have a "crisis of identity" in thev2-core
repository, and my goal with this post is to have us re-consider the proxy approach.Feature Table
Some features can easily be implemented without the proxy, others can be implemented without the proxy but require us to jump through hoops, and finally, others can only be implemented with the proxy (while still providing a decent UX to our users).
createMultiple
(single asset)createMultiple
(multiple assets)cancelAndCreate
in the same contractcancelAndCreate
across contractscancelMultipleAndCreateMultiple
in the same contractcancelMultipleAndCreateMultiple
across contractsComparison
Here are the pros and cons of using the proxy approach, ordered by significance (the most significant points are at the top).
Pros
wrapEthAndDoAction
functions (see this example from the Hifi repository).Permit2
.cancelAll
function could be moved to a proxy target (the recipient would lose access to this function, but this sounds okay with me, given the benefit of a cleaner core).cancelAndCreate
functions could be implemented in a proxy target.BatchStream
periphery contract would become a proxy target, and we may also be able to use the proxy approach for the airstream contract.Cons
execute
function of the proxy itself. Still, since the proxy has many users, we would get some shared security.Sender vs Recipient
To avoid doubt, I wish to state that the discussion here applies only to senders. It is not practical to use the proxy approach for recipients, due to the following reasons:
My Proposal
Given that so many features are impossible to implement without the proxy, and others are difficult to implement without it, I am now firmly in favor of using the proxy approach. The pros outweigh the cons. If Maker, Balancer, and DeFiSaver managed to get away with it (in spite of the cons), we should be able to do it, too.
@razgraf and @gavriliumircea - I am keen to hear your thoughts on this.
Beta Was this translation helpful? Give feedback.
All reactions