Xingyu Li
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    1
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Decouple NFT Ownership & Utility - Technical Analysis === ### Introduction Decoupling the ownership and utility of an NFT is a critical part in NFT financing. Currently the three main use cases are: 1. **NFT Lending**, where users deposit an NFT they own as collateral to get loans via overcollateralization and keep the usage rights (e.g. PFP) of the collateralized NFT. 2. **NFT Renting**, where users deposit a rental fee to the protocol/platform and get usage rights of the NFT for a certain period of time. 3. **NFT Buy Now Pay Later (BNPL)**, where the users deposit a down payment to the protocol/platform and get usage rights of the NFT. The transfer of the true ownership happens when the user completes all the remaining payments, and the liquidation happens when 1. *the user defaults* 2. *the NFT price drops below the health factor*. This article will primarily focus on the latter two use cases, as both help the users access and enjoy the utility of NFTs, and aims to discuss trade-offs of different solutions from a technical point of view. At a high level, solutions in decoupling ownership and utility of NFTs can be classified into two main categories: **on-chain** (e.g. wrapped NFTs, smart contracts, smart wallets, new contract standard, etc.) and **off-chain** (e.g. MPC wallet). Generally speaking, on-chain solutions are *permissionless* and *interoperable*, but *less scalable* and *vulnerable to hacking*, while off-chain solutions are more *scalable* and *manageable* (a.k.a secure), but rely on users’ *trust* to a centralized custody. ### NFT Rentals #### Double Protocol - ERC-4907 token standard [ERC-4907](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4907.md) is a rental NFT standard proposed by Double Protocol, with its core idea *dual roles*. In addition to the **owner** of the NFT, ERC-4907 proposes an additional role, the **user**, as an extension to ERC721 contracts. The user role has a validity period and the lease will automatically terminate after expiration without any on-chain operations. At the implementation level, ERC-4907 includes an additional struct `UserInfo` and a mapping `_users`(key = `tokenId`, val = `UserInfo`) to store the address of the user role and the exipration timestamp. ```solidity struct UserInfo { address user; // address of user role uint64 expires; // unix timestamp, user expires } mapping (uint256 => UserInfo) internal _users; ``` <!-- ![](https://i.imgur.com/PYF3EFo.png) --> The ERC-4907 interface has three functions. 1. `setUser` to allow the owner of the NFT set the address and expiry of the renter(`user`). 2. `userOf` to get the user of the NFT by `tokenId` if not expired. 3. `userExpires` to get the expiry of the current renter(`user`) by `tokenId`. The `_beforeTokenTransfer` function in ERC-721 is also overwritten to check if the owner and receiver are different person and delete the current `user` if there is one before the token transfer happens. <!-- ![](https://i.imgur.com/HNpdTjN.png) --> ERC-4907 is a significant innovation in attemping to provide permissionless interoperability for NFT rentals. However, it has notable limitations in its flexibility, especially in the BNPL use case. 1. **Scalability and Adoption**. As a new token standard (extension to ERC-721), ERC-4907's approach is highly dependent on the adaptations of NFT projects and applications. `ownerOf(tokenId)` is a native function in ERC-721, whereas `userOf(tokenId)` is a newly defined function from IERC-4907. For instance, if an NFT project (or dapp) has a check on if the user is the `owner` of the NFT, the `user` defined in ERC-4907 does not have the access until additional checks and adaptions have been made. 2. **Liquidation and Renter Protection**. In overcollateralized lending (e.g. AAVE, Compound) scenerios, liquidation is a necessary mechanism to protect liquidity providers and the lending pool when 1. *the renter defaults* 2. *the price of the collatorized assets drastically drops* (a.k.a Health Factor < 1). The collateralized asset usually gets locks in a smart contract (`owner` be a smart contract) and ready to get liquidated (`transfer()`). Unfortunately the user-expiry model in ERC-4907 is very unfriendly to the liquidation mechanisms because the user immediately lose the rights to use once the liquidation (transfer of NFT onwership) happens, and this can happen anytime before the expiry. In other word the renter's rights cannot get sufficiently protected in this design. #### reNFT - smart contract * reNFT uses a fully on-chain smart contract solution in docoupling the ownership and utility via its [registry](https://github.com/re-nft/registry) smart contracts. So far reNFT has released two versions: - V1 for **collateralized rental** (no integration needed, full custody), where the NFT will transfer the NFT to the wallet of the renter, meaning that the renter can do anything he/she wants with the rented NFT, and hence collateral is required to compensate the lender if the NFT is not returned. - V2 for **collateral-free** rental (integration needed, non-full custody), where NFT projects or games need to integrate reNFT SDK to check the registry smart contract for the renter role, but is a lot more friendly for users lacking the initial funds. In collateralized rental, the lender sets the 1. *the daily rental price `dailyRentPrice`* 2. *the NFT collateral price* `lendAmount` 3. *max rental period* `maxRentDuration` for initiating a lending, and the renter sets the duration `rentDuration` in days and pays the rental fee + the collateral fee to the reNFT's escrow smart contract. The reNFT's escrow smart contract holds the renter's collateral and the renter gets full custody of the rented NFT. In collateral-free rental, the lender sets the 1. *the daily rental price `dailyRentPrice`* 2. *max rental period* `maxRentDuration` (no need for *the NFT collateral price* ) for initiating a lending, and the renter sets the duration `rentDuration` in days and pays the rental fee (no need for *the collateral fee*) to the reNFT's registry smart contract. The reNFT's registry contract holds the rented NFTs and assigns **renter role** to the renter. To use it, the integrated project/protocol will check the renter role from the reNFT registry contract and assign relevant role or benefits to the inherent of NFT to the renter. A lot more flexible than standards, but 1. Scabalibity and Adoption. 2. Rental periods have been subdivided to a daily basis and offers more flexibility, intrinsicaly still the renting model. 1. Cross-chain interoperability and scalability. 2. Cost in maintaining the smart contracts or getting exploited. #### Rentable - smart wallet In [Rentable](https://github.com/rentable-world/rentable-protocol) V2's version, in addition to rentable contracts, Rentable provides an additional layer of WalletConnect competible smart wallets to allow rentals in any WalletConnect enabled dApp with no integration efforts. Rented NFTs stay secured in the smart wallet because they cannot be withdrawn by the renter and they get back to the Rentable smart contracts when the rental ends. the renter can prove the ownership of its Rentable Smart Wallet via WalletConnect and so effectively use the rented assets in any platform which supports it. But, cannot withdraw. - attemps to solve proof of onwership instead of additional renter role. Avoid additional necessity of check for extra role (e.g. user). - solves the dapp integration issues -> better composability #### Prom - smart wallet #### Capsid - ERC-721D token standard Capsid introduces a new concept **Non-Fungible Rights** (which are by themselves NFTs) issued by NFT owners to grant rights to use the NFT. [ERC-721D](https://github.com/SolitaireNFT/ERC-NFT-with-ACL/blob/master/EIP%20proposal.md) 1. Use a uint256 to represent the new ACL(Access Control List) of NFT to users -> different permission level. 2. Keep the ownership (ownerOf()), but the ability to transfer may need some more permission. Rationale: - owner should be able to give other users one or multiple permissions, without transferring the ownership. - The permission list is encoded into a u256 integer -> flexibility for developers - “proof of rights” NFTs to the licensee in the “grant” function. #### Cardinal - smart wallet ### Summary <!-- | Project | Description | Test Text | | :----: | :----: | :----: | | Header | Title | Here's this | | Paragraph | Text | And more | | Paragraph | Text | And more | | Paragraph | Text | And more | | Paragraph | Text | And more | | Paragraph | Text | And more | --> ### NFT BNPL #### Cyan - wrapped NFT #### Pine - wrapped NFT #### Cedar - MPC wallet

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully