The What and The Why of Bonding Curves

ETHCC 4 · July 2021 · 22:34

Paula Pettit explains bonding curves and their use in creating token liquidity through automated market makers. She discusses applications involving NFTs and token design, curve shapes and the behaviors those algorithms can incentivize.

Speakers

Topics

From ETHCC 4, hosted by Ethereum France.

Transcript

hi good morning everyone my name is paula petit and i am the head of business development at linum labs we are a smart contract and blockchain product development house today we i will be talking about bonding curves which is a type of smart contract that we've been developing quite a bit of recently and have seen quite a bit of demand so wanted to dive into them a little bit more today so what is a bonding curve so a bonding curve is basically a smart contract that allows users to mint and burn along a predetermined algorithm and the pricing algorithm is basically a graphable curve that defines the relationship between the token supply and the price where the price of the token increases with the amount of tokens that have been minted

so the flow so a smart contract basically as i said allows a user to mend and burn off of the predetermined algorithm the price is usually determined in a reserve currency we like to use die because it's a stable currency if you do your reserve currency as ethereum obviously your price is going to fluctuate with the price of ethereum as well so it's a little bit of increased volatility so we like to do it on a stable coin with the reserve currency such as die the user can then go to the smart contract and buy their bonding curve token so they can mint it depending on how much they want the dye they send in will then go to the smart contract and be reserved there until other people want to come and burn and take the reserve currency out

the price will move along the bonding curve in relation to the amount of supply the user has minted so to move the price up for future buyers and at any time as i said the user can come and burn and sell their token back on it and they'll likely if the price has gone up at that point obviously make some return on that so there are a couple key features to bonding curves the first thing is the determined price so before it even launches you know at what price it's going to be depending on the amount of tokens minted um it it also has a continuous price so if you you can also develop a stable coin on a bonding curve but basically every other bonding curve um will go up with more

more tokens minted and it has immediate liquidity so a bonding curve is an automatic market maker such as uni swap but with the algorithm on top of it um so yeah as i said um the price only goes up if the demand and supply actually goes up some people when they hear about bonding curves and they hear that there's a predetermined algorithm in it they kind of assume it just goes up to go up obviously you need the demand if if people pull out it'll go down just as quickly as it went up um the best way to create a bonding curve is to relate it to an actual product so movement on the bonding curve will relate to actual feedback

of a product in the ecosystem so if you create a bonding curve on a meme or something i mean it could go up but it could just as easily get rugged so these are best when you have a product and you build the algorithm according to specific parameters that make sense with your system so designing a bonding curve there are a couple key features you want to think about before you even go into it um obviously smart contracts once they're deployed they can't be changed so you need to think about your full product cycle and what you want to accomplish when you launch it so first off there are a couple things you need to consider usually early investors should be rewarded the most they obviously came in early they believed in your product took the most risk

they should be rewarded accordingly opportunities for price manipulation will be taken advantage of um the bonding curve is the oracle of truth so everybody will come back to this smart contract to mint and burn on it as i said if um it doesn't relate to any price any real world value it could get rugged and there's an estimated amount of capital that you can expect to return when you launch your own bonding curve it's probably if you're a small token or a small project probably not reasonable reasonable to expect that you will have a market cap of a couple billion but maybe a couple million so you should model your bonding curve based off that range and the growth of a tokens project is likely to follow an

s-curve which i will get into shortly there's a lot of different ways you can model it but i do believe the s-curve is the best one let's see so here are a couple of very high level bonding curves so first off in the top left you have the polynomial curve it is probably the worst curve you could make for your project um although many of our clients requested and we have to tell them why it's a terrible idea and move move them far away from it in the top middle we have the s curve and all of these um curves i will go into more depth shortly in the far right at the top we have a piecewise function here we have a stable token so as more tokens are minted the price does not

move we have a linear in the bottom and then we have a sub linear in the bottom right and all of these we will go into more depth but the for just so you know the x-axis is the token supply and the y-axis is the price at any point first off we'll start with the most basic linear curves go back to algebra one y equals mx plus b or you know the price equals the slope um times the token supply plus wherever it starts out it's very simple to launch it doesn't give you very much control over what you want to accomplish you can do it but unless you have a good reason as to why you'd want to do it i don't know if it makes the most sense but

you know it is it is simple and it's a nice place to start moving on to polynomials the one we get requested quite a bit a lot of times by people very new to the space i think they just want to launch something that goes up very quickly but for many reasons it doesn't make sense so basically in a polynomial curve the growth starts very slowly in the beginning and it gains acceleration and speeds up to very aggressive rates this is about the exact opposite of what you'd want in you know when you're launching a token for fundraising for a project because you have your early investors come in there in the beginning there's not much price movement and then as soon as a lot of investors come in it

