NonFundedSubSkeletonNoDiscount
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, allowing investors to redeem their fraction balances and reclaim their principal from failed (non-funded) campaigns.
IMPORTANT:
- This implementation must always be used in conjunction with
PurchaseSkeletonNoDiscount.sol
and its dependent internal facets.
The process of investors redeeming fractions (fungible or semi-fungible) for principal in 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
Price
generic facet to retrieve the purchase price of the specified campaign. -
Redeem Action: The Platform interacts with its
Fraction
internal facet and burns the specified 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 purchase price._
FundsReceivedAfterNonFunded
Emitted at receiveFundsAfterNonFunded()
.
receiveFundsAfterNonFunded
Burns amountOfFractions
from the caller and transfers the corresponding principal amount(s) of the
campaign's underlying funding asset(s) to the caller.
_Users must meet eligibility criteria (see nonFunded
Eligibility sub-internal facets).
IMPORTANT:
- If the fractions are semi-fungible, their ID is always
0
, as no discounted prices are featured. Therefore, specifying an ID is unnecessary.
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. |
uint256 | ||
amountOfFractions | uint256 | The number of fractions to redeem. |
bytes |