sablier-labs / docs

Documentation and guides for Sablier
https://docs.sablier.com
GNU General Public License v3.0
16 stars 7 forks source link

Mermaid.js diagrams #13

Closed PaulRBerg closed 1 year ago

PaulRBerg commented 1 year ago
PaulRBerg commented 1 year ago

@maxdesalle - this GitHub issue is connected to my recent Slack message.

Produce two Mermaid.js diagrams that show how streams are stored in the Lockup Linear and Lockup Dynamic contracts.

We are taking for granted that these contracts are singletons, but someone unfamiliar with Sablier might not find it so obvious that all LL/ LD streams are stored in a single, monolith contract.

Something like:

  • Show Lockup Linear/ Dnyamic in a big node
  • Stack multiple streams (5-10) in a vertical list of nodes (comparatively smaller to the contract node)
  • Connect the streams to the contract node using arrows
  • Add annotations that reference some key properties, e.g. deposit amount, start time, end time, etc.
  • Drawing some inspiration from Uniswap V4's diagrams would be helpful (structural, not aesthetic inspiration)
maxdesalle commented 1 year ago

Would something like this fit @PaulRBerg? Didn't exactly follow your guidelines. Basically tried to show the "deconstruction" of the a stream from the contract to its key properties. Let me know what you think about it!

CleanShot 2023-07-10 at 22 15 22@2x
PaulRBerg commented 1 year ago

That's a good start, @maxdesalle!

Feedback:

maxdesalle commented 1 year ago
CleanShot 2023-07-11 at 17 54 23@2x

Is this better @PaulRBerg? If this fits, I will create another version with additional details for Lockup Dynamic.

PaulRBerg commented 1 year ago

Looks great, @maxdesalle!