GNSOtc
Facet #11: OTC (Handles buy backs and distribution)
constructor
initializeOtc
Initializer for OTC facet
Parameters
Name | Type | Description |
---|---|---|
_config | new OTC Config |
updateOtcConfig
Updates OTC config
Parameters
Name | Type | Description |
---|---|---|
_config | new OTC Config. Sum of |
addOtcCollateralBalance
Increases OTC balance for a collateral
Parameters
Name | Type | Description |
---|---|---|
_collateralIndex | uint8 | collateral index |
_collateralAmount | uint256 | amount of collateral to increase (collateral precision) |
sellGnsForCollateral
OTC Buys GNS from caller for _amountCollateral
of _collateralIndex
Parameters
Name | Type | Description |
---|---|---|
_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
Name | Type | Description |
---|---|---|
_collateralIndex | uint8 | collateral index |
getOtcRate
Returns OTC rate (price + premium) of GNS in collateral (1e10)
Parameters
Name | Type | Description |
---|---|---|
_collateralIndex | uint8 | collateral index |
Last updated