Contract for swapping stable token for VAI token and vice versa to maintain the peg stability between them.
The divisor used to convert fees to basis points.
The mantissa value representing 1 (used for calculations).
The value representing one dollar in the stable token.
VAI token contract.
The address of the stable token contract.
The address of ResilientOracle contract wrapped in its interface.
The address of the Venus Treasury contract.
The incoming stableCoin fee. (Fee for swapStableForVAI).
The outgoing stableCoin fee. (Fee for swapVAIForStable).
The maximum amount of VAI that can be minted through this contract.
The total amount of VAI minted through this contract.
A flag indicating whether the contract is currently paused or not.
Initializes the contract via Proxy Contract with the required parameters.
Parameters
Swaps VAI for a stable token.
Parameters
Return Values
Swaps stable tokens for VAI with fees.
Parameters
Return Values
Pause the PSM contract.
Resume the PSM contract.
Set the fee percentage for incoming swaps.
Parameters
Set the fee percentage for outgoing swaps.
Parameters
Set the address of the Venus Treasury contract.
Parameters
Set the address of the ResilientOracle contract.
Parameters
Calculates the amount of VAI that would be burnt from the user.
Parameters
Return Values
Calculates the amount of VAI that would be sent to the receiver.
Parameters
Return Values
enum FeeDirection {
IN,
OUT
}feeOut_
uint256
The percentage of fees to be applied to a VAI -> stablecoin swap.
vaiMintCap_
uint256
The cap for the total amount of VAI that can be minted.
accessControlManager_
address
The address of the AccessControlManager contract.
venusTreasury_
address
The address where fees will be sent.
oracleAddress_
address
The address of the ResilientOracle contract.
feeIn_
uint256
receiver
address
The address where the stablecoin will be sent.
stableTknAmount
uint256
The amount of stable tokens to receive.
[0]
uint256
The amount of VAI received and burnt from the sender.
receiver
address
The address that will receive the VAI tokens.
stableTknAmount
uint256
The amount of stable tokens to be swapped.
[0]
uint256
Amount of VAI minted to the sender.
feeIn_
uint256
The new fee percentage for incoming swaps.
feeOut_
uint256
The new fee percentage for outgoing swaps.
venusTreasury_
address
The new address of the Venus Treasury contract.
oracleAddress_
address
The new address of the ResilientOracle contract.
stableTknAmount
uint256
The amount of stable tokens to be received after the swap.
[0]
uint256
The amount of VAI that would be taken from the user.
stableTknAmount
uint256
The amount of stable tokens provided for the swap.
[0]
uint256
The amount of VAI that would be sent to the receiver.
The percentage of fees to be applied to a stablecoin -> VAI swap.
uint256 BASIS_POINTS_DIVISORuint256 MANTISSA_ONEuint256 ONE_DOLLARcontract IVAI VAIaddress STABLE_TOKEN_ADDRESScontract ResilientOracleInterface oracleaddress venusTreasuryuint256 feeInuint256 feeOutuint256 vaiMintCapuint256 vaiMintedbool isPausedfunction initialize(address accessControlManager_, address venusTreasury_, address oracleAddress_, uint256 feeIn_, uint256 feeOut_, uint256 vaiMintCap_) externalfunction swapVAIForStable(address receiver, uint256 stableTknAmount) external returns (uint256)function swapStableForVAI(address receiver, uint256 stableTknAmount) external returns (uint256)function pause() externalfunction resume() externalfunction setFeeIn(uint256 feeIn_) externalfunction setFeeOut(uint256 feeOut_) externalfunction setVenusTreasury(address venusTreasury_) externalfunction setOracle(address oracleAddress_) externalfunction previewSwapVAIForStable(uint256 stableTknAmount) external view returns (uint256)function previewSwapStableForVAI(uint256 stableTknAmount) external view returns (uint256)