Configuring Platform

Skeleton Facets

Skeletons represent mandatory facets that must be added to the diamond proxy when deploying a platform.

Note

Only the Skeleton facets relevant to the platform’s targeted functionality need to be included.

There are two sets of skeleton facets that enable the Campaign and the Campaign with buyback core functionalities, respectively:

Campaign requires 3 skeleton facets:

SkeletonDescription
CreateFractionsSkeletonProvides functionality to create fractions.
PurchaseSkeletonExposes functions that allow users to purchase fractions. There are four PurchaseSkeletons available that provide different functionality depending on the use case: TwoClickPurchaseSkeleton, PurchaseSkeletonDiscount, PurchaseSkeletonNoDiscount, PurchaseSkeletonGenesisIds.
ReceiveSkeletonProvides functionality to receive funds collected from a campaign.

Campaign with buyback requires 5 skeleton facets:

SkeletonDescription
CreateFractionsSkeletonProvides functionality to create fractions.
PurchaseSkeletonExposes functions that allow users to purchase fractions. There are four PurchaseSkeletons available that provide different functionality depending on the use case: TwoClickPurchaseSkeleton, PurchaseSkeletonDiscount, PurchaseSkeletonNoDiscount, PurchaseSkeletonGenesisIds.
ReceiveSkeletonProvides functionality to receive funds collected from a campaign.
BuybackSkeletonEnables the buyback functionality for users.
ReceiveAfterBuybackSkeletonAllows users to retrieve principal and interest after the buyback.

Eligibility Verification

Each Skeleton facet consumes the associated eligibility interface by calling it through the diamond proxy. It does not implement the interface itself but instead delegates eligibility checks to the corresponding internal eligibility facet.

For instance, the PurchaseSkeletonGenesisIds interacts with the IPurchaseEligibilityFacet interface, which allows checking whether a user can execute the purchase() function.

Below is an example of the function call to check the account eligibility:

IPurchaseEligibilityFacet(address(this)).checkPurchaserEligibility(campaignId, account, amountOfFractions);

The implementation of eligibility checks enables a robust mechanism where only accounts (users) matching specific criteria can participate in a campaign.

Developers are free to customize the eligibility verification mechanism by selecting the desired implementations and configuring them appropriately.

Note

Each skeleton facet delegates eligibility checks to its corresponding internal eligibility facet. This ensures that all user-facing transactional functions exposed by the skeleton are protected by access control logic. As a result, whenever users interact with platform functionality through a skeleton, their eligibility is automatically verified.

The next topic provides information on the subskeletons that provide additional functionality to the platform.

On this page