TBC Examples
1. Examples using App token price
Example 1.1
An applications wants to supply 10,000,000 app tokens to the TBC swap with curve parameters growing the price from 0.01 sRLY to 10 sRLY over the course of swapping 10,000,000 App tokens
Slope = 9.99 x 10^-16
token_b_liquidity = 10_000_000_000_000_000
slope_numerator = 999
slope_denominator = 1_000_000_000_000_000_000
init_price_a_numerator = 1
init_price_a_denominator = 100

Example 1.2
An applications wants to supply 10,000,000 app tokens to the TBC swap with curve parameters growing the price from 0.25 sRLY to 5 sRLY over the course of swapping the first 5,000,000 App tokens
Slope = 9.5×10^−16
token_b_liquidity = 10_000_000_000_000_000
slope_numerator = 95
slope_denominator = 100_000_000_000_000_000
init_price_a_numerator = 25
init_price_a_denominator = 100

2. Examples using TVL
Example 2.1
An applications wants curve parameters growing the price from 0.25 sRLY to 5 sRLY over the course of 500,000 TVL in sRLY
Slope = 2.49375×10^−14
token_b_liquidity = 540_883_000_000_000
slope_numerator = 24375
slope_denominator = 1_000_000_000_000_000_000
init_price_a_numerator = 25
init_price_a_denominator = 100

Last updated