starts moving at unsustainable rates so whether you were the first investor or the 10th investor it may not make that much difference but then you know you come in a little bit later and the price is just going wild which really just is not very sustainable um and this can be defined by this um equation here which you can read it i'm not going to um speak it out but basically the larger the a and n variables are the more aggressive the growth will be um and as i said it's nearly the direct opposite behavior that you'd expect from a project sublinear curves these make a little bit more sense so they can be accomplished using logarithmic and root based functions and they reflect a more conservative

approach to growth so these immediately reward early investors as you see it obviously goes up very quickly but at that point you could then set a max amount that you'd want the token really to go to the max supply where people are still incentivized to keep buying in so if you see in this curve here it kind of evens out at about 60. that one starts eating out about a hundred so if you know you only want to raise a certain amount of capital for your project you can start um you can you can model it this way and if you then want it to stabilize once more people come in this would be a good curve for you and um this this um this equation um basically the larger the a and the n are in the equation

the more aggressive this growth will be so the s curve um as i mentioned this one is my favorite so it moves very slowly in the beginning grows aggressively in the middle and eventually settles out once it reaches reaches maturity so basically if you have a project you want to launch it and you want to get investors out there you could launch your bonding curve and start sharing it with your investor friends you know the close community those investors will get the price at a va or the token at a very similar price but then you could basically dictate when you would want it to start growing quickly you could then say you know once i have about this much capital this much this many tokens minted i would like it to start growing quite aggressively

and that would be really good to start promoting you know bull use um bull investors and a larger community to be excited about this token because it's growing very quickly um so but then you could do that growth through a certain amount of time but then you would have it stabilized at a later portion so you could say once we reach this level of maturity um then we would like it to calm down and this one matches most closely to a project being launched you have your your slow growth in the beginning while you're getting everything in order and then yeah you're getting that tons of excitement and then once you reach market product fit it kind of stabilizes out and maybe you don't need so much kind of

craziness around the token um and this this model does attract early potentially large investors and um yeah once the ceiling is reached which you would be able to predetermine the price studies out and the most complex one which is is a is a really good one if you have a lot of different variables that you'd like to consider in your curve is the piecewise curve so this function is not uh dictated by a singular function such as the other ones it's dictated by multiple ones across several different areas so if you see here in this first one in the beginning it's a pretty slow linear curve then it takes a small exponential growth and then it stables out at the very top

and you would define that as you know zero to five it acts in this way five to ten it acts in another and ten on it moves um forward this is the most complex but if you if you know what you want to achieve that this is the best one so um how you read it obviously i said the price of the token at any point will be related to the token supply at any point um and as i said so this curve right here is a polynomial curve it is the worst curve i've said but it is really easy to help um explain the point i'm trying to make on it um so this curve you could say it's basically like y equals x squared it looks pretty basic like that or current price equals token supply squared

it did not get the square root when it went through design there but it's token supply squared um so yeah so if the price if two tokens have been minted the price will be four if you go higher if 12 tokens have been minted you square it the price is 144. pretty simple right however once you start you know buying multiple tokens you have slippage we all know what slippage is especially you know with these small tokens they can they can move very very drastically if you put in a decent size order so how you determine slippage um is basically um by calculating the pool balance at any time heads up i'm going to go a little bit

into the math here but it's not it's not too crazy um but essentially so the token supply at any point is or the pool balance at any point is the area under the um token supply curve so if you go back to calculus it's the integral of the curve at any point so if you want to find the pool balance so basically the amount of die that is locked up in the smart contract when you've when users have come in and bought you basically take the integral of the price equation so for this one it'd be pool balance equals the integral of the price which is the integral of token supply squared um and that equals one-third token supply cubed if you remember in calculus if you don't it does equal that

and what that does is so you can see um if if at two one sec there we go so basically if i came in at two tokens being minted i would see that the price is four and i'd be like great i want to buy 10 more tokens it's going to be 40 40 die to buy those tokens if you have a very small pool you would be surprised to find out that that is not the case so if you then take the integral as i mentioned one third token supply cubed if you find the price for tokens over the next 10 you basically want to find the pool balance at the end and find the pool balance at the beginning and minus them so basically it'd be the price for tokens equals 1 3

12 cubed minus one-third two cubes um so basically that's 573 which makes the effective price per token 57 die per token instead of that original four and obviously that's very very aggressive but we're talking about right now a very tiny pool and a very aggressive um curve but it's good to kind of explain what why that is so aggressive and why that's maybe not the best option very large slippage um so yeah just taking that a little bit further so you have the supply at two the price equals four that would make it um yeah effective price of 57.3 as i mentioned

but then let's say another investor comes in at supply equals 12 they would see the price equals 144 they're okay with it they do another 10 tokens and you do that same equation it's now 2973 or 297 die per token um obviously extrapolate that down a little bit more then you have basically 10 000 die for token for the person who comes a little bit after that this is not a sustainable way to to bring in investors and have investors stay as soon as they you know see those kinds of gains they're out and you're back down so obviously it's not it's not a very intelligent way to build your curve but it is really good to see

