You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An extension of [ERC-721](./eip-721.md), this standard incorporates `locking` features into NFTs, allowing for various uses while preventing sale or transfer. The token's `owner` can `lock` it, setting up locker address (either an EOA or a contract) that exclusively holds the power to unlock the token. Owner can also provide approval for tokenId, enabling ability to lock asset while address holds the token approval. Token can also be locked by `approved`, assigning locker to itself. Upon token transfer, these rights get purged.
17
+
An extension of [ERC-721](./erc-721.md), this standard incorporates `locking` features into NFTs, allowing for various uses while preventing sale or transfer. The token's `owner` can `lock` it, setting up locker address (either an EOA or a contract) that exclusively holds the power to unlock the token. Owner can also provide approval for `tokenId`, enabling ability to lock asset while address holds the token approval. Token can also be locked by `approved`, assigning locker to itself. Upon token transfer, these rights get purged.
17
18
18
19
## Motivation
19
20
20
-
[ERC-721](./eip-721.md) has sparked an unprecedented surge in demand for NFTs. However, despite this tremendous success, NFT economy suffers from secondary liquidity where it remains Illiquid in owner’s wallet. There are projects such as NFTfi, Paraspace which aims to address the liquidity challenge, but they entail below mentioned inconveniences and risks for owners as they necessitate transferring the participating NFTs to the projects' contracts.
21
+
[ERC-721](./erc-721.md) has sparked an unprecedented surge in demand for NFTs. However, despite this tremendous success, the NFT economy suffers from secondary liquidity where it remains illiquid in owner’s wallet. There are projects which aim to address the liquidity challenge, but they entail the below mentioned inconveniences and risks for owners as they necessitate transferring the participating NFTs to the projects' contracts.
21
22
22
23
- Loss of utility: The utility value of NFTs diminishes when they are transferred to an escrow account, no longer remaining under the direct custody of the owners.
23
24
- Lack of composability: The market could benefit from increased liquidity if NFT owners had access to multiple financial tools, such as leveraging loans and renting out their assets for maximum returns. Composability serves as the missing piece in creating a more efficient market.
24
25
- Smart contract vulnerabilities: NFTs are susceptible to loss or theft due to potential bugs or vulnerabilities present in the smart contracts they rely on.
25
26
26
-
The aforementioned issues contribute to a poor user experience (UX), and we propose enhancing the [ERC-721](./eip-721.md) standard by implementing a native locking mechanism:
27
+
The aforementioned issues contribute to a poor user experience (UX), and we propose enhancing the [ERC-721](./erc-721.md) standard by implementing a native locking mechanism:
27
28
Rather than being transferred to a smart contract, an NFT remains securely stored in self-custody but is locked.
28
29
During the lock period, the NFT's transfer is restricted while its other properties remain unchanged.
29
-
NFT Owner retains the ability to use or distribute it’s utility
30
+
NFT Owner retains the ability to use or distribute it’s utility.
30
31
31
32
NFTs have numerous use cases where the NFT must remain within the owner's wallet, even when it serves as collateral for a loan. Whether it's authorizing access to a Discord server, or utilizing NFT within a play-to-earn (P2E) game, owner should have the freedom to do so throughout the lending period. Just as real estate owner can continue living in their mortgaged house, take personal loan or keep tenants to generate passive income, these functionalities should be available to NFT owners to bring more investors in NFT economy.
32
33
@@ -35,7 +36,7 @@ Lockable NFTs enable the following use cases :
35
36
36
37
- NFT-collateralized loans: Utilize NFT as collateral for a loan without locking it on the lending protocol contract. Instead, lock it within owner’s wallet while still enjoying all the utility of NFT.
37
38
- No collateral rentals of NFTs: Borrow an NFT for a fee without the need for significant collateral. Renter can use the NFT but not transfer it, ensuring the lender's safety. The borrowing service contract automatically returns the NFT to the lender once the borrowing period expires.
38
-
- Buy Now Pay Later: The buyer receives the locked NFT and can immediately begin using it. However, they are unable to sell the NFT until all installments are paid. Failure to complete the full payment results in the NFT returning to the seller, along with a fee.
39
+
- Buy Now Pay Later (BNPL): The buyer receives the locked NFT and can immediately begin using it. However, they are unable to sell the NFT until all installments are paid. Failure to complete the full payment results in the NFT returning to the seller, along with a fee.
39
40
- Composability: Maximize liquidity by having access to multiple financial tools. Imagine taking a loan against NFT and putting it on rentals to generate passive income.
40
41
- Primary sales: Mint an NFT for a partial payment and settle the remaining amount once owner is satisfied with the collection's progress.
41
42
- Soulbound: Organization can mint and self-assign `locker`, send token to user and lock the asset.
@@ -44,26 +45,26 @@ Lockable NFTs enable the following use cases :
44
45
This proposal is different from other locking proposals in number of ways:
45
46
46
47
- This implementation provides a minimal implementation of `lock` and `unlock` and believes other conditions like time-bound are great ideas but can be achieved without creating a specific implementation. Locking and Unlocking can be based on any conditions (e.g. repayment, expiry). Therefore time-bound unlocks a relatively specific use case that can be achieved via smart-contracts themselves without that being a part of the token contract.
47
-
- This implementation proposes a separation of rights between locker and approver. Token can be locked with approval and approved can unlock and withdraw tokens (opening up opportunities like renting, lending, bnpl etc), and token can be locked lacking the rights to revoke token, yet can unlock if required (opening up opportunities like account-bound NFTs).
48
+
- This implementation proposes a separation of rights between locker and approver. Token can be locked with approval and approved can unlock and withdraw tokens (opening up opportunities like renting, lending, BNPL etc), and token can be locked lacking the rights to revoke token, yet can unlock if required (opening up opportunities like account-bound NFTs).
48
49
- Our proposal implement ability to `transferAndLock` which can be used to transfer, lock and optionally approve token. Enabling the possibility of revocation after transfer.
49
50
50
-
By extending the [ERC-721](./eip-721.md) standard, the proposed standard enables secure and convenient management of underlying NFT assets. It natively supports prevalent NFTFi use cases such as staking, lending, and renting. We anticipate that this proposed standard will foster increased engagement of NFT owners in NFTFi projects, thereby enhancing the overall vitality of the NFT ecosystem.
51
+
By extending the [ERC-721](./erc-721.md) standard, the proposed standard enables secure and convenient management of underlying NFT assets. It natively supports prevalent NFTFi use cases such as staking, lending, and renting. We anticipate that this proposed standard will foster increased engagement of NFT owners in NFTFi projects, thereby enhancing the overall vitality of the NFT ecosystem.
51
52
52
53
## Specification
53
54
54
55
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.
55
56
56
57
### Overview
57
58
58
-
[ERC-721](./eip-721.md) compliant contracts MAY implement this EIP to provide standard methods of locking and unlocking the token at its current owner address.
59
+
[ERC-721](./erc-721.md) compliant contracts MAY implement this EIP to provide standard methods of locking and unlocking the token at its current owner address.
59
60
60
61
Token owner MAY `lock` the token and assign `locker` to some `address` using `lock(uint256 tokenId, address _locker)` function, this MUST set `locker` to `_locker`. Token owner or approved MAY `lock` the token using `lock(uint256 tokenId)` function, this MUST set `locker` to `msg.sender`. Token MAY be `unlocked` by `locker` using `unlock` function. `unlock` function MUST delete `locker` mapping and default to `address(0)`.
61
62
62
63
If the token is `locked`, the `lockerOf` function MUST return an address that is `locker` and can `unlock` the token. For tokens that are not `locked`, the `lockerOf` function MUST return `address(0)`.
63
64
64
-
`lock` function MUST revert if token is not already locked. `unlock` function MUST revert if token is not locked. ERC-721 `approve` function MUST revert if token is locked. ERC-721 `_tansfer` function MUST revert if token is locked. ERC-721 `_transfer` function MUST pass if token is locked and`msg.sender` is `approved` and `locker` both. After ERC-721 `_transfer`, values of `locker` and `approved` MUST be purged.
65
+
`lock` function MUST revert if token is already `locked`. `unlock` function MUST revert if token is not `locked`. ERC-721 `approve` function MUST revert if token is `locked`. ERC-721 functions that transfer ownership of a token MUST revert if token is `locked`, unless`msg.sender` is `approved` and `locker` both. After ERC-721 token transfer function call, values of `locker` and `approved` MUST be purged.
65
66
66
-
Token MAY be transferred and `locked`, and OPTIONAL setup`approval` to `locker` using `transferAndLock` function. This is RECOMMENDED for use-cases where Token transfer and subsequent revocation is REQUIRED.
67
+
Token MAY be transferred and `locked`, also assign`approval` to `locker` using `transferAndLock` function. This is RECOMMENDED for use-cases where Token transfer and subsequent revocation is REQUIRED.
67
68
68
69
### Interface
69
70
@@ -126,28 +127,28 @@ This proposal exposes `transferAndLock(uint256 tokenId, address from, address to
126
127
127
128
## Backwards Compatibility
128
129
129
-
This standard is compatible with [ERC-721](./eip-721.md) standards.
130
+
This standard is compatible with [ERC-721](./erc-721.md) standards.
130
131
131
-
Existing Upgradedable [ERC-721](./eip-721.md) can upgrade to this standard, enabling locking capability inherently and unlock underlying liquidity features.
132
+
Existing Upgradedable [ERC-721](./erc-721.md) can upgrade to this standard, enabling locking capability inherently and unlock underlying liquidity features.
132
133
133
134
## Test Cases
134
135
135
-
Test cases can be found [here](../assets/eip-7066/test/test.js).
136
+
Test cases can be found [here](../assets/erc-7066/test/test.js).
136
137
137
138
## Reference Implementation
138
139
139
-
Reference Interface can be found [here](../assets/eip-7066/IERC7066.sol).
140
+
Reference Interface can be found [here](../assets/erc-7066/IERC7066.sol).
140
141
141
-
Reference Implementation can be found [here](../assets/eip-7066/ERC7066.sol).
142
+
Reference Implementation can be found [here](../assets/erc-7066/ERC7066.sol).
142
143
143
144
## Security Considerations
144
145
145
-
There are no security considerations related directly to the implementation of this standard for the contract that manages [ERC-721](./eip-721.md).
146
+
There are no security considerations related directly to the implementation of this standard for the contract that manages [ERC-721](./erc-721.md).
146
147
147
148
### Considerations for the contracts that work with lockable tokens
148
149
149
150
- Once `locked`, token can not be further `approved` or `transfered`.
150
-
- If token is `locked` and caller is `locker` and `appoved` both, caller can transfer the token.
151
+
- If token is `locked` and caller is `locker` and `approved` both, caller can transfer the token.
151
152
-`locked` token with `locker` as in-accesible account or un-verified contract address can lead to permanent lock of the token.
152
153
- There are no MEV considerations regarding lockable tokens as only authorized parties are allowed to lock and unlock.
0 commit comments