This specification defines functions outlining a guarantor role for instance of EIP-721. The guarantee interface implements the user-set valuation and guarantee share for a given NFT (token ID), as well as the guarantee rights enjoyed and obligations assumed during subsequent transactions. An implementation enables the user to read or set the current guarantee value for a given NFT (token ID), and also realizes the distribution of guarantee interest and the performance of guarantee obligations. It sends the standardized events when the status changes. This proposal relies on and extends the existing EIP-721.
NFT (token ID) commonly face the issue of insufficient market liquidity: the main reason being the lack of transparency in NFT pricing, making it difficult for users to cash out after trading and purchasing NFT (token ID).
With the introduction of the guarantor role, different guarantor groups can offer various price guarantees for NFT (token ID), establishing a multi-faceted price evaluation system for NFT (token ID).
After purchasing an NFT (token ID), users can return it to the guarantor at any time at the highest guaranteed price to protect their interests.
Additionally, after fulfilling their guarantee obligations, the guarantor can also request subsequent guarantors to provide guarantee obligations.
When an NFT (token ID) is owned by the guarantor, and since the guarantor can be a DAO organization, this expansion allows the NFT (token ID) to continue operating as a DAO, thus further enhancing the social or community recognition of the NFT (token ID).
The keywords “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.
Every contract compliant to the ERC721Guarantee
MUST implement the IERC721Guarantee
guarantee interface.
The guarantee extension is OPTIONAL for EIP-721 contracts.
pragma solidity ^0.8.20;
// import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
/// @title EIP-721 Guarantor Role extension
/// Note: the EIP-165 identifier for this interface is
interface IERC721Guarantee /*is IERC721*/{
/// @notice Emitted when `guarantee contract` is established for an NFT
/// @param user address of guarantor
/// @param value The guarantee value provided by dao
/// @param DAO DAO organization providing guarantee
/// @param tokenId Guaranteed NFT (token ID),
event GuaranteeIsEstablshed(
address user,
uint256 value,
address DAO,
uint256 indexed tokenId
);
/// @notice Emitted when `guarantee contract` is canceled
/// @dev Some users in the closed DAO request a reduction in their guarantee share
/// @param user address of guarantor
/// @param value The guarantee value provided by dao
/// @param DAO DAO organization providing guarantee
/// @param tokenId Guaranteed NFT (token ID),
event GuaranteeIsCancel(
address user,
uint256 value,
address DAO,
uint256 indexed tokenId
);
/// @notice Emitted when `Guarantee sequence` is established for an NFT
/// @param userGuaranteed address of guaranteed
/// @param number block.number of transaction,
/// and all DAOs established before this point will enter the guarantee sequence
/// @param DAOs DAO sequence providing guarantee
/// @param tokenId Guaranteed NFT (token ID),
event GuaranteeSequenceIsEstablshed(
address userGuaranteed,
uint256 number,
address DAOs,
uint256 indexed tokenId
);
/// @notice A user's evaluation for an NFT (token ID)
/// @dev Set the guarantee information for one guarantor,
/// Throws if `_tokenId` is not a valid NFT
/// @param value user's evaluation for an NFT, the oledr value is canceled,
/// @param user address of guarantor
/// @param weight guarantee weight for guarantor
/// @param tokenId The NFT
/// @return the error status of function execution
function setNFTGuarantedInfo(
uint256 value,
address user,
uint256 weight,
uint256 tokenId
) external returns (uint256);
/// @notice Establish guarantee sequence for an NFT (token ID) and split the commission
/// @dev Each NFT(token ID) retains a current guarantee sequence,
/// and expired guarantee sequences are no longer valid,
/// Throws if `_tokenId` is not a valid NFT
/// @param valueCommission Commission for a transactions
/// @param userGuaranteed address of guaranteed
/// @param number block.number of transaction,
/// and all DAOs established before this point will enter the guarantee sequence
/// @param tokenId The NFT
/// @return the error status of function execution
function establishNFTGuarantee(
uint256 valueCommission,
address userGuaranteed,
uint256 number,
uint256 tokenId
) external returns (uint256);
/// @notice Transactions that fulfill the guarantee responsibility
/// @dev The new accountability transaction also requires
/// the construction of a new guarantee sequence
/// Throws if `_tokenId` is not a valid NFT or userGuaranteed is not right
/// @param userGuaranteed address of guaranteed
/// @param tokenId The NFT
/// @return the error status of function execution
function FulfillGuaranteeTransfer(address userGuaranteed, uint256 tokenId)
external
returns (uint256);
}
Key factors influencing the standard:
ERC721TokenReceiver
interfaceThis standard is compatible with current EIP-721 standards. There are no other standards that define a similar role for NFTs and the name (Guarantor) is not used by other EIP-721 related standards.
The reference implementation will be provided later.
Needs discussion.
Copyright and related rights waived via CC0.