# How do the Smart Tokens work?

The main thing to note about the StarsX smart tokens is that they are transferable ERC-20 compatible tokens that are both created and destroyed by the holding Fractionable NFT, meaning that they are automatically liquidated. Each token represents a share in the NFT, with users able to trade and hold onto, liquidate, or purchase more tokens at any time in exchange for the bank of reserve tokens they hold.

The price and supply of tokens is based on the Constant Reserve Ratio inspired by Bancor – with this Constant Reserve Ratio set by StarsX and influenced by STAX holders’ voting.

At present, the price of tokens is established using the following equation:

Price = \frac{Balance}{Supply \* CRR}Price=Supply∗CRRBalance

In practice, this means that a constant ratio is kept between the reserve token balance and the smart token’s market value. In order to ascertain the smart token purchase and liquidation cost, the equation divides the market value by supply.

This price can be impacted in a number of ways, with each new purchase and liquidation adjusting the reserve balance and smart token supply, and thus changing the cost price. When a user buys a set of new smart token, the payment for that purchase is added to the reserve balance and their smart tokens are issued. This smart token purchase will cause the price to increase because the purchase action has increased both the supply figure and the reserve balance. When smart tokens are liquidated by the user, those tokens are removed from the supply reserve and a price decrease will incur.

The following graph represents how this works in practice:

![](https://3409080429-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQGRRfOQHkNmvEeu_lK%2F-MQH90SUAF_E_NV304T7%2F-MQH9GITjC1YkLBJRyOP%2FTokens%20Outstandings.png?alt=media\&token=6c92b51e-21c6-461d-919c-cbf51324110c)

The price of any given smart token must be calculated as a function of the transaction amount – that is, how many smart tokens are received in exchange for a reserve token? And how many reserve tokens are received in exchange for a smart token?

If R = Reserve Token Balance; S = Smart Token Supple; F = Constant Reserve Ratio

T = S((1 + \frac{E}{R})^F-1)T=S((1+RE)F−1)

E=R(1-\sqrt\[F]{1-\frac{T}{S}})E=R(1−F1−ST)
