NonFundedSubSkeletonGenesisIds
Implementation of the NonFunded sub-skeleton facet for the TMI-Fraction Protocol.
_This facet serves as a sub-core component (sub-skeleton) of a TMI-Fraction Platform, enabling investors to claim and receive their principal from failed (non-funded) campaigns through fraction balance redemption.
IMPORTANT:
-
This implementation relies on
genesisIds
and must always be used in conjunction withPurchaseSkeletonGenesisIds.sol
, as well as internal facets that rely on it. -
The
genesisId
identification schema for semi-fungible (ERC1155) fractions enables precise tracking of purchased prices within campaigns. This is achieved by assigning fraction genesis IDs based on the price at which they were purchased. For example, if a campaign offers three different prices (full price, and two discounted prices) for its fractions, theupperGenesisId
will be set to2
. Thus, based on the above example, depending on the price at which an investor purchases fractions, they will receive:
The process of investors redeeming genesisIds
semi-fungible fractions for their principal within non-funded campaigns is triggered
when receiveFundsAfterNonFunded()
is invoked, following a sequential pipeline of five phases:
-
State Check: The Platform interacts with its
NonFundedState
sub-internal facet to verify that the campaign is in theNON_FUNDED
state. -
Eligibility Check: The Platform interacts with its
ReceiveAfterNonFundedEligibility
sub-internal facet to verify that the user (caller) meets the campaign's eligibility criteria to claim and receive their principal. -
Purchased Price Retrieval: The Platform interacts with its
PurchaseDiscount
internal facet to retrieve the applicable purchase price based on the providedgenesis
ID of the fractions to be redeemed. -
Redeem Action: The Platform interacts with its
Fraction
internal facet and burns the specifiedgenesis
ID amount of fractions from the user. -
Receive Action: The Platform interacts with its
DoReceiveAfterNonFunded
sub-internal facet and transfers the principal funds back to the user. The transferred funds are determined by the quantity of burned fractions and their corresponding purchase price._
FundsReceivedAfterNonFunded
Emitted at receiveFundsAfterNonFunded()
.
receiveFundsAfterNonFunded
Burns amountOfFractions
of genesisId
from the user and transfers the corresponding principal amount(s) of the
campaign's underlying funding asset(s) to the user.
_Users must meet eligibility criteria (see nonFunded
Eligibility sub-internal facets).
This action should only be allowed when the campaign's state is NON_FUNDED
.
Emits a {FundsReceivedAfterNonFunded} event._
Parameters
Name | Type | Description |
---|---|---|
campaignId | uint256 | The unique identifier of the targeted campaign. |
genesisId | uint256 | The genesis ID of the semi-fungible fractions to redeem. |
amountOfFractions | uint256 | The number of fractions to redeem. |
discountOperationData | bytes |