ReceiveAfterBuybackSkeleton
Implementation of the ReceiveAfterBuybackSkeleton skeleton facet for the TMI-Fraction Protocol.
_This facet serves as a core component (skeleton) of a TMI-Fraction Platform, enabling investors in campaigns to receive their principal plus accrued interest after a successful buyback.
After a buyback, each purchased fraction is associated with an obligation (principal + interest). Investors can receive their obligation by redeeming their fractions.
This skeleton should only be utilized by Platforms that support SALE BBO (BuyBackOption) campaigns.
The process of investors receiving their principal and interest is triggered when receiveFundsAfterBuyback()
is executed,
following a sequential pipeline of three phases:
-
Eligibility Check: The Platform interacts with its
ReceiveAfterBuybackEligibility
Internal facet to verify the eligibility of the user (caller) attempting to receive their funds and interest. -
State Check: The Platform interacts with its
ReceiveAfterBuybackState
Internal facet to verify that the current state of the targeted campaign is the correct state for the receipt of principal and interest to occur. -
Receive Action: The Platform interacts with its
DoReceiveAfterBuyback
Internal facet to burn the user's fractions and subsequently transfer the corresponding funds (obligation based on the number of fractions redeemed) from the Platform to the user (caller)._
FundsAfterBuybackReceived
Emitted at receiveFundsAfterBuyback()
.
receiveFundsAfterBuyback
Burns the specified amount of the user's fractions and transfers the corresponding principal plus accrued interest (determined by the campaign's interest and the number of fractions redeemed) from the Platform to the user.
User must meet eligibility criteria (see receiveAfterBuyback
Eligibility internal facets) as well as
have a balance of fractions issued from the specified campaign.
Parameters
Name | Type | Description |
---|---|---|
campaignId | uint256 | The unique identifier of the targeted campaign. |
amountOfFractions | uint256 | The amount of fractions to redeem. |
getObligationToEachFraction
Retrieves the obligation per fraction (denominated in funding packets amount) for a specified campaign.
Returns zero if a buyback has not occurred for the specified campaign.
Parameters
Name | Type | Description |
---|---|---|
campaignId | uint256 | The unique identifier of the targeted campaign. |