starknet-io / SNIPs

Starknet Improvement Proposal repository
MIT License
155 stars 96 forks source link

SNIP-22 Tokenized Vault standard #95

Closed nbundi closed 1 week ago

nbundi commented 2 months ago

This PR introduces a new standard for "tokenized vaults".

The standard is inspired by EIP-4626, a standard that has found wide adoption on EVM chains.

Tokenized vaults are a common pattern across DeFi and Starknet. E.g. Vesu, Nostra, zkLend, Nimbora and others use variations of tokenized vaults. Similar to EIP-20, this standard unlocks greater composability, efficiency and security around implementations and derivative work.

Some use cases (non exhaustive list) are:

github-actions[bot] commented 1 month ago

There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale. This PR will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!

dor-starkware commented 1 month ago

Hello @nbundi and sorry for the long delay. To proceed with merging your PR into the main branch, could you please review the following and commit the changes accordingly:

  1. Preamble Section:
    • Add the SNIP number under the snip field. The snip number should be 17.
    • Add a description field with a concise description of the SNIP.
    • Add a discussion-to field and include the relevant link to the discussion in the Starknet community forum. If you haven't opened such a discussion yet, please do so, and then add the link to this field.
    • The type field for this SNIP should be one of Standards Track,Meta, or Informational (In this case, Standards Track fits).
    • Add a category field, which is necessary for SNIP type Standards Track, and enter SRC.
    • In the Created field add a crated date for this SNIP following this format: yyyy-mm-dd.
    • You are welcome to add a requires field if there are prerequisite SNIPs for this one. This field is optional.

You can refer to this link for the full instructions on writing the preamble section.

  1. Missing Rationale section: Please refer to this link to understand the purpose of this section and add it to your SNIP.

  2. Rename the "Implementation" section to "Reference Implementation" to align with the standard as mentioned in SNIP-1.

  3. Reorder the "Reference Implementation" section and the "Backwards Compatibility" section to match the structure specified in SNIP-1.

Let me know if you have any questions or need help with these adjustments.

nbundi commented 1 month ago

hey @dor-starkware thanks for your review and feedback! I did update the PR accordingly. I did also go ahead and open a new topic in the community forum which is currently pending approval. Will add the link to the PR as soon as approved. In the meantime, pls lmk if there is anything else I can do to move the SNIP forward.

nbundi commented 1 month ago

@dor-starkware added the link to the community forum

dor-starkware commented 1 month ago

Hi @nbundi,

Thanks for making the updates. Unfortunately, there’s been a numbering conflict. Please change the SNIP number to 22 to avoid overlap. A mechanism to avoid these numbering conflicts is under consideration.

Also, the description in the preamble is a bit long and doesn't render well. Consider shortening it for better readability, though it’s not mandatory.

Thanks!

nbundi commented 2 weeks ago

hey @dor-starkware I have updated the number and shortened the description in the preamble as well as abstract and motivation.

lmk if this looks good to you now

dor-starkware commented 1 week ago

Hi @nbundi,

The changes look good! I just noticed the discussions-to field in the preamble is linking to a Starknet community post with 'SNIP-17' in the title. Could you please update the title to reflect the SNIP number change to 22, and if that alters the URL, provide the new link?

Thanks!

nbundi commented 1 week ago

hey @dor-starkware I have updated the number on the community post and changed the link in the preamble to the new url.

dor-starkware commented 1 week ago

Thanks, @nbundi! Everything looks good now. Could you please update the status from 'Draft' to 'Review' to reflect the completion of the edit process? Once that’s done, I’ll proceed with merging it to the main branch.

nbundi commented 1 week ago

Done @dor-starkware