TROJANFOUNDATION / Trojan-DAO-Token-Engineering

Home Page:https://www.trojanfoundation.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

1st place in the Token Engineering Track and Silver Overall đźŹ† at Diffusion October 2019

README

Description

Playing with Moloch DAO with a Bonding Curve Pool token.

Users can mint, burn, and hold the currency and participate in its governance by voting on decisions concerning the allocation / distribution of funds generated via "DAO Tax".

The proposed implementation would operate on the Ethereum blockchain and would be backed by Ether - The reserve is leveraged into a credit supply, which automatically mints new tokens via a bonding curve smart-contract, a concept originally developed by Eyal Hertzog which he calls the Bancor Protocol.

We included a "DAO Tax" implementation to the token contract. Whenever the token is minted from the token's smart contract or transferred between addresses, an amount of tokens is allocated automatically to a DAO-governed pool (TrojanPool.sol). the token contract also implements a "redistribution tax", a similar mechanism that awards all token holders.

Motivation

Creative communities that operate outside institutional frameworks provide an important ground for experimentation, innovation and artistic expression. However, such initiatives struggle to achieve sustainability despite having active and dedicated communities who care.

Furthermore, the mechanism we describe can be considered a "DAO primitive" that can forked and the depolyment parameters such as % "DAO Tax" and Bonding Curve parameters adapted to scenarios such as creating a BC fundraising mechanism for Moloch-fork DAOs, and other novel crypto-economic experiments and use-cases.

Goals

  • Making the flow of capital more efficient through the system unlocks collaborative value, creating a regererative ecosystem.
  • Autonomous and immutable: There is no "killswitch" or "backdoor". The only way to withdraw Ether from the smart contract is to burn the token. The creator, nor anybody else, can ever access this reserve pool of ether unless burning tokens.

Long Term vision:

Redistributive and participatory ecosystems built on blockchain technologies could help reward collaborative practices and improve the resources that we share, encoding shared values and the pursuit of common goals.

Contract Structure

TrojanToken.sol is an ERC20-compliant token contract with a built-in bonding curve. This token is used as the "approved token" for the Trojan DAO main contract. TROJ tokens can be minted through the contract, which uses a bonding curve as an automated market maker. The smart contract accumulates Ether when participants mint the token and it distributes Ether when participants burn it.

'TrojanPool.sol' is a modified version of Moloch's Pool contract, a follow-on funding contract that mirrors the investments of the DAO. In our example implementation, the minting process is subject to a 2% DAO tax, where the tax amount is deposited into the Trojan Pool. Burning tokens similarly is taxed 3% to the DAO. Transfers of the token are subject to a 1% "redistribution" tax, whereby the tax is redistributed to all the token holders.

In our example implementation, we built off the "Sparkle" token, which in turn was inspired by Bomb Token (BOMB) and Ampleforth (AMPL). However in "Sparkle" the "creator tax" is sent directly to an individual's ethereum address. Our implementation represents a significant imrpovement from the above: the revenue generated by the token's tax mechanisms are sent automatically to a pool governed by a DAO so as to be collectively distributed by the participants towards projects of mutual benefit, rather than being directed to any one individual's ethereum address.

This project demonstrates that the bonding curve token deployed together with a modified version of MolochPool.sol system can be used to as a way to fund a Moloch DAO through the minting and burning of the DAO's token.

Solidity proof of concept

See source-code for a proof of concept implementation on Ethereum using Solidity.

Contracts

GuildBank.sol

TrojanDAO.sol

TrojanPool.sol

TrojanToken.sol

Token-economic Simulations

CadCAD simulations

Scenarios simulated: mint, burn, and transfer.

Further negative tests and edge case tests need to be done.

individual-mint-burn-trojan-simulation

Documentation

Schematic-diagram

CAD-System-definition

Differential equations for mint, burn and transfer scenarios

TODOs

  • The TrojanDao.sol contract depends on the TrojanToken.sol contract, which depends on the TrojanPool.sol contract, which depends on the TrojanDao.sol contract. To work around this circular dependency, we had to add a setTrojanPool function. This is horrible for security purposes.
  • The TrojanToken.sol contract needed to bootstrap the creator with tokens, in order to make testing easier. This should also be fixed for production.
  • The TrojanToken contract can deposit funds into the Pool, but it cannot exit them. One way to exit the shares is by making a proxy contract that can receive a grant from the Trojan DAO and then call a function in the TrojanToken contract that will exit the funds.
  • The UI of the DAO (Moloch fork) needs to integrate the TrojanToken methods.
  • Explore the possibility of altering the “redistribution tax” code so that this amount is spread evenly between holders rather than relative to holdings (more like a "UBI").
  • Run more robust tests with cadCAD, using the results to fine-tune the “tax policies” of the token.

About

https://www.trojanfoundation.com/


Languages

Language:TypeScript 59.3%Language:Solidity 38.9%Language:Python 1.6%Language:JavaScript 0.1%