Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

haythemsellami/Trojan-DAO-Ethereum

 
 

Repository files navigation

Team-15

Trojan DAO

Motivation

https://docs.google.com/document/d/1hijSZrzoXS27cmFbjqwUJ-Oh4uBvS-kV6sIw9NJPbns/edit?usp=sharing

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 minting process is subject to a 2% DAO tax, where the tax amount is deposited into the Trojan Pool, a follow-on funding contract that mirrors the investments of the Trojan DAO. 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.

This project demonstrates that the bonding curve based token can be used to automatically grant the DAO with funding when it is minted and burned.

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 needs to integrate the TrojanToken methods.

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 72.2%
  • Solidity 25.7%
  • Python 2.0%
  • JavaScript 0.1%