SuperPositions
Introduction
When users deposit into vaults through SuperformRouter, users lock the underlying ERC4626 vault share in the respective Form contract and SuperPositions
are minted to the user on the chain they deposited from (unless retain4626
is set to True).
SuperPositions
are designed to provide superior UX and composability by allowing vault shares to be represented on any chain, lower transaction costs related to the management of a user's positions, and more easily facilitate cross-chain interactions. SuperPositions
inherit from ERC1155A, an opinionated variant of ERC1155 which includes single id approvals for better control of the approval process.
Core Concepts
AMBMessage
SuperPositions
are minted on callbacks from cross-chain destinations through usage of an AMBMessage
with a CallbackType
of RETURN or FAIL.
Name | Description |
---|---|
| uint256 ticket packing of TransactionType |
| bytes decoded into |
Minting SuperPositions
SuperPositions
can be minted through mintSingle
, mintBatch
on same-chain deposits and via stateMultiSync
or stateSync
functions on cross-chain deposits - all restricted in being called by either SuperformRouter in same-chain actions or CoreStateRegistry in cross-chain action.
Name | Description |
---|---|
| address of the receiver of the |
| uint256 ids of |
| uint256 amounts of the |
Name | Description |
---|---|
| address of the receiver of the |
| uint256 id of a |
| uint256 amount of the |
Name | Description |
---|---|
|
|
It is the responsibility of each implementation contract to support these functions and make them perform according to the intended specification.
Burning SuperPositions
SuperPositions
can be burned through burnSingle
or burnBatch
functions. The burn action happens optimistically at the beginning of a withdrawal action through a call made from a SuperformRouter.
Name | Description |
---|---|
| address of user who owns the |
| uint256 ids of |
| uint256 amounts of the |
Name | Description |
---|---|
| address of user who owns the |
| uint256 id a |
| uint256 amount of the |
dynamicURI
Each SuperPosition
has a dynamic URI that points to metadata about the SuperPosition
. Once dynamicURIFrozen
is set to true, this URI cannot be changed anymore.
Last updated