Skip to content

Latest commit

 

History

History
715 lines (451 loc) · 39.4 KB

README.md

File metadata and controls

715 lines (451 loc) · 39.4 KB

Bostrom Network Simulation

Usage

  1. Install Python3 if you have not already
  2. Clone this repository
  3. Go to the bostrom_simulation folder
    cd bostrom
  4. Install requirements via pip3
    pip3 install -r requirements.txt
  5. Run
    jupyter notebook
  6. The notebook server should be running at http://127.0.0.1:8888
  7. Open simulation.ipynb
  8. Fill Initial state and Params for simulating sections
  9. On the top bar Kernel -> Restart & Run All
  10. Look at the results and conclude

Goals

This model was created to optimize parameters for launching the Bostrom Network.

We model the value of the BOOT token through the understanding of established network effects in Ethereum. Then we forecast gift claim dynamics and address growth based on approximated network effects. Assuming some demand for cyberlinks (based on address growth) we adjust the supply of cyberlinks accounting for computing capability and the growth of the Volt (V) token price. The given model also allows defining inflation parameters of BOOT to optimize investments into the hardware infrastructure.

Time

We model the Bostrom Network simulation as a (discreet) sequence of events in time. We define the timestep variable (syn t) as an integer number of time steps starting from network launch. timestep is used in formulas and definitions across this specification and defined as:

where time_from_launch_in_years is time from the system launch expressed in years (float data type).

For purposes of modeling we use timestep equal to 1 day. The simulation period is equal to 10 years (sim_period 10) .

Simulation Parameters

  • timesteps_per_year (365)
  • sim_period (10)

BOOT Supply

The BOOT supply on each timestep defines as the BOOT supply on the previous timestep plus provision on the current timestep:

The timestep_provision_boot variable is described in the BOOT minting and inflation subsection.

BOOT Minting and Inflation

The minting mechanism of the Bostrom Network corresponds to the minting mechanism of the Cosmos Network.

The minting mechanism was designed to:

  • allow for a flexible inflation rate determined by market demand targeting a particular bonded-stake ratio
  • effect a balance between market liquidity and staked supply

In order to best determine the appropriate market rate for inflation rewards, a moving change rate is used. The moving change rate mechanism ensures that if the boot_bonded_share is either over or under the boot_bonded_share_target, the inflation rate will adjust to further incentivize or disincentivize being bonded, respectively. Setting the boot_bonded_share_target at less than 100% encourages the network to maintain some non-staked tokens which should help provide some liquidity.

It can be broken down in the following way:

  • If the inflation rate is below the boot_bonded_share_target the inflation rate will increase until a maximum value - (boot_inflation_rate_max) is reached
  • If the boot_bonded_share_target (0.80 in bostrom network) is maintained, then the inflation rate will stay constant
  • If the inflation rate is above the goal boot_bonded_share_target the inflation rate will decrease until a minimum - value (boot_inflation_rate_min) is reached

In this model the target annual inflation rate is recalculated each timestep (in the network it is recalculated each block). The inflation is also subject to a rate change (positive or negative) depending on the distance from the desired ratio. The maximum possible rate change is defined to be boot_inflation_rate_change_annual per year, however, the annual inflation is capped as between boot_inflation_rate_min and boot_inflation_rate_max. In case of inflation higher than the boot_inflation_rate_max param, the inflation sets as boot_inflation_rate_max. In case of inflation lower than boot_inflation_rate_min param the inflation sets as boot_inflation_rate_min.

BOOT Supply and Inflation Rate

Initial Values

  • boot_supply (1e15)
  • boot_inflation_rate (0.05)

Simulation Parameters

  • boot_inflation_rate_max (0.15)
  • boot_inflation_rate_min (0.03)
  • boot_bonded_share_target (0.80)
  • boot_inflation_rate_change_annual_annual (0.20)

Modeling Bonded BOOT Amount (H Supply)

Agents (neurons) delegate liquid BOOT to heroes, and heroes mint corresponding amounts of Hydrogen (H).

We model boot_bonded_supply using the next formula:

where:

We model neurons bonding behavior using parameters boot_bonding_share_limit (0.85) and bonding_speed_coeff (0.01), where boot_bonding_share_limit is the ratio between boot_bonded_supply and boot_supply which neurons tend to have. bonding_speed_coeff is the speed of bonding at every timestep.

The one share of minted H tokens stays in the liquid state, another one is used for minting resource tokens (A and V). hydrogen_liquid_ratio parameter is used in the current model which describes the token share allocated to liquid H. The rest tokens are used for minting A and V in hydrogen_liquid_ratio.

H Supply

Initial Values

  • boot_bonded_supply (10e12)
  • hydrogen_supply (10e12)

Simulation Parameters

  • boot_bonding_share (0.8)
  • hydrogen_liquid_ratio (0.2)
  • boot_bonding_share_limit (0.85)
  • bonding_speed_coeff (0.01)
  • ampere_volt_ratio (0.5)

Gift Claim Dynamics

The addresses for gifts are defined in the research. This research concludes 4M addresses for distribution of 70% of BOOT tokens.

The boot_claimed_supply function has two phases:

  • before days_for_gift_activation
  • after days_for_gift_activation

It's expected that claimed_at_activation_share - boot_gift_amount_init amount of BOOTs will be reached in days_for_gift_activation. After that, (1 - claimed_at_activation_share) - boot_gift_amount_init should be claimed in days_for_gift_full_claim.

Therefore, the boot_claimed_supply function can be defined as a linear function with condition:

if t < days_for_gift_activation:

if t = days_for_gift_activation

if t > days_for_gift_activation:

boot_to_distribution_supply

In the case where tokens have already been claimed but not transferred they change their state to “to_distribution” state (ready to be transferred to neurons).

boot_frozen_supply

The boot_frozen_supply is defined as the token amount on the gift contract balance.

Therefore, the delta_boot_frozen_supply function can be represented in 3 phases:

if t < days_for_gift_activation:

if t >= days_for_gift_activation:

Assumptions:

  • neurons (agents_count_at_activation) will claim our gift. After that the gift will be activated
  • it will take days_for_gift_activation since genesis before the gift claiming process will be completed
  • neurons at the moment of gift activation will claim a share of the gift (claimed_at_activation_share)
  • the claim process can be extended on days_for_gift_full_claim in case the agents_count_at_activation does not reach the target goal by days_for_gift_activation

Initial Values

  • boot_frozen_supply (700e12)
  • boot_claimed_supply (0)
  • boot_to_distribution_supply (0)

