Commons Swarm work is coming to an end so it’s time to show off the outcomes of our last months of work. This is the first of a series of posts explaining the products that we have produced for 1hive’s future network of DAOs (aka Gardens):
- Part 1: The Augmented Bonding Curve: A plug-and-play bonding curve
- Part 2: The Hatch: A fundraising module for DAOs
- Part 3: EVM-Crispr: A tool to mutate a DAO’s DNA
I think the community is going to enjoy each one of these articles, so let’s start with the first one: The Augmented Bonding Curve.
1hive took Aragon Black Fundraising suite and transformed it into the Marketplace apps and a template previously known as Gardens (today we would be calling it Commons). The main differences between Aragon Black Fundraising and 1hive Marketplace suites were as follows:
- The DAO template was simplified, so we did not have a board / beneficiary mulisig anymore, but a common pool governed with Conviction Voting.
- We also removed the Tap app, a mechanism similar to the DAICO proposed by Vitalik. The common pool was funded instead using the bonding curve entry and exit tributes, as it was proposed by the Commons Stack model.
- The batched bancor market maker was simplified to not require to wait for some blocks to be mined in order to perform a buy or a sell in the Bonding Curve. The new bancor market maker used the minReturn approach to prevent front running instead of the batched bonding curve method.
The 1hive Marketplace apps were composed of:
- The Presale app, a fundraising app that can be used to bootstrap a DAO. It has the goal to reach a certain amount of funding in a specific period of time, and distribute the initial DAO tokens.
- The Bancor Formula app, an external contract that encodes the mathematical functions to calculate the amount of tokens that can be bought or sold for a specific amount of collateral tokens.
- The Bancor Market Maker app, an app connected to the Bancor Formula that mints/burns tokens based on the amount of funds that users deposits/withdraws from the reserve. It is also the piece of software that applies the entry and exit tributes.
- The Marketplace Controller, an app that has permissions over the Presale and the Bancor Market Maker and is used as a Mediator to interact with them.
The template was tested by 1hive during a short period of time, but we pivoted to a simpler token policy DAO that used the Issuance app when 1hive was lauched to xDai. New 1hive Gardens will follow this simplified design by default as well.
This is not the case of the Token Engineering Commons Garden, which is following the Commons Stack original design of using an Augmented Bonding Curve along with Conviction Voting to govern the funds of the DAO. For making it possible we reused the work that 1hive did previously on the marketplace app.
The marketplace apps still had to be used as a pack, since both Presale and Bancor Market Maker had Marketplace Controller as a dependency. This fact made the use of the individual apps difficult, so our work focused on decoupling those apps into:
- The Hatch app (previously Presale): Now we can do a DAO fundraising without the need of installing a Bonding Curve. More on this on the second part of this series of articles.
- The Augmented Bonding Curve app: A single app that has all the features of the previous marketplace bonding curve, but without the need of installing multiple apps. Thanks to that, now it is much much easier to install a Bonding Curve on a pre-existing DAO as it can be seen in the last section of this article.
We also adapted the Aragon Convert frontend, previously used by Aragon to convert ANT into ANJ and viceversa, to use the new non-batched bonding curve. You can find it under the name of TEC convert. It has the following features:
- We generalized the frontend so now it can be used with any pair of tokens.
- It now applies the entry and exit tributes to the predicted amount of returned tokens.
- It fetches the reserve ratio, virtual balance and virtual supply from the smart contract, so you don’t have to.
With very little changes (some configurations and few images) this front-end can be used for any Garden that wants to use a bonding curve. An example of how it works can be seen at rinkeby.convert.tecommons.org.
We can install the a Bonding Curve using the following steps:
- Install a vault that we will use as the reserve.
- Install an
augmented-bonding-curve.openapp with the following initialization parameters:
- Create the following Augmented Bonding Curve permissions:
MANAGE_COLLATERAL_TOKEN_ROLEgranted to Voting
- Grant the following permissions to Augmented Bonding Curve:
- Token Manager’s
- Token Manager’s
- New vault’s
- Token Manager’s
addCollateralTokenwith the following parameters to open trading:
- Collateral token address
- Virtual supply (can be set to 0)
- Virtual balance (can be set to 0)
- Reserve ratio (in PPM)
You can use the EVM-crispr terminal to encode all of those commands within the following script (look forward the third part of this series for more details):
connect <dao-addr> token-manager voting install agent:reserve install augmented-bonding-curve.open:abc token-manager <formula-addr> agent:reserve agent:0 <entry-tribute>e18 <exit-tribute>e18 grant ANY_ENTITY augmented-bonding-curve.open:abc MAKE_BUY_ORDER_ROLE voting grant ANY_ENTITY augmented-bonding-curve.open:abc MAKE_SELL_ORDER_ROLE voting grant voting augmented-bonding-curve.open:abc MANAGE_COLLATERAL_TOKEN_ROLE voting grant augmented-bonding-curve.open:abc token-manager MINT_ROLE voting grant augmented-bonding-curve.open:abc token-manager BURN_ROLE voting grant augmented-bonding-curve.open:abc agent:reserve TRANSFER_ROLE voting exec augmented-bonding-curve.open:abc addCollateralToken <collateral-addr> 1 0 <reserve-ratio>e6
Edit November 15th, 2021: This article has been updated for the newest version of the augmented bonding curve.