web3wagmi
← All standards

ERC-7621 Basket Token

DraftERCcreated 2024-02-11requires ERC-20, ERC-165, ERC-173

A multi-asset basket token with weighted constituents and owner-managed rebalancing.

Authors: Dominic Ryder, Michael Ryder, Callum Mitchell-Clark (@AlvaraProtocol)

ERC-165 interface ids

Computed here as the XOR of the selectors each interface defines.

IERC76210xc9c80f73

Functions this standard introduces (11)

0xa1ee8febcontribute(uint256[],address,uint256)
0x10d79f4dgetConstituents()view
0xc9a396e9getReserve(address)view
0xac6c5251getWeight(address)view
0x6a76d37bisConstituent(address)view
0xd1602debpreviewContribute(uint256[])view
0x0a28a477previewWithdraw(uint256)view
0x2be01190rebalance(address[],uint256[])
0x28b50621totalBasketValue()view
0x1f39b64etotalConstituents()view
0xb06c2075withdraw(uint256,address,uint256[])

Events (3)

Topic0 is the keccak256 hash of the signature, which is what a log filter matches on.

0x65077443500d09fb9327fef77eb702295690f6c4456cb8f0923a095072b35f5aContributed(address,address,uint256,uint256[])
0xfad1fb5b176de5b75745458f0d7ce9a4a85b06c7c1c03516650d3fea0e96391cWithdrawn(address,address,uint256,uint256[])
0xe3f655e86a2d47038eb04f7b87f9dea95da219cebf6126e515c1be343218293dRebalanced(address[],uint256[])

Custom errors (8)

0xab8b67c6LengthMismatch(uint256,uint256)
0x7c663b92InvalidWeights(uint256)
0x1f2a2005ZeroAmount()
0xd36931a9NotConstituent(address)
0xcb1d8bbaInsufficientShares(uint256,uint256)
0xa3a05223InsufficientAmount(uint256,uint256,uint256)
0xd7be0547DuplicateConstituent(address)
0xd92e233dZeroAddress()

Depends on (3)

Proposals this one names in its requires field.

What the specification covers

Compare with

Parsed from the canonical specification · discussion