GithubHelp home page GithubHelp logo

pnkfluffy / etf-dao Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 6.0 707 KB

ETF DAO Core Idea Diversification is a core piece of investing. Traditional finance has mutual funds, exchange traded funds, money markets and other simple ways for investors to directly participate in a basket of assets. These systems reduce systematic risk for investors in easily accessible ways. Anybody can simply buy an ETF like SPY or VOO, and they're then immediately exposed to the price movement of 100s of different stocks. Similar instruments are available for practically any facet of traditional finances. Unfortunately that isn't the case in DeFi. While the emphasis on "do your own research" is incredibly valuable, it's an obstacle which prevents busier people from joining - a single token can take hours to days to research, meaning diversification is completely out of reach. An ETF equivalent for DeFi removes this barrier, and can be done through smart contracts - meaning no fee paid to a money manager. ERC20, NFTs, crypto, DAOs can all be managed through decentralized pools, allowing quick and easy access. Our Implementation As part of this hackathon, we've created a pair of contracts and UI that facilitate the creation of ERC20 ETFs. Anybody can specify any grouping of tokens and quantities, and use the ETF Factory contract to create a Fund. Anybody can then interact directly with the Fund to be exposed to the price changes in the group of ERC20 tokens. For example somebody can create a Fund with 5 LOOT, 10 STONK, and 20 VINYL. Then anybody else can interact with the Fund, joining it and buying Fund tokens. The price of joining is exactly equal to the current price of the underlying assets multiplied by the number of fund tokens that they want to buy. Then when they want to exit the fund, they can interact with the contract and receive the current value of the underlying assets. This is incredibly powerful, as it means that the new Fund tokens are worth exactly what the underlying tokens are worth - instead of the three tokens in this example, the Fund could have 500 (or infinite) underlying tokens, and the ease of joining is exactly the same. On top of this, the Fund itself is an ERC20, meaning it can be traded in the exact same way. If somebody wanted to, they could make a Fund of Funds, furthering the ease of diversification. Since they're ERC20s, Funds can also be traded themselves on an exchange, exactly as the traditional finance ETFs do, meaning people could still access them without having to interact directly with the Fund contracts. Technology A key bottleneck here is the sheer number of swaps that need to happen to create or redeem the Fund token. Because of this we need a gas reducing solution. Polygon works perfectly for this. Using their side chain vastly reduces the cost of purchasing and selling the underlying assets. Alongside this, the ability to trade the funds on any dex means that - once created - people can freely buy and sell the Fund without having to use the relatively costly join or exit functions. A second bottleneck is that the current implementation relies on a static set of assets. This works well, but fails to capture the value found in actively managed funds. The best way of allowing active management of a fund in a decentralized manner is to implement a DAO. DXdao allows for on-chain management of created Funds. Communities can be built around Funds, and carrots can be tied to fund KPIs as a way to reward particularly profitable Fund trades, incentivizing deeper research. Use Cases ETFs are such fundamental asset classes that they can be used in practically any way: - Influencers wishing to allow investors to invest using their strategy. Fees can be tied to this, or DXdao's carrots can be used as rewards for well-managed funds. - Companies wishing to build investing arms and offer their token for governance - Communities wishing to invest together and participate in discovery and risk reduction together - Varying applications where funds may be focused on the market as a whole or specific industries and asset types. NFT funds, ERC20 funds, tokenized stock funds, etc.

Solidity 33.05% Python 6.53% HTML 1.65% JavaScript 57.48% CSS 1.28%

etf-dao's People

Contributors

pnkfluffy avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

etf-dao's Issues

Next Steps

Hello, pnkfluffy!

My name is Pavon Dunbar. I really am impressed and love your Index Fund smart contract.

I have a few questions regarding next steps.

So, after I deploy all the contracts (Fund, Factory, Token), here is what I am doing:

  1. I am creating a new fund using the factory.create() function. Are the uint256 amounts the quantity of each token or a percentage holding that must add up to 100?

Screenshot 2022-06-13 at 8 02 24 PM

  1. Next, I call the Fund functions using the address of the newly created fund.

Screenshot 2022-06-13 at 8 04 13 PM

  1. Here is where I am stuck. So, do I call the "join()" function from the Fund contract? Do I have to approve anything? What about the Token contract?

I just need to find out what do I do after I create the fund in the Factory contract. And what about the original fund that is created in the Fund contract using the constructor prior to deployment? And how do I integrate the Token in all this?

My goal: I just want to create the fund and have others buy the fund. Any steps or help would be greatly appreciated.

Thank you in advance for your time, and enjoy the rest of your day and week.

Pavon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.