Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IKeeper

Git Source

Interface for the Keeper contract that enforces parameter bounds for curators

Functions

rampA

Allows curators to gradually ramp the A coefficient within allowed bounds

function rampA(uint256 newA, uint256 endTime) external;

Parameters

NameTypeDescription
newAuint256The target A value
endTimeuint256Timestamp when ramping should complete

setMinRampTime

Set the minimum ramp time

function setMinRampTime(uint256 newMinRampTime) external;

Parameters

NameTypeDescription
newMinRampTimeuint256is the new minimum ramp time

setSwapFee

Set the swap fee within allowed bounds

function setSwapFee(uint256 newFee) external;

Parameters

NameTypeDescription
newFeeuint256The new swap fee value

setMintFee

Set the mint fee within allowed bounds

function setMintFee(uint256 newFee) external;

Parameters

NameTypeDescription
newFeeuint256The new mint fee value

setRedeemFee

Set the redeem fee within allowed bounds

function setRedeemFee(uint256 newFee) external;

Parameters

NameTypeDescription
newFeeuint256The new redeem fee value

setOffPegFeeMultiplier

Set the off-peg fee multiplier within allowed bounds

function setOffPegFeeMultiplier(uint256 newMultiplier) external;

Parameters

NameTypeDescription
newMultiplieruint256The new off-peg fee multiplier value

setExchangeRateFeeFactor

Set the exchange rate fee within allowed bounds

function setExchangeRateFeeFactor(uint256 newFeeFactor) external;

Parameters

NameTypeDescription
newFeeFactoruint256The new exchange rate fee value

setBufferPercent

Set the buffer within allowed bounds

function setBufferPercent(uint256 newBuffer) external;

Parameters

NameTypeDescription
newBufferuint256The new buffer value

setTokenSymbol

Set the token symbol

function setTokenSymbol(string calldata newSymbol) external;

Parameters

NameTypeDescription
newSymbolstringThe new token symbol

setDecayPeriod

Set the decay period

function setDecayPeriod(uint256 newDecayPeriod) external;

Parameters

NameTypeDescription
newDecayPerioduint256The new decay period in seconds

setRateChangeSkipPeriod

Set the rate change skip period

function setRateChangeSkipPeriod(uint256 newSkipPeriod) external;

Parameters

NameTypeDescription
newSkipPerioduint256The new skip period in seconds

updateFeeErrorMargin

Set the fee error margin within allowed bounds

function updateFeeErrorMargin(uint256 newMargin) external;

Parameters

NameTypeDescription
newMarginuint256The new fee error margin value

updateYieldErrorMargin

Set the yield error margin within allowed bounds

function updateYieldErrorMargin(uint256 newMargin) external;

Parameters

NameTypeDescription
newMarginuint256The new yield error margin value

distributeLoss

Distribute any losses incurred

function distributeLoss() external;

pause

Pause the SPA

function pause() external;

unpause

Unpause the SPA

function unpause() external;

cancelRamp

Allows guardians to cancel an ongoing A ramp in emergencies

function cancelRamp() external;

getRegistry

Get the parameter registry used for bounds checking

function getRegistry() external view returns (IParameterRegistry);

Returns

NameTypeDescription
<none>IParameterRegistryThe parameter registry address

getRampAController

Get the RampAController being managed

function getRampAController() external view returns (IRampAController);

Returns

NameTypeDescription
<none>IRampAControllerThe RampAController address

getSpa

Get the SelfPeggingAsset being managed

function getSpa() external view returns (SelfPeggingAsset);

Returns

NameTypeDescription
<none>SelfPeggingAssetThe SelfPeggingAsset address

getSpaToken

Get the SPA token being managed

function getSpaToken() external view returns (SPAToken);

Returns

NameTypeDescription
<none>SPATokenThe SPA token address

Events

RampAInitiated

event RampAInitiated(uint256 oldA, uint256 newA, uint256 endTime);

MinRampTimeUpdated

event MinRampTimeUpdated(uint256 oldTime, uint256 newTime);

SwapFeeUpdated

event SwapFeeUpdated(uint256 oldFee, uint256 newFee);

MintFeeUpdated

event MintFeeUpdated(uint256 oldFee, uint256 newFee);

RedeemFeeUpdated

event RedeemFeeUpdated(uint256 oldFee, uint256 newFee);

OffPegFeeMultiplierUpdated

event OffPegFeeMultiplierUpdated(uint256 oldMultiplier, uint256 newMultiplier);

ExchangeRateFeeFactorUpdated

event ExchangeRateFeeFactorUpdated(uint256 oldFactor, uint256 newFactor);

BufferPercentUpdated

event BufferPercentUpdated(uint256 oldBuffer, uint256 newBuffer);

TokenSymbolUpdated

event TokenSymbolUpdated(string oldSymbol, string newSymbol);

DecayPeriodUpdated

event DecayPeriodUpdated(uint256 oldPeriod, uint256 newPeriod);

RateChangeSkipPeriodUpdated

event RateChangeSkipPeriodUpdated(uint256 oldPeriod, uint256 newPeriod);

FeeErrorMarginUpdated

event FeeErrorMarginUpdated(uint256 oldMargin, uint256 newMargin);

YieldErrorMarginUpdated

event YieldErrorMarginUpdated(uint256 oldMargin, uint256 newMargin);

LossDistributed

event LossDistributed();

ProtocolPaused

event ProtocolPaused();

ProtocolUnpaused

event ProtocolUnpaused();

RampCancelled

event RampCancelled();

TreasuryChanged

event TreasuryChanged(address indexed oldTreasury, address indexed newTreasury);

AdminFeeWithdrawn

event AdminFeeWithdrawn(address indexed to, uint256 amount, uint256 bufferLeft);