Periphery contracts #74
Replies: 14 comments 4 replies
-
Later edit: see my next message
We can leave them as backlog for the time being. The periphery is a public repo and we want to keep these new contracts design private. |
Beta Was this translation helpful? Give feedback.
-
We will implement the periphery contracts for OE in this repo, since we also agreed on sablier-labs/v2-core#808 |
Beta Was this translation helpful? Give feedback.
-
Based on the rationale from the An advantage of this approach is that for functions like |
Beta Was this translation helpful? Give feedback.
-
@smol-ninja @PaulRBerg tagging you here to make a decision on the above comment |
Beta Was this translation helpful? Give feedback.
-
I agree with your point. None of these functions would have additional logic other than just batching calls to core functions. So I am in favour of having them as a part of |
Beta Was this translation helpful? Give feedback.
-
Not able to review at the moment, unfortunately. Will review when I do a full review of this repo later. |
Beta Was this translation helpful? Give feedback.
-
For |
Beta Was this translation helpful? Give feedback.
-
I would go with option 2 as well. Very unlikely that someone would want to create streams with different assets. |
Beta Was this translation helpful? Give feedback.
-
I may have misunderstood things but, while this conversation refers to only 4 methods, #55 hints at completely removing the idea of a Batch Periphery. While I haven't looked enough at the open-ended code, my comments are the following (from the perspective of a client-side integrator):
At the same time, the periphery is meant to be hot-swapped in case we need to (1) fix something or (2) add functionality, while the core contracts (being more state-oriented) can keep working and accruing streams. I would however like to hear again all the advantages of merging these two, if that was indeed what this conversation was describing. |
Beta Was this translation helpful? Give feedback.
-
From my perspective, all started when I made the proposal of moving the Both @PaulRBerg @smol-ninja have said that it wouldn't be needed since the contracts haven't reached the maximum contract size limit. Then, with my comment I suggest to apply the same rational that has been presented to me into that discussion here in this repo (if we don't reach the maximum contract size limit we don't need to add a separate
The main advantage IMO is that we don't need to perform multiple
flowchart LR
creator("Creator") -->|createMultiple| batchContract("Batch Contract")
batchContract --> |transferFrom once| creator
batchContract -->|calls create multiple times| openEndedContract("Open Ended Contract")
openEndedContract --> |transferFrom multiple time| batchContract
classDef default fill:#f9f,stroke:#333,stroke-width:2px;
class creator,batchContract,openEndedContract default;
flowchart LR
caller("Caller") -->|withdrawMultiple| batchContract("Batch Contract")
batchContract -->|calls create multiple times| openEndedContract("Open Ended Contract")
openEndedContract --> |transfer multiple times to| recipient("Recipient")
classDef default fill:#f9f,stroke:#333,stroke-width:2px;
class creator,batchContract,openEndedContract default;
At the same time, having multiple contracts may make integration more challenging, given the complexity of dealing with several contracts, along with higher maintenance costs on our side. IMO, there are good arguments for both options. Wdyt? |
Beta Was this translation helpful? Give feedback.
-
@andreivladbrg I think there should be some correction in your diagram.
Correct me here if I am wrong. Having said that, since it only affects deposits, I agree with the your point that the cost of maintaining the codebase increases if we combine batch and core contracts, even if the contract size is well below the limit. In the original discussions, we only anticipated 4 batch functions but now it seems like the list has grown to several of them. In Lockup contracts, we only use batch for create-multiple streams. In OE, we can use for several actions as we have discussed. We can experiment with different batch functions, frequently release newer versions based on user requirements without affecting core logic. And this has changed my mind about merging periphery and core in OE. |
Beta Was this translation helpful? Give feedback.
-
yeah, correct
the only functions that can be in a separate contract are: |
Beta Was this translation helpful? Give feedback.
-
I've caught up with all comments here. My thoughts: This appears to be one of those nasty situations in which there is no clearly superior solution. I suggesting going with a separate Batch contract - not because I think it's clearly better than a merging approach, but because making decisions quickly is important. P.S. we should be cognizant of decision fatigue. |
Beta Was this translation helpful? Give feedback.
-
Should we close this, since we agreed on having a |
Beta Was this translation helpful? Give feedback.
-
Minimum Viable Features (MVF):
Refer #7
Beta Was this translation helpful? Give feedback.
All reactions