Fraction ProtocolsubInternalFacetsnonFundedPhaseFacetsdoReceiveAfterNonFundedFacets
ReceiveBackFundsFacet
ReceiveBackFundsFacet
initDoReceiveAfterNonFundedFacet
setAndCheckReceiveAfterNonFunded
doReceiveAfterNonFunded
Transfers the calculated amount of funding packets from the platform to account
via the employed FundingPacket facet.
Executed in the context of receiveFundsAfterNonFunded()
of non funded sub-skeletons when an investor redeems their fractions
for their principal.
The invocation of IFundingPacketFacet.transferFundingPackets()
occurs only if packetsToSend
is nonzero.
This is crucial because pricePerFraction
may ultimately be zero (e.g., fractions purchased with 100% discount).
Some implementations of tokens used as funding currency may require nonzero amounts, potentially causing a revert
in their transfer functions. This safeguard ensures the receive funds (principal) after non funded process remains stable.
Parameters
Name | Type | Description |
---|---|---|
campaignId | uint256 | The ID of the targeted campaign. |
amountOfFractions | uint256 | The number of fractions being redeemed. |
pricePerFraction | uint256 | The cost of a single fraction (in terms of input/funding packets). |
account | address | The account receiving back his principal (if any). |