VestingSubSkeletonNID
Implementation of the Vesting sub-skeleton facet with Compilot gating for the TMI-Fraction Protocol.
_This facet serves as a sub-core component (sub-skeleton) of a TMI-Fraction Platform, allowing investors to claim and receive a campaign's underlying wrapped assets when a vesting schedule is configured, through fraction balance redemption.
IMPORTANT:
-
This implementation relies on
genesisIdsand must always be used in conjunction withPurchaseSkeletonGenesisIdsStorage.solandNonFundedSubSkeletonGenesisIds.sol(if the non-funded state is applicable), as well as sub-internal and internal facets that depend on it. -
It is designed for Platforms with the following traits:
- Supports campaigns that issue only semi-fungible (ERC1155)
genesisIdsfractions. - Supports campaigns that feature vesting schedules.
- Supports campaigns that issue only semi-fungible (ERC1155)
-
The
genesisIdidentification schema for semi-fungible (ERC1155) fractions enables precise tracking of owed portions within campaigns featuring both discount mechanisms and vesting schedules. This is achieved by offsetting the fractions' ID relative to the campaign's configuredupperGenesisIdwhen vested claims are performed.For example, if the
upperGenesisIdfor a campaign's fractions is1, it might reflect the following:- Fractions purchased at full price → ID =
0(genesisId) - Fractions purchased at a discount → ID =
1(upperGenesisId)
When a user claims the first X portions (including TGE/Cliff release(s), if applicable):
- Their fraction balance (ID =
0if purchased at full price, ID =1if discounted) is burned. - If total portions Y > X, they receive newly minted fractions with ID =
upperGenesisId + X(Z = Y - X portions remain). - If total portions Y == X, they do not receive newly minted fractions (all portions have been claimed).
- The user receives the corresponding token amount for the X claimed portions.
- Fractions purchased at full price → ID =
The process of investors redeeming genesisIds semi-fungible fractions in exchange for respective portions of their owed underlying
wrapped assets is signatured-based gated (see TxAuthDataVerifierFacet) and is triggered when claimVestedAssets() is executed,
following a sequential pipeline of three phases:
-
State Check: The Platform interacts with its
VestingStatesub-internal facet to verify that the current state of the targeted campaign allows vested claims to occur. -
Eligibility Check: The Platform interacts with its
PurchaseEligibilityinternal facet to verify that the user (caller) meets the campaign's eligibility criteria. -
Vesting Action: The Platform interacts with its
DoVestingActionssub-internal facet to burn the caller's fraction balance and transfer to the caller the respective TGE and/or Cliff release (if TGE and/or Cliff releases are configured) as well as any vested portion(s) owed as per the vesting schedule. If additional releases and/or portions are owed, the user is also minted fractions with the appropriate ID in order to redeem them in future claims._
UnauthorizedInitialization
Thrown when trying to initialize from non admin account.
VestedAssetsClaimed
Emitted at claimVestedAssets().
initializeVestingSubSkeleton
Initializes the TxAuthDataVerifierFacetStorage by registering the attestor address.
_This function can only be called by the Admin (see AccessControlFacet.sol).
IMPORTANT:
- If the platform uses multiple NID skeletons or subskeletons, only one of them can be initialized._
Parameters
| Name | Type | Description |
|---|---|---|
| signer_ | address | The address of the designated off-chain service that generates the required signatures. |
claimVestedAssets
Burns amountOfFractions of idToBurn from the user and transfers the respective vested owed amount(s) of underlying
asset(s) to the user. If additional releases and/or portions are owed, the user is minted fractions with the appropriate
ID, allowing them to redeem those fractions in future claims.
_Users must meet eligibility criteria (see purchase Eligibility internal facets) and adhere to
the campaign's vested schedule (e.g., time-related constraints).
This function can only be executed if the transaction calldata contains the required signature and expiration block
(see requireTxDataAuth modifier).
Emits a {VestedAssetsClaimed} event._
Parameters
| Name | Type | Description |
|---|---|---|
| campaignId | uint256 | The unique identifier of the targeted campaign. |
| amountOfFractions | uint256 | The number of semi-fungible fractions to burn in exchange for the respective vested underlying asset(s). |
| idToBurn | uint256 | The ID of the semi-fungible fractions to burn, reflecting any portions and/or TGE/Cliff releases owed. |

