SeacowsERC3525

What is ERC-3525?

This is a standard for semi-fungible tokens. The set of smart contract interfaces described in this document defines an ERC-721 compatible token standard. This standard introduces an <ID, SLOT, VALUE> triple scalar model that represents the semi-fungible structure of a token. It also introduces new transfer models as well as approval models that reflect the semi-fungible nature of the tokens.

For more information, please refer to ERC-3525.

Benefits of using ERC-3525 as Position Management

  • Storing LP shares information in NFT

  • LP shares are tradable as NFT on other marketplaces.

  • Using as collaterals in Lending & Borrowing protocol

Reference:

Mappings

pairSlots

mapping(address => uint256) public pairSlots;

To store the mapping of Pair contract address to Slot number.

pairTokenIds

mapping(address => uint256) public pairTokenIds;

To store the mapping of Pair contract address to ERC-3525 Token ID.

slotPairs

mapping(uint256 => address) public slotPairs;

To store the mapping of Slot number to Pair contract address.

Functions

totalValueSupplyOf

function totalValueSupplyOf(uint256 _slot) public view virtual returns (uint256)

Return the Total LP Shares of a Pair by its Slot number.

Last updated