IOtcUtils
Interface for GNSOtc facet (inherits types and also contains functions, events, and custom errors)
initializeOtc
Initializer for OTC facet
Parameters
updateOtcConfig
Updates OTC config
Parameters
_config
new OTC Config. Sum of treasuryShareP
, stakingShareP
, burnShareP
must equal 100 and premiumP
must be less than or equal to MAX_PREMIUM_P
addOtcCollateralBalance
Increases OTC balance for a collateral
Parameters
_collateralIndex
uint8
collateral index
_collateralAmount
uint256
amount of collateral to increase (collateral precision)
sellGnsForCollateral
OTC Buys GNS from caller for _amountCollateral
of _collateralIndex
Parameters
_collateralIndex
uint8
collateral index
_collateralAmount
uint256
amount of collateral to trade (collateral precision)
getOtcConfig
Returns OTC Config
getOtcBalance
Returns OTC balance for a collateral (collateral precision)
Parameters
_collateralIndex
uint8
collateral index
getOtcRate
Returns OTC rate (price + premium) of GNS in collateral (1e10)
Parameters
_collateralIndex
uint8
collateral index
OtcConfigUpdated
Emitted when OTCConfig is updated
Parameters
config
struct IOtc.OtcConfig
new OTC config
OtcBalanceUpdated
Emitted when OTC balance is updated
Parameters
collateralIndex
uint8
collateral index
balanceCollateral
uint256
new balance (collateral precision)
OtcExecuted
Emitted when an OTC trade is executed
Parameters
collateralIndex
uint8
collateral index
collateralAmount
uint256
amount of collateral traded (collateral precision)
gnsPriceCollateral
uint256
effective gns/collateral price, including premium (1e10)
treasuryAmountGns
uint256
amount of GNS sent to treasury (1e18)
stakingAmountGns
uint256
amount of GNS sent to GNS Staking (1e18)
burnAmountGns
uint256
amount of GNS burned (1e18)
InvalidShareSum
Last updated