# How?

The Help Steps (HS) to Help Steps X (HSX) conversion mechanism works by using a bonding curve to ensure a non-inflationary conversion process. The bonding curve is established using a fixed total supply of HSX tokens and a pool of HS.

The total score of the system is calculated by multiplying the assets in the bonding pool, which is a constant value. When a user wants to convert HS to HSX, the system calculates the total amount of HS in the pool and divides it by that constant. The resulting value determines how many HSX tokens should be left in the pool, with the difference between the initial pool state and this value representing the number of HSX tokens that will be given to the user.

There is a 0.5% fee collected by the app for every HS to HSX conversion, with the collected HSX tokens being permanently burned to reduce the total supply of HSX. This ensures that the HSX token remains non-inflationary, with its value increasing as more users convert their HS to HSX or redeem HSX for items in the in-app marketplace.

$q: constant = 1.25 * 10^{25} \\a_{hs}: \text{amount of HS in the pool before user swap} \\ a'_{hs}: \text{amount of HS in the pool after user swap} \\ a_{hsx}: \text{amount of HSX in the pool before user swap} \\ a'_{hsx}: \text{amount of HSX in the pool after user swap} \\ {\Delta} : \text{amount of HS or HSX being deposited to the pool by the user}$

The amount of HSX user receives by swapping HS to HSX is calculated as;

$q/(a_{hs} + {\Delta}) = a'_{hsx} \\ {\Delta}_{hsx} = a_{hsx} - a'_{hsx}: \text{Net amount of HSX extracted from the pool} \\ {\Delta}_{hsx} * 0.995: \text{The amount of HSX received by the user} \\ {\Delta}_{hsx} * 0.005: \text{The amount of HSX burned}$

And the amount of HS user receives by swapping HSX to HS is calculated as;

$q/(a_{hsx} + {\Delta}) = a'_{hs} \\ {\Delta}_{hs} = a_{hs} - a'_{hs}: \text{Net amount of HS extracted from the pool} \\ {\Delta}_{hs} * 0.995: \text{The amount of HS received by the user} \\ {\Delta}_{hs} * 0.005: \text{The amount of HS burned}$

Last updated