PriceBoundPSM
contract to create a price bound DAI PSM This contract will allow swaps when the price of DAI is between 98 cents and 1.02 by default These defaults are changeable by the admin and governance by calling floor and ceiling setters setOracleFloor and setOracleCeiling
Functions
constructor
constructor
Parameters
Name | Type | Description |
---|---|---|
| uint256 | minimum acceptable oracle price |
| uint256 | maximum acceptable oracle price |
| struct PegStabilityModule.OracleParams | PSM construction params |
| uint256 | |
| uint256 | |
| uint256 | |
| uint256 | |
| uint256 | |
| contract IERC20 | |
| contract IPCVDeposit |
setOracleFloorBasisPoints
sets the floor price in BP
Parameters
Name | Type | Description |
---|---|---|
| uint256 |
setOracleCeilingBasisPoints
sets the ceiling price in BP
Parameters
Name | Type | Description |
---|---|---|
| uint256 |
isPriceValid
return wether the current oracle price is valid or not
_setCeilingBasisPoints
helper function to set the ceiling in basis points
Parameters
Name | Type | Description |
---|---|---|
| uint256 |
_setFloorBasisPoints
helper function to set the floor in basis points
Parameters
Name | Type | Description |
---|---|---|
| uint256 |
_validPrice
helper function to determine if price is within a valid range
Parameters
Name | Type | Description |
---|---|---|
| struct Decimal.D256 |
_validatePriceRange
reverts if the price is greater than or equal to the ceiling or less than or equal to the floor
Parameters
Name | Type | Description |
---|---|---|
| struct Decimal.D256 |
Last updated