Staking Protocolinterfaces
IVirtualAmountMultiplierFacet
It defines the basic interface of VirtualAmountMultiplier facets.
initVirtualAmountMultiplierFacet
Initialization function.
The structure and content of initVirtualAmountMultipliersData
are implementation specific.
Parameters
Name | Type | Description |
---|---|---|
initVirtualAmountMultipliersData | bytes | The ABI-encoded initialization data. |
setCampaignVirtualAmountMultipliers
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
Name | Type | Description |
---|---|---|
campaignId | uint256 | The unique identifier of the targeted staking campaign. |
campaignVirtualAmountMultipliersData | bytes | The ABI-encoded data containing the amount multipliers configuration. |
applyVirtualAmountMultiplier
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
Name | Type | Description |
---|---|---|
campaignId | uint256 | The unique identifier of the targeted staking campaign. |
nftId | uint256 | The unique identifier of the NFT associated with the position. |
totalAmountStaked | uint256 | The actual raw balance (in staked input packets) of the position. |
Return Values
Name | Type | Description |
---|---|---|
virtualAmountStaked | uint256 | The calculated virtual balance of the position. |
getAmountMultiplier
Retrieves the amount multiplier applied to the specified staking position.
Amount multipliers are scaled by 1e18, allowing for 18 decimal precision.
Parameters
Name | Type | Description |
---|---|---|
nftId | uint256 | The unique identifier of the NFT associated with the position. |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The amount multiplier value applied to the position. |