Cosmic Bonding enables developers to build any application that needs to use algorithmically-determined token pricing to mint, burn or swap tokens on any Cosmos network implementing our SDK module.
Engineering token bonding curves
This is a vibrant and rapidly-evolving focus of crypto-economic engineering, with many potential Defiant use cases, such as automated market-makers (like Uniswap), decentralised exchanges (like Bancor), curation markets (like Relevant), development Impact Bonds (like ixo alpha-Bonds) and continuous organisations (like Moloch DAO).
A variety of parametric functions (algorithms) can be implemented for token bonding curves. These include: exponential, logarithmic, negative exponential, constant product, positive initial price, quasi-polynomial, and reserved Supply (Augmented bonding curves).
The Cosmic Bonding module
With the Cosmic Bonding module, it is possible to add any conceivable pricing function to a library that will be called on by an application, to trustlessly execute the algorithm. The first library we have developed is for a generic highly versatile polynomial equation.
The design separates logic from transactions (state transitions). Invariant parameters for each token bonding curve are pre-defined when initialising a Cosmic Bond. This is a simple transaction (see how on Github). It rather elegantly sets up a bonding curve for any application :-) We hope this will encourage experimentation, using this crypto-economic primitive in innovative ways, with the idea that “…prices are an instrument of communication and guidance which embody more information than we directly have”. (F.H. Hayek)
The Cosmic Bonding function is called by an application sending a signed message to the Cosmic Bonding module. This message includes variables such as the order quantity and maximum price per token that the user is willing to pay. The module dynamically outputs an integral price based on these parameters. If the order is confirmed, this passes outputs to the Cosmos SDK Bank module for the transaction to be completed. Balances, fees and accounts are automatically updated in the ledger. That’s it!
We built a protoype of the Cosmic Bonding module at the Cosmos HackAtom in Berlin, where our team Simply ixo was selected as one of the 7 hackathon winners. This will be further developed into a production-ready module that can be extended with additional features, such as batched order processing to prevent front-runnning.
We plan to include a Suggested Price feature that will calculate a risk-adjusted price for any given bonding curve, using an alpha coefficient (read more about this in our article about Alpha Bonds).