Inspiration

The number of DeFi applications grows every day and it's getting more and more complicated to remember and efficiently manage the staking/lending/farming deposits in all of them. Another problem is that quite a few of the applications have either slow or not very user-friendly interfaces. And on top of that people lose a lot of money due to the crypto volatility.

So we are building a dApp which would solve or at least mitigate the above problems.

What it does

Minimax Finance lets members of DeFi community to manage all or at least most of their DeFi investments in one place. To differentiate itself from the competition the platform provides a number of unique features for better DeFi experience, like stop-loss and take-profit for staking and lending, conversion depositing and withdrawal, multiple positions per vault, etc.

We've started building the dApp before the Hackathon start. Within hackathon we've build the following features:

  • Stop loss and take profit for LP-tokens. We’ve had stop loss and take profit for single tokens since day one. During the hackathon we made these features available for LP-token asset type as well. This helps people to prevent huge losses while yield farming, when prices go down. And easily fix profit, when prices go up.
  • Ability for users to enter any vault with any token. E.g. a user may place a deposit in a CAKE-BUSD vault with BNB token. Our smart contracts will seamlessly do all the necessary swap and lp-token bundle operations behind the scenes, the user will not have to do all these operations manually. This makes the depositing process 3-5 times faster and much more user-friendly.
  • Ability for users to exit any vault with any token. E.g. a user may has a position in CAKE-BUSD LP-token vault, however would like to close this position and invest his funds in some other token. When closing this position the user can choose which token he would like to get. E.g. s/he may choose to get ETH as the result of position withdrawal. Our smart contracts will seamlessly unbundle the CAKE-BUSD LP-token, then swap CAKE and BUSD into ETH and transfer the ETH to the user’s wallet. This makes the withdrawal process 3-5 times faster and much more user-friendly.
  • New ‘Tokens’ section. In this section users can view the list tokens in their wallet, which are not used at the moment. There they also see the best APY available for the tokens at our platform. They can deposit the unused tokens right from this page. The purpose of the “Tokens” section is to make it easy for people to identify idle assets in their wallets, put them to work and withdraw them when necessary.
  • Ability to view profit and loss for each position.

How we built it

We've developed a blazing fast UI to make user experience as good as we could. We've aggregated a large number of investment opportunities from multiple DeFi platforms (Beefy, AAVE, Alpaca, Yearn, etc) on 4 blockchains and continue to expand our reach. We've developed a decentralized stop loss and take profit features for staking and lending. To insure correct and reliable processing of stop loss and take profit events we integrated Chainlink price feeds and Gelato Network. We've also integrated several DEXes to do the token exchange and LP-token bundling operation.

Challenges we ran into

  • Asset prices may be manipulated atomically with flash-loans, incurring liquidations of positions and triggering stop-losses
  • How to make all architecture decentralized, transparent and safe
  • How to make UI much faster than that of competitors
  • Taming v2/v3 complex math to define optimal ways for buying and selling of single tokens and LP tokens.
  • Optimization of gas costs.
  • Validation of our features based on historical data

Accomplishments that we're proud of

  • Transparent, decentralized DEX aggregator of UNI-v2 kind DEXes (can be fully used with smart contracts, which is not true for 1inch)
  • The first DeFi platform, which allows to set stop-loss/take-profit for staking and lending deposits, not limit orders
  • Transparent and fully decentralized system
  • Blazing fast UI due to caching APY/TVL analytics data through our backend part

What we learned

It's very hard to build a robust, user-friendly and competitive dApp. It's even harderr to acquire users without token minting and all that go-to-the-moon hype stuff. However the process is very interesting, during which you learn many pros and cons of DeFi.

What's next for Minimax Finance

  • Launch on multiple blockchains
  • Combination of of yield farming and algorithmic trading
  • Trailing stop loss
  • Display and easy migration of positions from other protocols
  • Auto-selling of rewards to increase yield
  • and more

Built With

Share this project:

Updates