how this slippage can be affected the beauty of the bonding curve is that using the algorithm you can see how the slippage will be affected at any singular time with any sort of purchase so in conclusion um bonding curves are only as good as the math you you put into it they're a really really smart tool but if you don't build them intelligently they're they're going to be useless so you it's really important to set up some time beforehand to really figure out your goals where you'd like to start what kind of users you'd like to bring in how much money you'd like to um how much money you'd like to get in the contract before having it stabilized out and this is what we do with a lot of our

clients we we sit down with them we do the token models we figure out their business goals and try and translate that into what what would be an effective token curve for them but they are a smarter way to launch tokens versus just putting out an ico or an erc20 just with with no parameters in it they're very very intelligent and we've worked with a lot of really good clients on launching them our most um notable one recently was actually ethereum swarm we helped launch their bzz token um which has been very exciting to watch um but yeah so if they're done right they're really really smart but just don't come and request a polynomial curve it's just not a good idea um so yeah my name is uh paula pt if you do have more questions i know this one

was very kind of math-based but hopefully it was insightful in some ways um i am as i said i work for linum labs you can email me here or you can reach us at any of these uh social media links but otherwise it's been a pleasure being here thank you guys [Applause] oh yeah if there's any questions i don't know how many minutes we have yes hi hey thank you i was like running in here to make sure i could listen um so i had a question about like since you mentioned you work with like different projects yes have you ever had a project where i don't know they set up their tokenomics badly maybe one of the bad

careers and you know you have to go in and like reconstruct it like i guess my question's like what happens to token projects that um kind of either pick the wrong model is there any room for adjustment can you like take um a i don't know a polynomial curve and then change it to like another one like what's your thoughts around like mistakes like for example i'm working on a dow project where we we did a very uh similar bonding curve too i believe the right name is we did like a sublinear curve okay if you want to switch it to like i don't know an s curve i just i want to hear your thoughts um so you know basically once the smart contracts deployed it is deployed i'm trying to remember we

have basically with our clients we we prefer that they launch with with a curve that we believe in we we don't really like to launch curbs that we don't believe in um i believe there is something you can do but it won't be in the same smart contract if somebody from the audience knows a little bit um about that feel free to speak up but i do believe we have talked about it and you'd have to kind of like move it to yeah to be honest i think there is ways you can do it but it's not going to be in the same smart contract so that might not be that helpful of an answer i apologize so you discussed the usage of curve for

basically selling tokens uh do you have any things to share about maybe using different curves for things like vesting schedules no but that is a great idea i mean you know we have done where there's basically a drop beforehand and you know all the early investors you know receive it before it then goes to the overall public and that's when the actual smart contract is launched so if you have a private sale to investors you could not launch the the token yet have it at the private investor price sell it out to everybody there say maybe it's locked up for the amount of time maybe if it's an employee if it's an investor if it's a developer it's locked up and that would operate in a separate area and then you

would launch the curve and you would maybe start the supply at a certain area and then it would go up from there yeah so i have a following question from the past question so sorry um i'm actually wondering if the use case we're having with bonding curves is i would say a bit light in the sense that maybe we can bring them to further heights like investing schedules pricing models for in for landing protocols etc do you think there's a i would say a bull case for bonding curves to actually uh enter a totally new era in terms of where you can implement them not just in pricing models for uh raising absolutely so i definitely focused on the fundraising model because it's one

that we've worked in quite quite often but you can use bonding curves for a variety of things you can do curation markets using bonding curves where you reward early people for curating content within a small platform and you know it goes up based on that you can launch different things so we've launched basically nfts on bonding curves where the nft has a pool and it's it basically creates like a market for each nft where users can then buy in with their shares um to have it go up and down but for that small market um see there's many things you can do with them this was definitely a very high level as far as like the math behind it i'm i i was an engineering background so this is like

what was interesting to me um but there's definitely a lot more you can do as far as the applications and and going farther with it so definitely here yeah so great talk thank you um talking about fundraising uh what do you think or linum labs about the liquidity pools uh the bootstrapping liquidity pools on balancer the what was what was last liquidity bootstrapping pulls on balancer what do you think about it um i mean you definitely need to have some liquidity to start um i love the bonding curves because it does create that automatic market so you know if you put in that original reserve currency the users will be able to buy and sell into it um

but you i mean you definitely need some liquidity to start but and about the changing weights the way of changing weights for this way of of bootstrapping i mean balancing what they do is 95 yeah we do different reserve ratios so um i can't add too much to that um but yeah sorry i can't add too much that but i do like that it's it's automatic and with the reserve ratio you can make it obviously be kind of an exponent of the amount of liquidity you originally put in thank you no more questions cool

thank you guys you