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

IRampAController

Git Source

Interface for the RampAController contract that manages gradual A parameter changes

Functions

setMinRampTime

Sets a new minimum ramp time for A changes

function setMinRampTime(uint256 _newMinRampTime) external;

Parameters

NameTypeDescription
_newMinRampTimeuint256New minimum ramp time in seconds

rampA

Initiates the ramping of A from current value to the target over the specified duration

function rampA(uint256 _futureA, uint256 _futureTime) external;

Parameters

NameTypeDescription
_futureAuint256Target A value
_futureTimeuint256Timestamp when ramping should complete

stopRamp

Stops an ongoing ramp and freezes A at the current value

function stopRamp() external;

minRampTime

Returns the current minimum ramp time required for A changes

function minRampTime() external view returns (uint256);

getA

Returns the current A value based on the ongoing ramp progress or the static value if no ramp

function getA() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The current A value

isRamping

Checks if the controller is currently in a ramping state

function isRamping() external view returns (bool);

Returns

NameTypeDescription
<none>boolTrue if ramping, false otherwise

initialA

Returns the initial A value for the current/most recent ramp

function initialA() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The initial A value

futureA

Returns the target A value for the current/most recent ramp

function futureA() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The target A value

initialATime

Returns the timestamp when the current/most recent ramp started

function initialATime() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The timestamp

futureATime

Returns the timestamp when the current/most recent ramp will/did complete

function futureATime() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256The timestamp