Fraction ProtocolskeletonFacets

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

event FundsAfterBuybackReceived(uint256 campaignId, address account, uint256 amountOfFractions)

Emitted at receiveFundsAfterBuyback().

receiveFundsAfterBuyback

function receiveFundsAfterBuyback(uint256 campaignId, uint256 amountOfFractions) external

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

NameTypeDescription
campaignIduint256The unique identifier of the targeted campaign.
amountOfFractionsuint256The amount of fractions to redeem.

getObligationToEachFraction

function getObligationToEachFraction(uint256 campaignId) external view returns (uint256)

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

NameTypeDescription
campaignIduint256The unique identifier of the targeted campaign.

On this page