Staking ProtocolsubInternalFacetsvirtualLockMultipliernoVirtualLockMultiplier

NoVirtualLockMultiplierFacet

This facet implementation disables the application of lock multipliers when users lock assets within staking campaigns, ensuring that rewards are calculated without the influence of lock multipliers.

In addition to lock scaling, staking campaigns may also scale rewards based on the allocated staked amounts (i.e., amount multipliers). This implementation focuses solely on preventing any adjustments related to lock periods, ensuring that users receive rewards without the influence of lock multipliers.

setCampaignVirtualLockMultipliers

function setCampaignVirtualLockMultipliers(uint256 campaignId, bytes campaignVirtualLockMultipliersData) external

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

Setter functions are executed during the creation process of campaigns (see CampaignCreationSkeleton.sol). This function is intentionally left empty, as no lock multipliers should be applied when using this facet.

Parameters

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

applyVirtualLockMultiplier

function applyVirtualLockMultiplier(uint256, uint256) external view returns (uint256)

Returns the lock multiplier applied to the specified staking position.

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

Return Values

NameTypeDescription
[0]uint256The base value of 1e18, indicating that no lock multiplier is applied.

getCurrentLockMultiplier

function getCurrentLockMultiplier(uint256) external pure returns (uint256)

Retrieves the lock multiplier currently applied to the specified position.

Lock multipliers are scaled by 1e18, allowing for 18 decimal precision. Lock multipliers are only accounted for rewards during positions lock period.

Return Values

NameTypeDescription
[0]uint256The base value of 1e18, as no lock multipliers are supported.

getVirtualBalance

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

Retrieves the virtual balance of the specified position, calculated as the position's actual raw balance (staked input packets) multiplied by the applicable amount and lock multiplier.

This implementation returns the virtual balance of the position accounting only for any applicable amount multiplier, since no lock multipliers are applied in this context.

Parameters

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

Return Values

NameTypeDescription
[0]uint256The virtual balance of the position accounting only for any applicable amount multiplier.

getVirtualBalanceForAmount

function getVirtualBalanceForAmount(uint256, uint256 amountOfPackets) external pure returns (uint256)

Retrieves the virtual amount of packets based on the specified amount of packets and the position's applicable lock multiplier (virtualAmount = amountOfPackets * lockMultiplierApplied).

This function returns the specified amount of packets, as no lock multipliers are applied in this context.

Parameters

NameTypeDescription
uint256
amountOfPacketsuint256The number of packets to account for.

Return Values

NameTypeDescription
[0]uint256The specified amount of packets, since no lock multiplier is applied.

On this page