Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
This article examines ERC7595, a proposal for managing multiple ERC20 tokens as collateral for individual NFTs, including mechanisms for withdrawals and distribution.
This article translates, summarizes, and expands on the specification below.
Overview
ERC7595 proposes an extension to ERC721, the existing NFT standard, that enables collateral-backed NFTs.
Here, collateral means associating an NFT with underlying assets that support its value and can be accessed by the NFT owner.
For more information about ERC721, see the following article.
[ERC721] An introduction to ERC721
Under ERC7595, an NFT collection's contract is designed to hold native coins, such as ETH on Ethereum, as well as multiple ERC20 tokens. The owner of a particular NFT (tokenId) has the right to unlock and withdraw some or all of the ERC20 tokens associated with that NFT.
For more information about ERC20, see the following article.
[ERC20] An introduction to ERC20
The central idea is that an NFT can contain ERC20 tokens. Instead of merely referencing an image or metadata, the NFT is backed by assets that can be verified on-chain. Its underlying asset balances can therefore be observed directly in the contract rather than relying exclusively on external market valuations.
As a result, an NFT can represent both a token proving ownership and a right to access underlying cryptoassets.
Motivation
NFT finance has grown in recent years. It encompasses lending protocols that accept NFTs as collateral and other financial services built around NFT valuations.
Common approaches use an NFT collection's floor price as a reference for collateral valuation.
The floor price is the lowest listed price for an NFT in a collection. However, it is heavily influenced by supply and demand in the NFT market. NFT prices can be highly volatile even compared with the broader cryptoasset market, and substantial short-term fluctuations are not unusual.
Price manipulation is another concern. In some collections, deliberately trading NFTs at inflated prices can distort market prices or raise the apparent floor. If lending protocols accept such prices without adjustment, collateral can be overvalued and introduce risks throughout the protocol.
Collateral valuations based exclusively on NFT market prices, especially floor prices, are therefore unstable and may be unreliable.
ERC7595 is designed to address these problems. By directly associating NFTs with underlying assets such as ERC20 tokens, it provides an on-chain, verifiable basis for a minimum asset-backed valuation. This can make valuation less dependent on external market fluctuations and manipulation. The actual value still depends on the collateral assets and the conditions for withdrawing them.
The approach may also benefit NFT collection creators. Asset-backed NFTs could support more sustainable royalty mechanisms, in which fees received from NFT transactions relate to underlying value rather than depending entirely on market prices.
Turning NFTs from collectibles into financial assets whose value can be managed and distributed may also broaden creators' monetization options.
ERC7595 is intended to address the opacity of NFT valuations and vulnerability to price manipulation by connecting ERC721 NFTs with cryptoassets in a more practical and secure manner.
Specification
IERC721Envious
interface IERC721Envious is IERC721 {
event Collateralized(uint256 indexed tokenId, uint256 amount, address tokenAddress);
event Uncollateralized(uint256 indexed tokenId, uint256 amount, address tokenAddress);
event Dispersed(address indexed tokenAddress, uint256 amount);
event Harvested(address indexed tokenAddress, uint256 amount, uint256 scaledAmount);
/**
* @dev An array with two elements. Each of them represents percentage from collateral
* to be taken as a commission. First element represents collateralization commission.
* Second element represents uncollateralization commission. There should be 3
* decimal buffer for each of them, e.g. 1000 = 1%.
*
* @param uint 256 index of value in array.
*/
function commissions(uint256 index) external view returns (uint256);
/**
* @dev 'Black hole' is any address that guarantees that tokens sent to it will not be
* retrieved from it. Note: some tokens revert on transfer to zero address.
*
* @return address address of black hole.
*/
function blackHole() external view returns (address);
/**
* @dev Token that will be used to harvest collected commissions.
*
* @return address address of token.
*/
function communityToken() external view returns (address);
/**
* @dev Pool of available tokens for harvesting.
*
* @param uint256 index in array.
* @return address address of token.
*/
function communityPool(uint256 index) external view returns (address);
/**
* @dev Token balance available for harvesting.
*
* @param address address of token.
* @return uint256 token balance.
*/
function communityBalance(address tokenAddress) external view returns (uint256);
/**
* @dev Array of tokens that have been dispersed.
*
* @param uint256 index in array.
* @return address address of dispersed token.
*/
function disperseTokens(uint256 index) external view returns (address);
/**
* @dev Amount of tokens that has been dispersed.
*
* @param address address of token.
* @return uint256 token balance.
*/
function disperseBalance(address tokenAddress) external view returns (uint256);
/**
* @dev Amount of tokens that was already taken from the disperse.
*
* @param address address of token.
* @return uint256 total amount of tokens already taken.
*/
function disperseTotalTaken(address tokenAddress) external view returns (uint256);
/**
* @dev Amount of disperse already taken by each tokenId.
*
* @param tokenId unique identifier of unit.
* @param address address of token.
* @return uint256 amount of tokens already taken.
*/
function disperseTaken(uint256 tokenId, address tokenAddress) external view returns (uint256);
/**
* @dev Mapping of `tokenId`s to token addresses that have collateralized before.
*
* @param tokenId unique identifier of unit.
* @param index in array.
* @return address address of token.
*/
function collateralTokens(uint256 tokenId, uint256 index) external view returns (address);
/**
* @dev Token balances that are stored under `tokenId`.
*
* @param tokenId unique identifier of unit.
* @param address address of token.
* @return uint256 token balance.
*/
function collateralBalances(uint256 tokenId, address tokenAddress) external view returns (uint256);
/**
* @dev Calculator function for harvesting.
*
* @param amount of `communityToken`s to spend
* @param address address of token to be harvested
* @return amount to harvest based on inputs
*/
function getAmount(uint256 amount, address tokenAddress) external view returns (uint256);
/**
* @dev Collect commission fees gathered in exchange for `communityToken`.
*
* @param amounts[] array of amounts to collateralize
* @param address[] array of token addresses
*/
function harvest(uint256[] memory amounts, address[] memory tokenAddresses) external;
/**
* @dev Collateralize NFT with different tokens and amounts.
*
* @param tokenId unique identifier for specific NFT
* @param amounts[] array of amounts to collateralize
* @param address[] array of token addresses
*/
function collateralize(
uint256 tokenId,
uint256[] memory amounts,
address[] memory tokenAddresses
) external payable;
/**
* @dev Withdraw underlying collateral.
*
* Requirements:
* - only owner of NFT
*
* @param tokenId unique identifier for specific NFT
* @param amounts[] array of amounts to collateralize
* @param address[] array of token addresses
*/
function uncollateralize(
uint256 tokenId,
uint256[] memory amounts,
address[] memory tokenAddresses
) external;
/**
* @dev Split collateral among all existent tokens.
*
* @param amounts[] to be dispersed among all NFT owners
* @param address[] address of token to be dispersed
*/
function disperse(uint256[] memory amounts, address[] memory tokenAddresses) external payable;
}Variables
commissions
function commissions(uint256 index) external view returns (uint256);Manages the fee rates charged for collateralization and uncollateralization. ERC7595 defines fees for depositing collateral and withdrawing it, and this getter exposes the rates through an indexed array. Values express percentages multiplied by 1,000, so 1000 represents 1%. Index 0 is the collateralization fee and index 1 is the uncollateralization fee.
Parameters
index- The index of the fee to retrieve.
blackHole
function blackHole() external view returns (address);Returns the address at which tokens are intended to become unrecoverable. A black hole is an address from which deposited tokens cannot be retrieved. It is commonly used for burning or permanently locking tokens. Some ERC20 implementations reject transfers to the zero address, so a dedicated address is used instead.
communityToken
function communityToken() external view returns (address);Returns the token address used for harvesting community rewards. ERC7595 provides a mechanism for recovering tokens collected as fees by exchanging them for a specific ERC20 token. The reference token used in this process is communityToken.
communityPool
function communityPool(uint256 index) external view returns (address);Manages the list of tokens available for harvesting. The community pool records the various ERC20 tokens accumulated as fees. This getter exposes the list as an indexed array.
Parameters
index- An index in the array.
communityBalance
function communityBalance(address tokenAddress) external view returns (uint256);Returns the harvestable token balance. It allows callers to check how much of a particular ERC20 token is currently held in the community pool.
Parameters
tokenAddress- The address of the ERC20 token.
disperseTokens
function disperseTokens(uint256 index) external view returns (address);Returns entries from the list of tokens designated for distribution. Tokens distributed to the NFT holders through the disperse mechanism are recorded in this array.
disperseBalance
function disperseBalance(address tokenAddress) external view returns (uint256);Returns the amount of tokens allocated for distribution. It shows how much of a particular token has been reserved for distribution to the NFT holders.
function disperseTotalTaken(address tokenAddress) external view returns (uint256);Returns the cumulative amount of distributed tokens withdrawn so far. This information shows how many distribution tokens all NFT holders have received.
disperseTaken
function disperseTaken(uint256 tokenId, address tokenAddress) external view returns (uint256);Returns the amount of distributed tokens received by a particular NFT. The contract tracks how much of each token has been received on a per-NFT basis.
collateralTokens
function collateralTokens(uint256 tokenId, uint256 index) external view returns (address);Returns entries from the list of tokens registered as collateral for an NFT. An NFT can hold multiple ERC20 tokens as collateral, and this getter exposes the token history as an array.
collateralBalances
function collateralBalances(uint256 tokenId, address tokenAddress) external view returns (uint256);Returns the collateral token balances associated with individual NFTs. Callers can check which ERC20 tokens and what amounts are associated with an NFT.
Events
Collateralized
event Collateralized(uint256 indexed tokenId, uint256 amount, address tokenAddress);Emitted when an NFT is collateralized. It indicates that ERC20 tokens or native coins have been added as collateral for a particular NFT.
Parameters
tokenId- The ID of the NFT.
amount- The amount collateralized.
tokenAddress- The address of the token used as collateral.
Uncollateralized
event Uncollateralized(uint256 indexed tokenId, uint256 amount, address tokenAddress);Emitted when collateral is withdrawn, indicating that the NFT owner has released collateral assets.
Dispersed
event Dispersed(address indexed tokenAddress, uint256 amount);Emitted when collateral assets are registered for distribution to the NFT holders.
Harvested
event Harvested(address indexed tokenAddress, uint256 amount, uint256 scaledAmount);Emitted when fees are harvested in exchange for the community token.
Functions
getAmount
function getAmount(uint256 amount, address tokenAddress) external view returns (uint256);Calculates the exchange amount for harvesting, determining how much of a target token can be recovered in exchange for a specified amount of communityToken.
Arguments
amount- The amount of communityToken to use.
tokenAddress- The address of the token to harvest.
Returns
- The amount of tokens that can be harvested.
harvest
function harvest(uint256[] memory amounts, address[] memory tokenAddresses) external;Harvests fees by paying community tokens and recovering fee tokens accumulated in the pool.
collateralize
function collateralize(
uint256 tokenId,
uint256[] memory amounts,
address[] memory tokenAddresses
) external payable;Adds collateral to an NFT. Multiple kinds of tokens can be deposited as collateral in one operation. Native coins are also supported.
uncollateralize
function uncollateralize(
uint256 tokenId,
uint256[] memory amounts,
address[] memory tokenAddresses
) external;Withdraws collateral. Only the NFT owner can execute the operation to withdraw the specified collateral tokens.
disperse
function disperse(uint256[] memory amounts, address[] memory tokenAddresses) external payable;Distributes collateral to the collection's NFT holders. The specified tokens are distributed among existing NFTs equally or according to the applicable rules.
IEnviousHouse
interface IEnviousHouse {
event Collateralized(
address indexed collection,
uint256 indexed tokenId,
uint256 amount,
address tokenAddress
);
event Uncollateralized(
address indexed collection,
uint256 indexed tokenId,
uint256 amount,
address tokenAddress
);
event Dispersed(
address indexed collection,
address indexed tokenAddress,
uint256 amount
);
event Harvested(
address indexed collection,
address indexed tokenAddress,
uint256 amount,
uint256 scaledAmount
);
/**
* @dev totalCollections function returns the total count of registered collections.
*
* @return uint256 number of registered collections.
*/
function totalCollections() external view returns (uint256);
/**
* @dev 'Black hole' is any address that guarantees that tokens sent to it will not be
* retrieved from it. Note: some tokens revert on transfer to zero address.
*
* @param address collection address.
* @return address address of black hole.
*/
function blackHole(address collection) external view returns (address);
/**
* @dev collections function returns the collection address based on the collection index input.
*
* @param uint256 index of a registered collection.
* @return address address collection.
*/
function collections(uint256 index) external view returns (address);
/**
* @dev collectionIds function returns the collection index based on the collection address input.
*
* @param address collection address.
* @return uint256 collection index.
*/
function collectionIds(address collection) external view returns (uint256);
/**
* @dev specificCollections function returns whether a particular collection follows the ERC721 standard or not.
*
* @param address collection address.
* @return bool specific collection or not.
*/
function specificCollections(address collection) external view returns (bool);
/**
* @dev An array with two elements. Each of them represents percentage from collateral
* to be taken as a commission. First element represents collateralization commission.
* Second element represents uncollateralization commission. There should be 3
* decimal buffer for each of them, e.g. 1000 = 1%.
*
* @param address collection address.
* @param uint256 index of value in array.
* @return uint256 collected commission.
*/
function commissions(address collection, uint256 index) external view returns (uint256);
/**
* @dev Token that will be used to harvest collected commissions.
*
* @param address collection address.
* @return address address of token.
*/
function communityToken(address collection) external view returns (address);
/**
* @dev Pool of available tokens for harvesting.
*
* @param address collection address.
* @param uint256 index in array.
* @return address address of token.
*/
function communityPool(address collection, uint256 index) external view returns (address);
/**
* @dev Token balance available for harvesting.
*
* @param address collection address.
* @param address address of token.
* @return uint256 token balance.
*/
function communityBalance(address collection, address tokenAddress) external view returns (uint256);
/**
* @dev Array of tokens that have been dispersed.
*
* @param address collection address.
* @param uint256 index in array.
* @return address address of dispersed token.
*/
function disperseTokens(address collection, uint256 index) external view returns (address);
/**
* @dev Amount of tokens that has been dispersed.
*
* @param address collection address.
* @param address address of token.
* @return uint256 token balance.
*/
function disperseBalance(address collection, address tokenAddress) external view returns (uint256);
/**
* @dev Amount of tokens that was already taken from the disperse.
*
* @param address collection address.
* @param address address of token.
* @return uint256 total amount of tokens already taken.
*/
function disperseTotalTaken(address collection, address tokenAddress) external view returns (uint256);
/**
* @dev Amount of disperse already taken by each tokenId.
*
* @param address collection address.
* @param tokenId unique identifier of unit.
* @param address address of token.
* @return uint256 amount of tokens already taken.
*/
function disperseTaken(address collection, uint256 tokenId, address tokenAddress) external view returns (uint256);
/**
* @dev Mapping of `tokenId`s to token addresses that have collateralized before.
*
* @param address collection address.
* @param tokenId unique identifier of unit.
* @param index in array.
* @return address address of token.
*/
function collateralTokens(address collection, uint256 tokenId, uint256 index) external view returns (address);
/**
* @dev Token balances that are stored under `tokenId`.
*
* @param address collection address.
* @param tokenId unique identifier of unit.
* @param address address of token.
* @return uint256 token balance.
*/
function collateralBalances(address collection, uint256 tokenId, address tokenAddress) external view returns (uint256);
/**
* @dev Calculator function for harvesting.
*
* @param address collection address.
* @param amount of `communityToken`s to spend.
* @param address address of token to be harvested.
* @return amount to harvest based on inputs.
*/
function getAmount(address collection, uint256 amount, address tokenAddress) external view returns (uint256);
/**
* @dev setSpecificCollection function enables the addition of any collection that is not compatible with the ERC721 standard to the list of exceptions.
*
* @param address collection address.
*/
function setSpecificCollection(address collection) external;
/**
* @dev registerCollection function grants Envious functionality to any ERC721-compatible collection and streamlines
* the distribution of an initial minimum disbursement to all NFT holders.
*
* @param address collection address.
* @param address address of `communityToken`.
* @param uint256 collateralization fee, incoming / 1e5 * 100%.
* @param uint256 uncollateralization fee, incoming / 1e5 * 100%.
*/
function registerCollection(
address collection,
address token,
uint256 incoming,
uint256 outcoming
) external payable;
/**
* @dev Collect commission fees gathered in exchange for `communityToken`.
*
* @param address collection address.
* @param amounts[] array of amounts to collateralize.
* @param address[] array of token addresses.
*/
function harvest(
address collection,
uint256[] memory amounts,
address[] memory tokenAddresses
) external;
/**
* @dev Collateralize NFT with different tokens and amounts.
*
* @param address collection address.
* @param tokenId unique identifier for specific NFT.
* @param amounts[] array of amounts to collateralize.
* @param address[] array of token addresses.
*/
function collateralize(
address collection,
uint256 tokenId,
uint256[] memory amounts,
address[] memory tokenAddresses
) external payable;
/**
* @dev Withdraw underlying collateral.
*
* Requirements:
* - only owner of NFT
*
* @param address collection address.
* @param tokenId unique identifier for specific NFT.
* @param amounts[] array of amounts to collateralize.
* @param address[] array of token addresses.
*/
function uncollateralize(
address collection,
uint256 tokenId,
uint256[] memory amounts,
address[] memory tokenAddresses
) external;
/**
* @dev Split collateral among all existent tokens.
*
* @param address collection address.
* @param amounts[] to be dispersed among all NFT owners.
* @param address[] address of token to be dispersed.
*/
function disperse(
address collection,
uint256[] memory amounts,
address[] memory tokenAddresses
) external payable;
}Events
Collateralized
event Collateralized(
address indexed collection,
uint256 indexed tokenId,
uint256 amount,
address tokenAddress
);Emitted when an NFT in a specified collection is collateralized. It records that collateral was added to an existing NFT collection on a tokenId basis. Because the event includes collection, the logs alone identify the collection and NFT to which collateral was added.
Parameters
collection- The contract address of the NFT collection.
tokenId- The ID of the NFT.
amount- The amount added as collateral.
tokenAddress- The address of the token added as collateral.
Uncollateralized
event Uncollateralized(
address indexed collection,
uint256 indexed tokenId,
uint256 amount,
address tokenAddress
);Emitted when collateral is withdrawn from an NFT in a specified collection. It indicates that the collateral balance associated with tokenId decreased. Uncollateralization corresponds to the operation in which the NFT owner withdraws collateral.
Parameters
collection- The contract address of the NFT collection.
tokenId- The ID of the NFT.
amount- The amount withdrawn.
tokenAddress- The address of the withdrawn token.
Dispersed
event Dispersed(
address indexed collection,
address indexed tokenAddress,
uint256 amount
);Emitted when a distribution is made for a specified collection. It indicates that tokens have been registered for distribution to all NFT holders. Actual receipt is tracked on a per-NFT (tokenId) basis, so the event primarily indicates that distribution funds have been deposited.
Parameters
collection- The contract address of the NFT collection.
tokenAddress- The address of the token to distribute.
amount- The amount added for distribution.
Harvested
event Harvested(
address indexed collection,
address indexed tokenAddress,
uint256 amount,
uint256 scaledAmount
);Emitted when fees for a specified collection are harvested. It indicates that the specified token has been recovered from the pool of fees collected during collateralization and uncollateralization in exchange for communityToken. The scaledAmount is intended to represent the scaled value used in the harvesting calculation. Scaling is often used to accommodate differences in token decimals or internal calculation precision.
Parameters
collection- The contract address of the NFT collection.
tokenAddress- The address of the token harvested.
amount- The amount harvested.
scaledAmount- The adjusted amount used in the calculation.
Functions
totalCollections
function totalCollections() external view returns (uint256);Returns the total number of registered collections. It indicates how many NFT collections are registered in the abstraction layer, which can be useful for displaying collection lists in a frontend.
Returns
- The number of registered collections.
blackHole
function blackHole(address collection) external view returns (address);Returns the black hole address configured for a collection. A black hole is intended to be an address from which sent tokens cannot be recovered. Because some ERC20 tokens reject transfers to the zero address, each collection can have an appropriate black hole address.
Arguments
collection- The contract address of the NFT collection.
Returns
- The black hole address.
collections
function collections(uint256 index) external view returns (address);Returns a registered collection's address by index. It allows the registered collections to be accessed like an array. Combining it with totalCollections makes it possible to iterate over all collections.
Arguments
index- The index of the registered collection.
Returns
- The collection address.
collectionIds
function collectionIds(address collection) external view returns (uint256);Returns the registration index of a collection address. This is the reverse lookup of collections(index). Frontends and other contracts can use it to determine the index at which a given collection address is registered.
Arguments
collection- The contract address of the NFT collection.
Returns
- The registration index.
specificCollections
function specificCollections(address collection) external view returns (bool);Indicates whether a specified collection is treated as an exception. Here, an exception is intended to mean a collection whose behavior does not fully match conventional ERC721 behavior. For instance, the abstraction layer can use this flag to handle collections with unusual ownerOf behavior or standard functions that do not behave as expected.
Arguments
collection- The contract address of the NFT collection.
Returns
trueif treated as an exception, otherwisefalse.
commissions
function commissions(address collection, uint256 index) external view returns (uint256);Returns the fee rate for the specified collection. Fee rates are managed through a two-element array: index 0 represents the collateralization fee, and index 1 represents the uncollateralization fee. The representation allows three decimal places in a percentage, so 1000 represents 1%.
Arguments
collection- The contract address of the NFT collection.
index- The index identifying the fee type.
Returns
- The fee rate.
communityToken
function communityToken(address collection) external view returns (address);Returns the community token used to harvest fees for the collection. This is the reference payment token used when recovering accumulated fee tokens. Different collections can specify different community tokens.
Arguments
collection- The contract address of the NFT collection.
Returns
- The community token address.
communityPool
function communityPool(address collection, uint256 index) external view returns (address);Provides access to the specified collection's pool of tokens available for harvesting. Different ERC20 tokens accumulated as fees are stored in an indexed list of harvestable tokens. This getter retrieves an entry by index.
Arguments
collection- The contract address of the NFT collection.
index- The index in the array.
Returns
- The address of the token available for harvesting.
communityBalance
function communityBalance(address collection, address tokenAddress) external view returns (uint256);Returns the harvestable balance for the collection. Callers can check how much of the specified token has accumulated in its fee pool.
Arguments
collection- The contract address of the NFT collection.
tokenAddress- The address of the token.
Returns
- The harvestable token balance.
disperseTokens
function disperseTokens(address collection, uint256 index) external view returns (address);Returns entries from the list of tokens designated for distribution by the collection. Tokens used for distribution are kept in an indexed historical array.
Arguments
collection- The contract address of the NFT collection.
index- The index in the array.
Returns
- The address of a token designated for distribution.
disperseBalance
function disperseBalance(address collection, address tokenAddress) external view returns (uint256);Returns the amount of tokens set aside for distribution by the collection. It allows callers to check how much has been deposited as distribution funds.
Arguments
collection- The contract address of the NFT collection.
tokenAddress- The address of the token.
Returns
- The distribution balance.
disperseTotalTaken
function disperseTotalTaken(address collection, address tokenAddress) external view returns (uint256);Returns the cumulative amount of distribution tokens withdrawn for the collection. It tracks how much all NFT holders have collectively received from the distribution pool.
Arguments
collection- The contract address of the NFT collection.
tokenAddress- The address of the token.
Returns
- The cumulative withdrawn amount.
disperseTaken
function disperseTaken(address collection, uint256 tokenId, address tokenAddress) external view returns (uint256);Returns the amount of distributed tokens received by a particular NFT in the collection. Tracking receipt on a per-tokenId basis helps prevent double claims.
Arguments
collection- The contract address of the NFT collection.
tokenId- The ID of the NFT.
tokenAddress- The address of the token.
Returns
- The amount of distributed tokens received by the NFT.
collateralTokens
function collateralTokens(address collection, uint256 tokenId, uint256 index) external view returns (address);Returns entries from the list of collateral tokens associated with a particular NFT in the collection. Since an NFT can hold multiple kinds of collateral tokens, the previously collateralized tokens are recorded in an array.
Arguments
collection- The contract address of the NFT collection.
tokenId- The ID of the NFT.
index- The index in the array.
Returns
- The collateral token address.
collateralBalances
function collateralBalances(address collection, uint256 tokenId, address tokenAddress) external view returns (uint256);Returns the collateral balance associated with a particular NFT in the collection. The combination of tokenId and token address identifies the current collateral balance.
Arguments
collection- The contract address of the NFT collection.
tokenId- The ID of the NFT.
tokenAddress- The address of the token.
Returns
- The collateral balance.
getAmount
function getAmount(address collection, uint256 amount, address tokenAddress) external view returns (uint256);Calculates the exchange amount when harvesting. Based on the rules of the specified collection, it calculates how much of a target token can be harvested for a given amount of communityToken.
Arguments
collection- The contract address of the NFT collection.
amount- The amount of communityToken to use.
tokenAddress- The address of the token to harvest.
Returns
- The amount of tokens that can be harvested.
setSpecificCollection
function setSpecificCollection(address collection) external;Adds a collection that is not fully ERC721-compatible to the exception list. Collections that cannot be handled under ordinary ERC721 assumptions can be registered for special treatment in the abstraction layer. Non-compatibility here means that the collection's functions or behavior do not match standard expectations.
Arguments
collection- The contract address of the NFT collection to register as an exception.
registerCollection
function registerCollection(
address collection,
address token,
uint256 incoming,
uint256 outcoming
) external payable;Registers an ERC721-compatible collection and adds collateral functionality. Registering the collection in the abstraction layer enables collateralization, uncollateralization, distribution, and harvesting for its NFTs. The comment refers to making it easy to distribute an initial minimum allocation to all NFT holders, suggesting that distribution may accompany registration. Fees are described using an expression such as incoming / 1e5 * 100%, indicating a fixed-point representation with a denominator of 100,000.
Arguments
collection- The contract address of the NFT collection to register.
token- The token address used as communityToken.
incoming- The collateralization fee rate.
outcoming- The uncollateralization fee rate.
harvest
function harvest(
address collection,
uint256[] memory amounts,
address[] memory tokenAddresses
) external;Recovers tokens accumulated as fees. The caller pays communityToken to harvest fees from the specified collection's community pool. It accepts arrays of amounts and token addresses so multiple tokens can be harvested together.
Arguments
collection- The contract address of the NFT collection.
amounts- An array of amounts to use for harvesting.
tokenAddresses- An array of token addresses to harvest.
collateralize
function collateralize(
address collection,
uint256 tokenId,
uint256[] memory amounts,
address[] memory tokenAddresses
) external payable;Adds collateral to an NFT in the specified collection. Multiple kinds of tokens can be associated with the tokenId of an existing NFT collection. The function is payable, enabling native coins to be used as collateral as well.
Arguments
collection- The contract address of the NFT collection.
tokenId- The ID of the NFT.
amounts- An array of amounts to add as collateral.
tokenAddresses- An array of token addresses to add as collateral.
uncollateralize
function uncollateralize(
address collection,
uint256 tokenId,
uint256[] memory amounts,
address[] memory tokenAddresses
) external;Withdraws collateral from an NFT in the specified collection. As the comment states, only the owner of the NFT may uncollateralize it. The abstraction layer is expected to reference the existing collection's ownership information, normally ERC721's ownerOf, and determine whether withdrawal is authorized based on ownership.
Arguments
collection- The contract address of the NFT collection.
tokenId- The ID of the NFT.
amounts- An array of amounts to withdraw.
tokenAddresses- An array of token addresses to withdraw.
disperse
function disperse(
address collection,
uint256[] memory amounts,
address[] memory tokenAddresses
) external payable;Distributes collateral to the NFT holders in the specified collection. Distribution tokens are deposited and registered as funds to be allocated to all existing NFTs. The function is payable, allowing distributions in native coins as well.
Arguments
collection- The contract address of the NFT collection.
amounts- An array of amounts to allocate for distribution.
tokenAddresses- An array of token addresses to distribute.
Additional considerations
Why the term "Envious" was chosen
ERC7595 uses the term Envious for NFT collections issued under the proposal and for existing ERC721 NFTs that use the EnviousHouse abstraction layer.
The name emphasizes that an NFT is not merely proof of ownership but holds collateral assets underneath. From the perspective of a third party who does not own the NFT, its underlying cryptoassets may make it an object of envy.
A common name makes it possible to distinguish NFTs with collateral functionality at a conceptual level rather than relying on project names or descriptions. Importantly, both newly issued collections and existing collections can be treated as Envious NFTs.
Collateralizing NFTs with multiple tokens
Some Web3 projects use only one specific ERC20 token when collateralizing an NFT. Although this approach is simple, it creates limitations in practice.
For example, when depositing several kinds of collateral, separate transactions may be required for each token. This increases gas costs, worsens the user experience, and limits the ability to combine collateral assets flexibly.
ERC7595 is designed to allow multiple ERC20 tokens to be added as collateral to a single NFT within one transaction.
This can improve gas efficiency and allow users to select collateral combinations that reflect the assets they hold.
Collateralizing NFTs with native coins
ERC20 tokens have contract addresses, but native coins such as ETH do not have token contract addresses. This difference creates a problem for a design that identifies collateral assets by token address.
ERC7595 addresses this issue by using the following null address as a special identifier for native coins.
0x0000000000000000000000000000000000000000The address is not used as an ordinary token contract, so it can serve as a distinct identifier without colliding with ERC20 token contract addresses.
This makes it possible to use a unified mechanism for treating both ERC20 tokens and native coins as collateral.
The Disperse mechanism
ERC7595 provides a mechanism for depositing collateral assets for distribution across an entire NFT collection. It is intended for situations in which rewards or value are allocated equally, or according to defined rules, among NFT holders.
The distribution process first deposits the total amount of collateral assets into the smart contract. Each NFT holder can subsequently claim the portion attributable to their NFT when adding or withdrawing collateral.
One advantage is that there is no need to transfer tokens to every recipient at the time the distribution is registered. Mass on-chain transfers can consume substantial gas. A claim-based approach allows recipients to receive their allocations as needed.
The Harvest mechanism
ERC7595 charges fees during collateralization and uncollateralization. Rather than collecting fees exclusively in a fixed token, it provides a flexible mechanism for recovering the accumulated assets.
Each Envious NFT collection can configure one community ERC20 token. By paying this token, a participant can harvest the accumulated fees, consisting of assets collected during collateralization and uncollateralization.
The design is intended to produce the following effects.
- Create utility-driven demand for the community token.
- Encourage token circulation within the NFT ecosystem.
The mechanism therefore connects the token economy to NFTs rather than merely collecting fees.
Why a BlackHole instance is necessary
Some ERC20 implementations prohibit transfers to the zero address. Although this helps prevent accidental loss of tokens, it creates a problem when tokens must be burned or permanently removed from circulation.
ERC7595 requires community tokens to be removed from circulation during the harvesting process. Instead of using the zero address, it uses a dedicated contract known as BlackHole.
The BlackHole contract is intended to have the following properties.
- It can receive tokens but has no functionality to transfer them out.
- It does not expose operations that change its state and is essentially read-only.
- It acts as a permanent token lock.
This approach is intended to make effective burning possible across differing ERC20 implementations. Sending tokens to BlackHole does not necessarily reduce the ERC20 contract's reported total supply; it instead renders the tokens inaccessible, subject to the token's implementation and the BlackHole contract's actual properties.
BlackHole is a component intended to work with ERC7595's fee harvesting and economic design rather than in isolation.
Citation
571nKY (@571nKY), Cosmos (@Cosmos4k), f4t50 (@f4t50), Harpocrates (@harpocrates555), "ERC-7595: Collateralized NFT [DRAFT]," Ethereum Improvement Proposals, no. 7595, March 2023. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-7595.
Conclusion
This article examined ERC7595, a proposal for managing multiple ERC20 tokens as collateral for individual NFTs and enabling both withdrawals and distributions.
If you have questions, feel free to reach out via Twitter.

