PSM
Peg Stability Contract.
Contract for swapping stable token for VAI token and vice versa to maintain the peg stability between them.
Solidity API
BASIS_POINTS_DIVISOR
The divisor used to convert fees to basis points.
MANTISSA_ONE
The mantissa value representing 1 (used for calculations).
ONE_DOLLAR
The value representing one dollar in the stable token.
VAI
VAI token contract.
STABLE_TOKEN_ADDRESS
The address of the stable token contract.
oracle
The address of ResilientOracle contract wrapped in its interface.
venusTreasury
The address of the Venus Treasury contract.
feeIn
The incoming stableCoin fee. (Fee for swapStableForVAI).
feeOut
The outgoing stableCoin fee. (Fee for swapVAIForStable).
vaiMintCap
The maximum amount of VAI that can be minted through this contract.
vaiMinted
The total amount of VAI minted through this contract.
isPaused
A flag indicating whether the contract is currently paused or not.
initialize
Initializes the contract via Proxy Contract with the required parameters.
Parameters
swapVAIForStable
Swaps VAI for a stable token.
Parameters
Return Values
swapStableForVAI
Swaps stable tokens for VAI with fees.
Parameters
Return Values
pause
Pause the PSM contract.
resume
Resume the PSM contract.
setFeeIn
Set the fee percentage for incoming swaps.
Parameters
setFeeOut
Set the fee percentage for outgoing swaps.
Parameters
setVenusTreasury
Set the address of the Venus Treasury contract.
Parameters
setOracle
Set the address of the ResilientOracle contract.
Parameters
previewSwapVAIForStable
Calculates the amount of VAI that would be burnt from the user.
Parameters
Return Values
previewSwapStableForVAI
Calculates the amount of VAI that would be sent to the receiver.
Parameters
Return Values
Last updated