IFM_BC_Bancor_Redeeming_VirtualSupply_v1.sol
Last updated
Last updated
Author: Inverter Network
This contract enables the issuance and redeeming of tokens on a bonding curve, using a virtual supply for both the issuance and the collateral as input.
Set the reserve ratio used for issuing tokens on a bonding curve.
This function can only be called by the {Orchestrator_v1} admin.
Parameters
_reserveRatio
uint32
The new reserve ratio for buying, expressed in PPM.
Set the reserve ratio used for redeeming tokens on a bonding curve.
This function can only be called by the {Orchestrator_v1} admin.
Parameters
_reserveRatio
uint32
The new reserve ratio for selling, expressed in PPM.
Returns reserve ratio set for buying, used in the {BancorFormula} contract.
Returns
<none>
uint32
Reserve Ratio for buying.
Returns reserve ratio set for selling, used in the {BancorFormula} contract.
Returns
<none>
uint32
Reserve Ratio for selling.
Event emitted when the reserve ratio for buying is updated.
Parameters
newBuyReserveRatio
uint32
The new reserve ratio for buying.
oldBuyReserveRatio
uint32
The old reserve ratio for buying.
Event emitted when the reserve ratio for selling is updated.
Parameters
newSellReserveRatio
uint32
The new reserve ratio for selling.
oldSellReserveRatio
uint32
The old reserve ratio for selling.
Reserve ratio can not be be bigger than 100% expressed in PPM.
To avoid destructive precision loss when using the Bancor Formula, the Token decimals should:
Not be lower than 7 decimals.
Higher or equal to the collateral token decimals.
Invalid Bancor Formula contract
Buying and Selling must be closed before changing the virtual supply.
Funding manager does not hold the amount of collateral the payment client tries to transfer.
Struct used to store information about the bonding curve properties.
Properties
formula
address
The formula contract used to calculate the issuance and redemption rate.
reserveRatioForBuying
uint32
The reserve ratio, expressed in PPM, used for issuance on the bonding curve.
reserveRatioForSelling
uint32
The reserve ratio, expressed in PPM, used for redeeming on the bonding curve.
buyFee
uint256
The buy fee expressed in base points.
sellFee
uint256
The sell fee expressed in base points.
buyIsOpen
bool
The indicator used for enabling/disabling the buying functionalities on deployment.
sellIsOpen
bool
The indicator used for enabling/disabling the selling functionalities on deployment.
initialIssuanceSupply
uint256
The initial virtual issuance token supply.
initialCollateralSupply
uint256
The initial virtual collateral token supply.