Simulation Parameters

  • days_for_gift_activation (30)
  • claimed_at_activation_share (0.85)
  • days_for_gift_full_claim (150)
  • agents_count_at_activation (100'000)
  • boot_gift_amount_init (700e12)

Understanding Network Effects

Agents (Neurons) Growth

To model agents' growth dynamics of the Bostrom network, we did a regression analysis on ETH active addresses dynamics (excel spreadsheet online). We calculated ethereum active addresses as addresses with a balance more than 0.01 ETH (the balance sufficient to complete at least 1 transaction).

Dynamics of Ethereum Addresses

We have combined 2 trend lines and derived the following formula of addresses counting by days from ETH dynamics.

Assuming that there are much more crypto-agents now than there were at the time of the ETH launch, we adjusted the formula with coefficients to expect more rapid growth.

Neurons Forecast

Capitalization Dynamics

We decided to model the total capitalization_in_eth through capitalization_per_agent metric derived from ETH capitalization in BTC (from the 100th day after the launch until 2160th day, as on the first 100 days the ETH price in BTC fluctuated).

Ethereum Capitalization per Active Addresses in BTC

We derived this formula:

We assumed that the dynamics of capitalization of a BOOT token in ETH would resemble ETH token capitalization dynamics in BTC prices. We adjusted the formula so that our first-day capitalization_per_agent would be equal to 32 ETH (capitalization_per_agent).

BOOT Capitalization

Initial Values

  • capitalization_per_agent (32)
  • agents_count (750)

Simulation Parameters

  • agents_count_at_activation (100'000)

Capitalization and Price

capitalization_in_eth in ETH is defined by the formula:

gboot_price (Giga BOOT) price in ETH is defined by the formula:

Validators Revenue

Predicting V Demand

V are natural tokens. Each V enables its holder to produce 1 cyberlink daily. To simulate cyberlink usage we have derived a base estimate of cyberlinks_per_day formula from ETH data:

ETH Data

We derived this formula:

Then we adjusted this formula by multiplication coefficient (cyberlinks_trasactions_coeff) because we expect that neurons in the BOSTROM network would be more active than agents in ETH. Also, we adjusted this formula by adding a number of extra_links and guaranteed_links.

extra_links count depends on UX specifics, such as setting the name of a neuron, following (proportion of neurons) and extra:

The founding team plans to create cyberlinks for blockchain naming systems and tokens to make them searchable. By doing this we predict the demand on the V token will be higher.

We left extra_links and guaranteed_links count equal to 0 but it can be changed in the future.

cyberlinks Demand Forecast

Simulation Parameters

  • cyberlinks_trasactions_coeff (15)
  • extra_links (0)
  • guaranteed_links (0)

Adjusting A and V Supply

The system is designed this way: investminted volt_base_investmint_amount for volt_base_investmint_period yields 1 V.

The system is designed this way: investminted ampere_base_investmint_amount for ampere_base_investmint_period yields 1 A.

ampere_base_investmint_period, volt_base_investmint_period - are periods of investminting H token for the selected token (A or V) by the current neuron. These periods are chosen by neurons themselves according to their understanding and priorities of maximizing their benefits.

ampere_base_investmint_period, volt_base_investmint_period are limited by the investmint_max_period system setting, which has the dynamic formula written below.

Where horizon_period_init is the period before the first investmint_max_period raise.

ampere_base_halving_period, volt_base_halving_period - time period to decrease mint_rate variable.

ampere_mint_rate, volt_mint_rate are coefficients that regulate the amount of minted resource tokens A and V. They are set at the beginning and later these coefficients are halved each ampere_base_halving_period, volt_base_halving_period accordingly.

ampere_mint_rate, volt_mint_rate are limited by - ampere_mint_rate_min, volt_mint_rate_min parameters.

A Halving Cycles V Halving Cycles

Initial Values

  • ampere_mint_rate (1)
  • volt_mint_rate (1)
  • investmint_max_period (547)

Simulation Parameters

  • ampere_base_halving_period (547)
  • volt_base_halving_period (547)
  • ampere_mint_rate_min (0.01)
  • volt_mint_rate_min (0.01)
  • investmint_max_period_init (547)
  • horizon_period_init (547)

A and V Minting

A are minted according to the following formula:

V are minted according to the following formula:

In the model it is implemented as:

So, we can rephrase the formulas as:

We assume that investmint_period_share * investmint_max_period is an average period for investminting per neuron.

investmint_period_share has stochastic function representation with u = 0.5, sigma = 0.1.

A Supply V Supply

Simulation Parameters

  • investmint_period_share (N(0.5, 0.01))
  • ampere_volt_ratio (0.5)
  • ampere_base_investmint_amount (100'000'000)
  • volt_base_investmint_amount (1'000'000'000)
  • ampere_base_investmint_period (30)
  • volt_base_investmint_period (30)

GPU and CPU Usage Planning

We performed stress testing on the Testnet to measure resource usage. Testing took place on the server i7 9700, RAM 64GB, SSD SATA, GTX 1080 8GB.

Bostrom Testnet 4 1B links 100B links
cyberlinks 40'335'720 1'000'000'000 100'000'000'000
TPS 10 50 730
GPU RAM Usage, GB 2 46 4'562
GPU Time Usage, s 0.25 6 620
CPU RAM Usage, GB 48 1'200 120'000
CPU Time Usage, s 35 868 87'000

The number of transactions per second is the main indicator of the load on the system. We have chosen to calculate this indicator taking into account only the number of cyberlinks.

According to stress testing measurements on the Testnet we derived formulas for GPU memory usage, CPU memory usage, GPU time usage and CPU time usage:

where:

The particle_per_link parameter defines the amount of particles per cyberlink.

Transactions per seconds GPU Memory and Time Usage

Initial Values

  • gpu_memory_usage (0)
  • cpu_memory_usage (0)
  • cpu_time_usage (0)
  • gpu_time_usage (0)

Simulation Parameters

  • particle_per_link (0.1)

Investments into Infrastructure

We can estimate revenue of 1 validator in the ETH Equivalent, given that all validators have commission (validator_commission) equals validator_commission and that there are max_validator_count validators.

validator_revenue_gboot is defined by the formula:

Simulation parameters

  • validator_commission (0.1)
  • max_validator_count (92)

Mathematical Specification

Initial Values

  • boot_supply (1e15)

  • boot_inflation_rate (0.05)

  • boot_bonded_supply (10e12)

  • hydrogen_supply (10e12)

  • boot_frozen_supply (700e12)

  • boot_claimed_supply (0)

  • boot_to_distribution_supply (0)

  • capitalization_per_agent (32)

  • agents_count (750)

  • ampere_mint_rate (1)

  • volt_mint_rate (1)

  • investmint_max_period (547)

  • gpu_memory_usage (0)

  • cpu_memory_usage (0)

  • cpu_time_usage (0)

  • gpu_time_usage (0)

Summary of Simulation Parameters

  • timesteps_per_year (365)

  • sim_period (10)

  • boot_inflation_rate_max (0.15)

  • boot_inflation_rate_min (0.03)

  • boot_bonded_share_target (0.80)

  • boot_inflation_rate_change_annual_annual (0.20)

  • boot_bonding_share (0.8)

  • hydrogen_liquid_ratio (0.2)

  • boot_bonding_share_limit (0.85)

  • bonding_speed_coeff (0.01)

  • ampere_volt_ratio (0.5)

  • days_for_gift_activation (30)

  • claimed_at_activation_share (0.85)

  • days_for_gift_full_claim (150)

  • agents_count_at_activation (100'000)

  • boot_gift_amount_init (700e12)

  • agents_count_at_activation (100'000)

  • cyberlinks_trasactions_coeff (15)

  • extra_links (0)

  • guaranteed_links (0)

  • ampere_base_halving_period (547)

  • volt_base_halving_period (547)

  • ampere_mint_rate_min (0.01)

  • volt_mint_rate_min (0.01)

  • investmint_max_period_init (547)

  • horizon_period_init (547)

  • investmint_period_share (N(0.5, 0.01))

  • ampere_volt_ratio (0.5)

  • ampere_base_investmint_amount (100'000'000)

  • volt_base_investmint_amount (1'000'000'000)

  • ampere_base_investmint_period (30)

  • volt_base_investmint_period (30)

  • particle_per_link (0.1)

  • validator_commission (0.1)

  • max_validator_count (92)

Formulas used as it is

where:

Differential Equations

  • boot_supply - the supply of BOOT token
  • boot_inflation_rate - inflation on timesep
  • boot_bonded_supply - bonded (staked) network token amount (H Supply)
  • hydrogen_supply - the supply of H token
  • hydrogen_liquid_supply - liquid supply of H
  • boot_claimed_supply - claimed from contract BOOT amount
  • boot_frozen_supply - not claimed (frozen) network token amount
  • boot_liquid_supply - liquid network token amount
  • boot_to_distribution_supply - ready to transfer claimed BOOT amount
  • agents_count - the amount of the active neurons
  • capitalization_per_agent - the value of neuron in ETH
  • cyberlinks_count - number of cyberlinks
  • ampere_supply - A resource token amount
  • volt_supply - V token amount

where the rate of change () is:

where:

Conclusions

  1. The model allowed us to determine the parameters of inflation with a target of a 90% increase in BOOT supply relative to its genesis over a period of 10 years.

    BOOT Supply and Inflation Rate

  2. The model made it possible to predict the monthly growth of the validator's profitability from 1 ETH to 15 over a period of 10 years.

    Validators Revenue

  3. The model made it possible to define the parameters of investmint and halving on the basis of the assumption that the demand for cyberlinks will exceed supply in 2.5 years, and therefore the need for creating cyberlinks will significantly exceed the capabilities of the system and ensure the growth of V token relative to BOOT. The following parameters are proposed:

    • ampere_base_halving_period (547)
    • volt_base_halving_period (547)
    • investmint_max_period_init (547)
    • horizon_period_init (547)
    • ampere_mint_rate_min (0.01)
    • volt_mint_rate_min (0.01)

    Demand and Supply of cyberlinks