Replies: 1 comment 1 reply
-
Starting of by saying that its an Interesting idea. Expanding our architecture is inevitable if we aim to improve/multiply our products. From what you've said, I'm not sure whether you are suggesting:
In my answer, I'll assume you intended for option 1. My take on this is that while we might be able to make it work, merging the logic for linear and dynamic streams into a single vat doesn't seem ideal. Even if the vat doesn't inherit the mapping(uint256 id => LockupDynamic.Stream stream) private _dynamicStreams;
mapping(uint256 id => LockupLinear.Stream stream) private _linearStreams;
Vat would most likely need to have 2 different implementations for all functions.
Vat would indeed globalize the stream ids.
This issue isn't resolved directly because of the VAT (changing the architecture isn't required), but it's addressed because we introduce new different contracts:
If the NFT contract does not call the Vat how does it know if the stream is depleted? From my POV, we would benefit the most from this architecture if we can find a way to generalize the struct and the calculations for linear streaming that can be used for both vesting and payroll use cases, one NFT contract would force you to "lockup" your funds, while the other would allow you to deposit funds continuously. Or an even one more interesting idea would be to make the VAT a vault(which inherits Also, extending the architecture to something like "VAT" is the direction we should aim for, tho more research needs to be done. Suggestion: we should keep this open, but not include it in the 2.1 version. |
Beta Was this translation helpful? Give feedback.
-
Idea
I've been thinking about the prospect of rearchitecting V2 Core this:
Vat
.admin
with permission to list new NFT contracts. Previously listed NFT contracts cannot be delisted.streamedAmountOf
)Benefits
Flow
Create
create
function on the NFT contractnextStreamId
Streamed Amount Of
streamedAmountOf
directly on the Vat, providing a globalstreamId
streamedAmountOf
and redirect the call to the Vat, for convenienceWithdraw
withdraw
on the NFT contractmsg.sender
is a known NFT contractto
Burn
burn
on the NFT contractDiagram
Beta Was this translation helpful? Give feedback.
All reactions