Fraction ProtocolinternalFacetsbuybackPhaseFacetsbuybackAmountFacetsfixedInterest

FixedInterestBuybackAmountFacet

FixedInterestBuybackAmountFacet

UnauthorizedInitialization

error UnauthorizedInitialization(address account)

Thrown when trying to initialize from non admin account.

UnauthorizedUpdate

error UnauthorizedUpdate(address account)

Thrown when trying to update buyback amount from non admin account.

BuybackAmountInitialized

event BuybackAmountInitialized(uint256 minInterestPercentage, uint256 maxInterestPercentage)

BuybackAmountPercentageUpdated

event BuybackAmountPercentageUpdated(uint256 minInterestPercentage, uint256 maxInterestPercentage)

initBuybackAmountFacet

function initBuybackAmountFacet(bytes initBuybackAmountData) external

setAndCheckBuybackAmounts

function setAndCheckBuybackAmounts(bytes postFractionsAmountData) external

handleBuybackAmounts

function handleBuybackAmounts(uint256 campaignId, uint256 packetsBuybackAmount) external

getPacketsBuybackAmount

function getPacketsBuybackAmount(uint256 campaignId) external view returns (uint256)

Function that returns the packets that should be paid to buyback.

This function is only called by Lending Oracle when the setPriceLimitsOnPostReceive hook is invoked.

Parameters

NameTypeDescription
campaignIduint256The ID of the targeted campaign.

setMinInterestPercentage

function setMinInterestPercentage(uint256 minInterestPercentage) external

Function that sets the minimum interest percentage.

This function is only callable by the admin.

Parameters

NameTypeDescription
minInterestPercentageuint256The minimum interest percentage.

setMaxInterestPercentage

function setMaxInterestPercentage(uint256 maxInterestPercentage) external

Function that sets the maximum interest percentage.

This function is only callable by the admin.

Parameters

NameTypeDescription
maxInterestPercentageuint256The maximum interest percentage.

On this page