storming0x / ystarter-foundry-kit

Starter Kit for integrating V2 yearn vaults and ERC4626 vaults
GNU Affero General Public License v3.0
49 stars 15 forks source link

Refactor SugarVault into NFTs #2

Open storming0x opened 2 years ago

storming0x commented 2 years ago

SugarVault concept can be converted into NFTs.

Single NFT

  1. ID is a unique representation of donator->receiver link.
  2. Receiver can claim with ID.
  3. The holder is the donator and only holder can burn the NFT and reclaim capital.
  4. Receiver can be switched by ID link. Pros: -Simple one contract. Cons:
    • Receiver can't hold the token and transfer the yield

Two NFTs. One for Donator and one for Receiver.

  1. Parent NFT contract deploys and holds an immutable link to child NFT contract of receivers.
  2. IDs are shared to keep relationship cohesive.
  3. Donator and Receiver each hold a token and can transfer it and burn it separately.
  4. Receiver can claim with ID from Receiver NFT contract as long as they are the owner of the ID.
  5. Donator can transfer the NFT parent token.
  6. Holder of NFT parent token can reclaim the capital deposited and stop sharing yield, this also burns the child token NFT.
  7. The Receiver NFT can be burned forfeiting the yield claiming. Pros: -More flexibility and interesting use cases can be done and integrated Cons:
    • More complex system.