Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ERC: Extended Multiphase Fractional NFTs #344

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
71 changes: 71 additions & 0 deletions ERCS/erc-9988.md
@@ -0,0 +1,71 @@
---
eip: 9988
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
eip: 9988
eip: 7661

Assigning next sequential EIP/ERC/RIP number.
Numbering changed to sequential from 7500.

Please also update the filename.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've already bought the domain name & hosted the website though.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've already been posting about it aswell. I don't get why I have to change it when there are randomly chosen EIP numbers.

title: Extended Multiphase Fractional NFTs
description: Allows for ERC-721 tokens to be broken into multiple phases of fungible tokens
author: Jonathan Else (@JEflyer)
discussions-to: https://ethereum-magicians.org/t/erc-9988-xmf-nfts-extended-multiphase-fractional-nfts/19346
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
discussions-to: https://ethereum-magicians.org/t/erc-9988-xmf-nfts-extended-multiphase-fractional-nfts/19346
discussions-to: https://ethereum-magicians.org/t/erc-7661-xmf-nfts-extended-multiphase-fractional-nfts/19346

status: Draft
type: Standards Track
category: ERC
created: 2024-03-25
requires: 165, 721
---

## Abstract

An extension of the [ERC-721 standard](./eip-721.md) to enable [ERC-721](./eip-721.md) tokens to have multiple phases of fractionalisation into [ERC-20](./eip-20.md) like tokens.

This standard introduces a framework allowing [ERC-721](./eip-721.md) Non-Fungible Tokens (NFTs) to be broken down into phase-based tokens (PB Tokens) representing fractional ownership or states at various lifecycle phases. Unlike standard [ERC-20](./eip-20.md) tokens, PB Tokens accommodate the multifaceted nature of asset transformation, encapsulating phase transitions that reflect changes in the underlying asset's state, form, or value.

## Motivation

In industries involving supply chains or assets undergoing various forms of processing, a singular representation (as either a fungible or non-fungible token) falls short of depicting the asset's evolving nature. This standard addresses this gap by enabling dynamic representation and management of assets throughout their transformation phases, enhancing tracking and interaction with these assets on the blockchain.

## Specification

### Phase Tokens (PB Tokens)

- PB Tokens are associated with an ERC-721 NFT, representing fractional ownership or specific attributes of the NFT in a given phase.
- Each PB Token phase reflects a distinct state or condition of the underlying asset, with the contract managing transitions between these phases.

### Phase Transition

- Defines rules for transitioning PB Tokens between phases, simulating real-world asset transformations.
- Transition rules specify conditions for phase changes, potentially altering the token count to reflect consolidation or division of the asset.

### API

- `mint(address to, uint256[] memory phaseMultipliers)`: Mints a new token with specified phase multipliers. Each multiplier defines the conversion rate for transitioning from one phase to the next.
- `transitionPhase(uint256 parentTokenId, uint256 phaseFrom, uint256 phaseTo, uint256 amount)`: Transitions a specified amount of tokens from one phase to another for a given parent token ID.
- `burn(uint256 parentTokenId, uint256 phase, uint256 amount)`: Burns a specified amount of tokens in a given phase for a parent token ID.
- `tokenURI(uint256 tokenId)`: Returns the token URI for a given token ID, providing access to its metadata.
- `phaseURI(uint256 tokenId, uint256 phase)`: Returns the phase URI for a specific phase of a given token ID, providing access to phase-specific metadata.

### Events

- `MintingPhase(uint256 indexed tokenID, uint256 indexed phase, address indexed to, uint256 amount)`: Emitted when a new token is minted, indicating the phase and the amount of tokens created.
- `TransferPhase(uint256 indexed parentTokenId, uint256 indexed phaseFrom, uint256 indexed phaseTo, address to, uint256 amount)`: Reflects a phase transition of tokens from one phase to another, including the parent token ID, phases involved, and the amount transferred.
- `BurnPhase(uint256 indexed parentTokenId, uint256 indexed phase, address indexed from, uint256 amount)`: Logged when tokens are burned in a specific phase, showing the parent token ID, phase, sender, and amount burned.
- `ERC9988Transfer(address indexed from, address indexed to, uint256 tokenId, uint256 phase, uint256 amount)`: Indicates the transfer of tokens between accounts, specifying phases and amounts.

## Rationale

Introducing this standard fills a critical niche, blending the characteristics of ERC-721 and ERC-20 tokens to accurately represent dynamic assets. This standard is particularly suited for applications requiring detailed asset management through various phases of transformation.

## Backwards Compatibility

This standard extends ERC-721 standards and introduces multi-phase fungibility within the scope of a single NFT. It is designed to be compatible with existing blockchain infrastructure, with considerations for unique interactions required by phase transitions and fractional ownership.

## Reference Implementation

An implementation can be found here: `https://github.com/JEflyer/ERC9988`

## Security Considerations

- Implementations must ensure secure handling of phase transitions, preventing unauthorized state changes.
- Approval and transfer mechanisms need to address the intricacies of phase-based token management, safeguarding against unauthorized access and manipulation.
- Interoperability with wallets and platforms requires careful consideration to accurately represent and manage PB Tokens' multi-phase nature.

## Copyright

Copyright and related rights waived via [CC0](../LICENSE.md).