Implement “Trust Economy bonding curves” on Zilliqa : Varies token price depending on Personal Trust Score

Gaudiy Inc.
6 min readSep 6, 2019

--

Implement Trusted bonding curve which accelerate Trusted Economy in Web3.0 era

Bonding Curve is an automatic market maker and its smart contract is enables users to buy and sell tokens. Each community token can be exchanged with liquidity, also, the value through product can be evaluated in same way anywhere. In the point of community activities for Dapps, this makes closer to realize the view of Web3.0.

We also publish the Trusted bonding curve constructed on Zilliqa as OSS.

What is Gaudiy?

Gaudiy creates the decentralized autonomous community platform, and it can return the value to users corresponding to the contribution autonomously. Lastly, we aim to get out of centralized organization and establish DAO for co-creation.

Especially, in the point of Blockchain, we focus on how we return the the value created through the decentralized autonomous activities in community autonomously. To realize that, we conduct the experiments on application to demonstrate the token design as the means of preservation, distribution, and exchange of value.

What is Bonding Curve?

Bonding Curve contract can determine the token price by regulating the token supply.

Bonding Curve is the automatic market maker to regulates the supply of Continuous Tokens depending on the quantity of pooled tokens in contract such as ETH, ERC20. Also, these pooled tokens can be exchanged according to a price set by a smart contract.

The following chart shows the relation between token supply and token price.

X-axis demonstrates the Token supply, and y-axis shows Token Price.

We can determine the token price on smart contract by adjusting the shape of this function.

The purchase price corresponds to the gray part in the following chart, when you use reserve token to purchase the Continuous Tokens in bonding curve.

Continuous Token is minted by pooling reserve token corresponding to token price, and its price will be calculated by integrating the price function.

Because the price of the token changes with each infinitesimally small change in token supply, if we want to buy k tokens, we must integrate the price function.

When you sell it, a Continuous Token can be burned to return reserve token in contract.

About the sigmoid function in bonding curve

Sigmoid function is utilized for statistics, machine learning and so on.

This sigmoid function enable us to modulate price rate depending on phases flexibly.

Around the start-point, the price curve changes slowly, and it restrain some speculative procedure.

Similarly, at the point of growing up the demands, the price will vary slowly, and this makes easier to use as means of payment.

To sum up, while restraining the speculative procedure, it is easy to use as means of payment around the practical phase.

Calculating system of purchase price

To make easier to calculating on smart contract, utilizing algebraic function

Based on this equation, while using this equation to manage token, make the equation of token price by modifying some points to make easier to modulate by parameter.

Add intercept in order to range of function cannot have minus value, also, add -b in order to price cannot have the value at the time : x is 0 or less.

In addition, if we use the normal sigmoid function, y-axis will be 0 or less, so multiply α to reflect the suitable price.

Then, the function falls in second quadrant, and it can be used to set the token price.

Integrating this price function, we can calculate the quantity of deposited tokens in specific section.

Define the function integrated from 0 to x as Collateral Function.

Trust and Commission fee model

At the time of bigger variation of price, we aim to restrain the speculative procedure partly by diverging between purchase and sale.

Also, at the time of poor and great token demand, instead of smaller price range, commission fee will be as small as possible.

Decreasing the commission fee at lower value level means ease access to the community.

The more value can be returned to the people who expect of the community and are contributing to that if speculative factor is avoided at the level of no intrinsic value.

In particular, using the following equation, it is enable to modulate the commission fee dynamically.

The commission fee equation depending on Trust Score

Gaudiy evolved the above commission fee model, and introduced dynamic tax model as the mechanism which can modulate the commission fee automatically depending on the trust score in service.

Set a coefficient α voluntarily, and in case of greatest trust score in service, you can modulate how much the basic commission fee will be.

The equation of purchase price and sale price after integrating the above commission fee model is as follows.

The equation of purchase

the quantity of original token at the time of pooling g sheets of key currency : x* is calculated as follows.

The equation of sale

The quantity of key currency at the time of selling n sheets of original token : g is calculated as follows.

Summary

Utilizing the above mechanism, it enables user to own and use the value which created by the activities in decentralized autonomous community, which Gaudiy aims at.

Here is the source code.

https://github.com/gaudiy/bonding-curve

References

Bonding Curves In Depth: Intuition & Parametrization

https://blog.relevant.community/bonding-curves-in-depth-intuition-parametrization-d3905a681e0a

Token Bonding Curve Design Parameters

Gaudiy

https://hp.gaudiy.com/

--

--

Gaudiy Inc.

Gaudiy, a Tokyo-based Web3 company, develops and offers Gaudiy Fanlink, a Web3-era fan community platform that maximizes fans’ passions.