Staking Protocolinterfaces

IVirtualAmountMultiplierFacet

It defines the basic interface of VirtualAmountMultiplier facets.

initVirtualAmountMultiplierFacet

function initVirtualAmountMultiplierFacet(bytes initVirtualAmountMultipliersData) external

Initialization function.

The structure and content of initVirtualAmountMultipliersData are implementation specific.

Parameters

NameTypeDescription
initVirtualAmountMultipliersDatabytesThe ABI-encoded initialization data.

setCampaignVirtualAmountMultipliers

function setCampaignVirtualAmountMultipliers(uint256 campaignId, bytes campaignVirtualAmountMultipliersData) external

Setter function for configuring amount multipliers for the specified staking campaign.

Setter functions are executed during the creation process of campaigns. The structure and content of campaignVirtualAmountMultipliersData are implementation specific.

Parameters

NameTypeDescription
campaignIduint256The unique identifier of the targeted staking campaign.
campaignVirtualAmountMultipliersDatabytesThe ABI-encoded data containing the amount multipliers configuration.

applyVirtualAmountMultiplier

function applyVirtualAmountMultiplier(uint256 campaignId, uint256 nftId, uint256 totalAmountStaked) external returns (uint256 virtualAmountStaked)

Applies the respective amount multiplier to the specified position based on the campaign's configuration and the position's total staked amount of input packets.

Parameters

NameTypeDescription
campaignIduint256The unique identifier of the targeted staking campaign.
nftIduint256The unique identifier of the NFT associated with the position.
totalAmountStakeduint256The actual raw balance (in staked input packets) of the position.

Return Values

NameTypeDescription
virtualAmountStakeduint256The calculated virtual balance of the position.

getAmountMultiplier

function getAmountMultiplier(uint256 nftId) external view returns (uint256)

Retrieves the amount multiplier applied to the specified staking position.

Amount multipliers are scaled by 1e18, allowing for 18 decimal precision.

Parameters

NameTypeDescription
nftIduint256The unique identifier of the NFT associated with the position.

Return Values

NameTypeDescription
[0]uint256The amount multiplier value applied to the position.

On this page