Replies: 1 comment 10 replies
-
One thing to take into consideration here is that if we delegate the Token Supply tracking to the smart contracts, we cannot guarantee/assume that they will, actually, do this correctly (nor at all, for that matter). At this point, the requirements we have for a NT creator is for them to be 1) a contract 2) whitelisted by Sablier. Given that we don't require the contracts to implement any specific interface (containing, among others, the Also, as you have correctly suggested in the OP, if we delegate the Total Supply logic to the smart contracts, we also put aside the possibility to stop supporting the NT (i.e. remove it from our database) when it's "burned down". Even if the smart contracts implements the Total Supply logic correctly, this logic would exist on a different (higher) level of abstraction, and accessing it from the lower abstraction level of the VM, when processing the execution of the Having said the above, should we implement the Total Supply of NTs at the VM level? |
Beta Was this translation helpful? Give feedback.
-
Context
As discussed here, we have a dilemma1 regarding how to keep track of the total supply of Native Tokens:
Cost/Benefit Analysis
There isn't any huge difference between the two approaches. The trade-offs are subtle.
VM Approach
Contract Approach
RFC
In the spirit of quick iteration, I suggest going with the contract approach because it takes less time to implement. As development progresses, we can revisit this proposal and switch to the VM approach should state size prove problematic.
However, it is worth noting that once we commit to a certain approach in production, we will be married to it for life.
cc @sablier-labs/sabvm
Footnotes
There's a third option, which is to treat the total supply as a non-essential metadata meant to be indexed by subgraphs, but this would lead to such a terrible developer experience that I didn't even include it. ↩
Beta Was this translation helpful? Give feedback.
All reactions