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.
ERC-7628 proposes extending ERC-721 with ownership shares associated with individual token IDs, allowing fractional ownership to be represented without giving up the ERC-721 token model.
This article translates, summarizes, and explains the original proposal.
Other EIP proposals are covered here.
Overview
The proposal assigns each NFT a numerical value called its ownership shares. It defines functions for querying and transferring those shares and approving other addresses to spend them, making the extension applicable to a range of ownership arrangements.
Motivation
Applications that distribute dividends or assign rights in proportion to NFT holdings need a way to track ownership proportions. With ERC-1155, an application's ownership accounting can be based on the quantity of a particular token ID held by each address, although multiple units can share that ID.
For background on ERC-1155, see:
ERC-721, by contrast, maintains the uniqueness of each token but does not provide standardized accounting for ownership shares.
For background on ERC-721, see:
Here, uniqueness refers to the relationship between the NFT and its tokenId. An ERC-721 token ID identifies one NFT within its contract. ERC-1155 can represent multiple units with the same token ID, although it can also represent unique assets.
ERC-7628 combines elements of these two approaches. It adds transferable share balances to individual ERC-721 tokens. Each token retains its unique identifier while its associated ownership shares can be divided or reassigned.
Specification
A contract conforming to the proposal implements the following interface.
pragma solidity ^0.8.0;
interface IERC7628 /* is IERC721 */ {
/// @notice Returns the number of decimal places used for ownership shares.
/// @return The number of decimal places for ownership shares.
function shareDecimals() external view returns (uint8);
/// @notice Returns the total sum of ownership shares in existence for all tokens.
/// @return The total sum of ownership shares.
function totalShares() external view returns (uint256);
/// @notice Returns the ownership share of the specified token.
/// @param tokenId The identifier of the token.
/// @return The ownership share of the token.
function shareOf(uint256 tokenId) external view returns (uint256);
/// @notice Returns the share allowance granted to the specified spender by the owner for the specified token.
/// @param tokenId The identifier of the token.
/// @param spender The address of the spender.
/// @return The share allowance granted to the spender.
function shareAllowance(uint256 tokenId, address spender) external view returns (uint256);
/// @notice Approves the specified address to spend a specified amount of shares on behalf of the caller.
/// @param tokenId The identifier of the token.
/// @param spender The address of the spender.
/// @param shares The amount of shares to approve.
function approveShare(uint256 tokenId, address spender, uint256 shares) external;
/// @notice Transfers ownership shares from one token to another.
/// @param fromTokenId The identifier of the sender token.
/// @param toTokenId The identifier of the recipient token.
/// @param shares The amount of shares to transfer.
function transferShares(uint256 fromTokenId, uint256 toTokenId, uint256 shares) external;
/// @notice Transfers ownership shares from one token to another address (resulting in a new token or increased shares at the recipient address).
/// @param fromTokenId The identifier of the sender token.
/// @param to The address of the recipient.
/// @param shares The amount of shares to transfer.
function transferSharesToAddress(uint256 fromTokenId, address to, uint256 shares) external;
/// @notice Adds a specified amount of shares to a token, only callable by the contract owner.
/// @param tokenId The identifier of the token.
/// @param shares The amount of shares to add.
function addSharesToToken(uint256 tokenId, uint256 shares) external;
/// @notice Emitted when ownership shares are transferred from one token to another.
/// @param fromTokenId The identifier of the sender token.
/// @param toTokenId The identifier of the recipient token.
/// @param amount The amount of shares transferred.
event SharesTransfered(uint256 indexed fromTokenId, uint256 indexed toTokenId, uint256 amount);
/// @notice Emitted when an approval is granted for a spender to spend shares on behalf of an owner.
/// @param tokenId The token identifier.
/// @param spender The address of the spender.
/// @param amount The amount of shares approved.
event SharesApproved(uint256 indexed tokenId, address indexed spender, uint256 amount);
}shareDecimals
function shareDecimals() external view returns (uint8);Overview
Returns the number of decimal places used to represent ownership shares.
totalShares
function totalShares() external view returns (uint256);Overview
Returns the total ownership shares in existence across all tokens.
Details
This function exposes the aggregate share supply maintained by the contract.
shareOf
function shareOf(uint256 tokenId) external view returns (uint256);Overview
Returns the ownership shares associated with a specified token.
Parameters
tokenId- The token identifier.
shareAllowance
function shareAllowance(uint256 tokenId, address spender) external view returns (uint256);Overview
Returns the number of shares that the owner of a specified token has authorized a spender to use.
Details
The allowance represents the maximum number of shares that the specified spender is authorized to spend under the share approval mechanism.
Parameters
tokenId- The token identifier.
spender- The spender's address.
Return value
uint256- The authorized share amount.
approveShare
function approveShare(uint256 tokenId, address spender, uint256 shares) external;Overview
Allows an NFT owner to approve a specified address to spend a given number of shares.
Details
The token owner grants another address authority over a specified amount of shares. An implementation must enforce the relevant share allowance when delegated spending occurs.
Parameters
tokenId- The token identifier.
spender- The spender's address.
shares- The number of shares to approve.
transferShares
function transferShares(uint256 fromTokenId, uint256 toTokenId, uint256 shares) external;Overview
Transfers ownership shares from one token to another.
Details
Moves a specified number of shares between token IDs, allowing the shares to be redistributed without transferring the source NFT itself.
Parameters
fromTokenId- The identifier of the source token.
toTokenId- The identifier of the destination token.
shares- The number of shares to transfer.
transferSharesToAddress
function transferSharesToAddress(uint256 fromTokenId, address to, uint256 shares) external;Overview
Transfers ownership shares from a token to another address.
Details
Moves a specified number of shares from the source token to the recipient. The interface describes this as resulting in a new token or an increase in shares at the recipient address.
Parameters
fromTokenId- The identifier of the source token.
to- The recipient address.
shares- The number of shares to transfer.
addSharesToToken
function addSharesToToken(uint256 tokenId, uint256 shares) external;Overview
Adds shares to a specified token.
Details
This operation is restricted to the contract owner in the proposed interface.
Parameters
tokenId- The token identifier.
shares- The number of shares to add.
SharesTransfered
event SharesTransfered(uint256 indexed fromTokenId, uint256 indexed toTokenId, uint256 amount);Overview
An event emitted when ownership shares are transferred from one token to another. The spelling of the event name follows the original interface.
Parameters
fromTokenId- The identifier of the source token.
toTokenId- The identifier of the destination token.
amount- The number of shares transferred.
SharesApproved
event SharesApproved(uint256 indexed tokenId, address indexed spender, uint256 amount);Overview
An event emitted when an NFT owner grants an address permission to spend shares.
Parameters
tokenId- The token identifier.
spender- The authorized address.
amount- The approved share amount.
Rationale
Issuing additional shares
Issuing additional shares against an NFT provides flexibility for ownership accounting. This can be useful in scenarios such as profit distribution and investment, provided the application defines the rights represented by the shares and the effect of dilution.
Sending shares to an address
Allowing shares to be sent to an address, rather than only to an existing token ID, makes it possible to represent fractional holdings through separate tokens. Potential applications include selling or pledging a portion of an ownership interest. The onchain share balance alone does not establish the legal rights attached to the underlying asset.
Compatibility
The proposal is designed to remain compatible with ERC-721.
Reference Implementation
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract ERC7628 is IERC7628, ERC721, Ownable, ReentrancyGuard {
mapping(uint256 => uint256) private _shareBalances;
mapping(uint256 => mapping(address => uint256)) private _shareAllowances;
uint256 private _totalShares;
uint256 private _nextTokenId;
constructor(address initialOwner)
ERC721("MyToken", "MTK")
Ownable(initialOwner)
{}
function addSharesToToken(uint256 tokenId, uint256 shares) public override onlyOwner {
require(tokenId > 0, "ERC7628: tokenId cannot be zero");
_shareBalances[tokenId] += shares;
_totalShares += shares;
emit SharesTransfered(0, tokenId, shares);
}
function shareDecimals() external pure override returns (uint8) {
return 18;
}
function totalShares() external view override returns (uint256) {
return _totalShares;
}
function shareOf(uint256 tokenId) external view override returns (uint256) {
return _shareBalances[tokenId];
}
function shareAllowance(uint256 tokenId, address spender) external view override returns (uint256) {
return _shareAllowances[tokenId][spender];
}
function approveShare(uint256 tokenId, address spender, uint256 shares) external override {
require(spender != ownerOf(tokenId), "ERC7628: approval to current owner");
require(msg.sender == ownerOf(tokenId), "ERC7628: approve caller is not owner");
_shareAllowances[tokenId][spender] = shares;
emit SharesApproved(tokenId, spender, shares);
}
function transferShares(uint256 fromTokenId, uint256 toTokenId, uint256 shares) external override nonReentrant {
require(_shareBalances[fromTokenId] >= shares, "ERC7628: insufficient shares for transfer");
require(_isApprovedOrOwner(msg.sender, fromTokenId), "ERC7628: transfer caller is not owner nor approved");
_shareBalances[fromTokenId] -= shares;
_shareBalances[toTokenId] += shares;
emit SharesTransfered(fromTokenId, toTokenId, shares);
}
function transferSharesToAddress(uint256 fromTokenId, address to, uint256 shares) external override nonReentrant {
require(_shareBalances[fromTokenId] >= shares, "ERC7628: insufficient shares for transfer");
require(_isApprovedOrOwner(msg.sender, fromTokenId), "ERC7628: transfer caller is not owner nor approved");
_nextTokenId++;
_safeMint(to, _nextTokenId);
_shareBalances[_nextTokenId] = shares;
emit SharesTransfered(fromTokenId, _nextTokenId, shares);
}
// Helper function to check if an address is the owner or approved
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) {
return (spender == ownerOf(tokenId) || getApproved(tokenId) == spender || isApprovedForAll(ownerOf(tokenId), spender));
}
}The original example above is preserved for reference. It is not production-ready: transferSharesToAddress does not deduct shares from the source balance, and the two transfer functions check ERC-721 ownership or approval rather than consuming the recorded share allowance. The example also does not reset share approvals on NFT transfers or check that every destination token exists. These issues need to be addressed before deployment, along with dependency-version compatibility and share-supply invariants.
Security Considerations
Resetting approvals on transfer
When ownership of an NFT changes, existing share approvals must be cleared.
Otherwise, an address authorized by the previous owner could retain control over shares after the NFT has been transferred to a new owner who never granted that authorization.
Preventing reentrancy
Implementations must protect against reentrancy that could cause unintended changes to ownership, share balances, or approvals.
For background on reentrancy, see:
https://chaldene.net/solidity-reentrancy-attack
Validating token IDs and addresses
Each operation should validate the relevant token IDs and addresses to prevent invalid identifiers or recipients from being used.
Managing shares when ownership changes
Share balances must remain consistent when NFT ownership changes. Accurate accounting and well-defined transfer rules are necessary to preserve ownership invariants.
Citation
Chen Liaoyuan (@chenly) cly@kip.pro, "ERC-7628: ERC-721 Ownership Shares Extension [DRAFT]," Ethereum Improvement Proposals, no. 7628, February 2024. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-7628.
Conclusion
ERC-7628 extends ERC-721 with ownership shares, enabling fractional holdings to be represented while preserving individual token IDs. Its share transfer and approval interfaces provide the basis for more flexible ownership accounting.
Questions are welcome through Twitter direct messages.
I also publish on the following platforms.



