Aragon FundraisingMarch 8, 2020 at 11:47am
Im not sure what channel this fit in so ill just drop it here. I was poking around with the Fundraising permissions and noticed there is a permission to
ADD_COLLATERAL_TOKEN_ROLE. In the contract the function takes a number of cryptic parameters
/*** @notice Add `_collateral.symbol(): string` as a whitelisted collateral token* @param _collateral The address of the collateral token to be whitelisted* @param _virtualSupply The virtual supply to be used for that collateral token [in wei]* @param _virtualBalance The virtual balance to be used for that collateral token [in wei]* @param _reserveRatio The reserve ratio to be used for that collateral token [in PPM]* @param _slippage The price slippage below which each market making batch is to be kept for that collateral token [in PCT_BASE]* @param _rate The rate at which that token is to be tapped [in wei / block]* @param _floor The floor above which the reserve [pool] balance for that token is to be kept [in wei]*/
- what does
virtualrefer to in the Supply and Balance?
- what is the
reserveRatio. is it a ratio between the tokens in the curve? and how do you calculate that in
as a concrete example, say I create an AF DAO and want to add
ANTto the curve. how would i determine the
also what would be a sane default forreserveRatio`
March 9, 2020 at 1:11pm
Hey. Unfortunately there are is « simple » answer to these questions which are all related to how bonding curves - and more specifically the
BancorFormula- work. You can start by having a look here and eventually read the
BancorFormulawhitepaper. That being said and to make it as simple as possible:
reserveRatiois the ratio between your collateral balance and your bonded token market-cap. It is a number between
but expressed in part-per-million -PPM
- for precision ends up being something between0
and1000000`. This parameter will define the « shape » of your cuve - linear, exponential, logarithmic, etc.
virtualrefers to the way we trick the curve into computing the price by adding some non-really-existent token supply and collateral balance into account in the price computation. This allows one to trick the curve starting price but also to « dilate » and « compress » the curve accordingly. There is no simple way to explain it, as the math behind are somehow complex, thus the questions we ask about your starting price and expected growth in the on-boarding template - from which we derive these parameters based on some calculations.
- To give you an idea in the default
reserveRatiois set to
0.1for DAI and
0.01for ANT. The
virtualparameters are derived from the set starting price.