Comment on page

# TBC Examples

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

The slope was calculated by using Method 1: Using App token price, then converted using the Convert slope to numerator/denominator.

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

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

The slope was calculated by using Method 1: Using App token price, then converted using the Convert slope to numerator/denominator.

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

The end point does not have to correspond to the total token_b_liquidity. Any two points can be used on the line to determine the slope and fund it with any amount of liquidity. The example below shows up to the first 5,000,000 app tokens even though the application wants to supply 10,000,000 app tokens.

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

The slope was calculated by using Method 2: Using TVL, then converted using the Convert slope to numerator/denominator.

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 modified 1yr ago