Replies: 1 comment 2 replies
-
Thank you for putting all this information in one place!
Given that a new user can only join the subgraph via a stream, I believe we should only take the active streams into account when calculating the Complexity Factor of the subgraph.
Given that the CF will equal 1 for any tx signer who is not a part of a Subgraph, we can say that the Minimum Transaction Fee in SabVM will be 21,000 gas, as well.
I've just looked at how Optimism handles the L2/L1 fees. Basically, it estimates how much persisting your L2 tx on Ethereum will eventually cost (the L1 data fee) - and adds the respective amount of ETH (in a non-negotiable way) to the L2 execution fee (which you can control, by configuring the amount of wei you're willing to pay for each unit of gas). However, I don't understand why you said that this approach "leads to parity with Ethereum (21,000 gas for transferring ETH)". |
Beta Was this translation helpful? Give feedback.
-
Context
This idea was introduced by me here as a solution to @IaroslavMazur's question about whom to charge for the gas-intensive restructuring of subgraphs.
The goal is to come up with a design that distributes the computational cost more equitably across subgraph participants, while not making it prohibitively expensive for any particular user (especially new users).
Spec
Each user is assigned a Complexity Factor$cf$ that is related to the subgraph the user is part of. As a refresher, being part of a subgraph means having an incoming or outgoing streaming rate that is greater than zero.
When calculating the base fee of a user$U$ , the SabVM will perform these steps:
Because the time complexity of traversing subgraphs is linear, the Complexity Factor can also grow linearly. Each new user and each new stream will increase the Complexity Factor by a constant value$0.005$ . Examples:
Notes
Open Problems
Cardinalities
The design proposed herein assumes an SS cardinality. While it should be possible to make this work for Many Subgraphs per Account, more research is needed to validate these alternative designs.
Free Rider
There's a potential 'free rider' concern with users who trigger massive subgraph updates, and then no user submits a follow-up transaction, ever. The SabVM nodes would, in effect, provide a temporary subsidy to the subgraph participants.
However, this sounds low-risk:
Of course, more research and more benchmarking are required to validate these conclusions.
Comments
CC @sablier-labs/sabvm.
Related:
Beta Was this translation helpful? Give feedback.
All reactions