pub fn schedule_bootstrap<T: Config>(
    first_token_id: <<T as Config>::Currency as MultiTokenCurrency<<T as Config>::AccountId>>::CurrencyId,
    second_token_id: <<T as Config>::Currency as MultiTokenCurrency<<T as Config>::AccountId>>::CurrencyId,
    ido_start: BlockNumberFor<T>,
    whitelist_phase_length: Option<u32>,
    public_phase_length: u32,
    max_first_to_second_ratio: Option<(<<T as Config>::Currency as MultiTokenCurrency<<T as Config>::AccountId>>::Balance, <<T as Config>::Currency as MultiTokenCurrency<<T as Config>::AccountId>>::Balance)>,
    promote_bootstrap_pool: bool
)
Expand description

Used for starting/scheduling new bootstrap

Args:

  • first_token_id - first token of the tokens pair
  • second_token_id: second token of the tokens pair
  • ido_start - number of block when bootstrap will be started (people will be allowed to participate)
  • whitelist_phase_length: - length of whitelist phase
  • public_phase_lenght- length of public phase
  • promote_bootstrap_pool- whether liquidity pool created by bootstrap should be promoted
  • max_first_to_second_ratio - represented as (numerator,denominator) - Ratio may be used to limit participations of second token id. Ratio between first and second token needs to be held during whole bootstrap. Whenever user tries to participate (using Pallet::provision extrinsic) the following conditions is check.
all previous first participations + first token participations             ratio numerator
----------------------------------------------------------------------- <= ------------------
all previous second token participations + second token participations     ratio denominator

and if it evaluates to false extrinsic will fail.

Because of above equation only participations with first token of a bootstrap pair are limited!

Examples

Consider:

  • user willing to participate 1000 of first token, when:
    • ratio set during bootstrap schedule is is set to (1/2)
    • sum of first token participations - 10_000
    • sum of second token participations - 20_000

participation extrinsic will fail because ratio condition is not met

10_000 + 10_000      1
--------------- <=  ---
    20_000           2
  • user willing to participate 1000 of first token, when:
    • ratio set during bootstrap schedule is is set to (1/2)
    • sum of first token participations - 10_000
    • sum of second token participations - 40_000

participation extrinsic will succeed because ratio condition is met

10_000 + 10_000      1
--------------- <=  ---
    40_000           2

If one doesn’t want to limit participations in any way, ratio should be set to (u128::MAX,0) - then ratio requirements are always met

all previous first participations + first token participations                u128::MAX
----------------------------------------------------------------------- <= ------------------
all previous second token participations + second token participations            1

Warning: Doc-Only

This function is an automatically generated, and is doc-only, uncallable stub. See the real version in Pallet::schedule_bootstrap.