Skip to main content
OTC facet internal library

initializeOtc

Check IOtcUtils interface for documentation

updateOtcConfig

Check IOtcUtils interface for documentation

addOtcCollateralBalance

Check IOtcUtils interface for documentation

sellGnsForCollateral

Check IOtcUtils interface for documentation

getOtcConfig

Check IOtcUtils interface for documentation

getOtcBalance

Check IOtcUtils interface for documentation

getOtcRate

Check IOtcUtils interface for documentation

_getSlot

Returns storage slot to use when fetching storage relevant to library

_getStorage

Returns storage pointer for storage struct in diamond contract, at defined slot

_getMultiCollatDiamond

Returns current address as multi-collateral diamond interface to call other facets functions.

_calculateGnsAmount

Calculate GNS amount for given collateral amount

Parameters

_calculateGnsDistribution

Calculate GNS distribution for treasury, GNS staking and burn

Parameters

_distributeTreasuryGns

Distributes treasury rewards in GNS tokens

Parameters

_distributeStakingGns

Distributes staking rewards in GNS tokens

Parameters

_burnGns

Burns GNS tokens

Parameters