Inspiration
DeFi is changing the world we live in, converting TradFi products to DeFi and in the process making them more secure and accessible to anyone worldwide is something that motivates us. Mutual Funds is an important financial product because it offers advanced portfolio management, dividend reinvestment, risk reduction, convenience, and fair pricing and had a market share of 63.1 trillion in 2020. As every day we have new investors in the crypto space, having mutual funds as a service is essential
What it does
With DeFund anyone can create a mutual fund and anyone can join a mutual fund as well. On fund creation you can select which assets will be part of the fund as well as their percentages, a Smart Contract is deployed with an ERC20 token that will be used as shares, and the holders of this ERC20 token can claim later money from the fund. The contract only accepts Eth from the users and automatically trades those Eths for the assets on Uniswap, respecting the percentage of those assets Economics: The protocol makes money when the ERC20 is returned to the contract and the users withdraw their Eths, 0.03% of the transaction goes to the fund owner (as a management fee) and 0.02% goes to the protocol
How we built it
To create the smart contract we used Hardhat as the framework, the created smart contract receives eth as payment from users and buys on Uniswap the assets that are under management. To know how much each token is worth, we are using Chainlink oracles The front end is built on React with Moralis to connect to the user's wallet.
Challenges we ran into
This was the first time that we wrote a smart contract that complex, it was a fun challenge. The fact that the smart contract needed to be deployed from the FE was hard to solve and the fact that the smart contract created needed to interact with other protocols automatically as well (Uniswap and Chainlink in our case).
Accomplishments that we're proud of
Being able to deploy a smart contract from the FE, where the constructor params are set on the Front End by the user. Make and publish a YouTube video
What we learned
Smart contract composability is real and achievable, which opens our eyes to many other possibilities and applications. There are tons of free smart contract/blockchain content we can make use of to grow in our career and build even cooler stuff
What's next for DeFund
DeFund will need more marketing to be seen by other people, and we can think of a referral mechanism, where if the user joined from another user's link, he gets a percentage of the amount invested. We need to study more about gas optimization, right now we trade on Uniswap on every user purchase, and probably batching those requests and making only 1 transaction every X hours would be better.
Log in or sign up for Devpost to join the conversation.