Inspiration
Metalancer introduces battle-proven Balancer Bronze release to the Metis ecosystem. Our ultimate goal is to build state-of-the-art and investment-friendly DEX on top of the secure, audited and well-tested Balancer's codebase.
We would like to create a more user friendly user investment experience for those who are new to crypto assets, e.g. pools that correspond to mid-to-long term portfolio investment strategies, e.g. "invest in Metaverse tokens", "invest in L2 tokens", "invest in DeFi tokens", "invest in stable coins".
What it does
Metalancer allows users to trade tokens, create liquidity pools, and invest in existing pools while earning yields from trades
How we built it
We have
- built a monorepo for the Balancer's front-end dapp and all its packages. Original Balancer dapp imports most of the packages as node modules, making it hard to build on top of the Balancer's code base. Metalancer allows Metis builders' community to easily modify Balancer's front-end and Smart Order Routing source code, with instant, rebuild/reload tooling enabled.
- gathered all the necessary contracts in one single repo (mutlicall, router, pool registry contracts). Previously, they were scattered around several different GitHub repos with no clear links between them, i.e. it was unclear what contracts are required, what versions were compatible, etc. Now everything is in complete synch and is deployment-ready.
- migrated Balancer's Solidity build from Truffle to Hardhat. Hardhat is a feature-rich, fast and highly configurable Solidity development environment.
- added deployment and configuration scripts for a turn-key launch of the Balancer on Metis, including a detailed tutorial on launching Balancer on Stardust testnet and configuring its front-end. Previously, there were only unit tests available as a source of information on how to configure Balancer's contracts. No tutorial was available for the Smart Order routing and Front-end dApp configuration.
- revamped balance retrieval mechanism that relied on a custom multicall with no source code available. Balancer uses a custom multicall contract, which is not in Balancer's Github repo. This was a major show stopper for the deployment of Balancer to Metis. Our fork does not require this contract anymore.
- added a Staking contract for a fixed-term (4 weeks) liquidity farming. It should incentivise investors to provide liquidity for a longer period and pursue more long-term investment while increasing Metis TVL and Metalancer's liquidity.
- created a mockup for a new portfolio investment UI, making it more newbie-friendly and focused on strategic portfolio investment
- tweaked swap UI, introduced a spaceship to the frontpage😀
Challenges we ran into
Original Balancer dapp imports most of the packages as node modules, making it hard to build on top of Balacner's codebase.
Balancer uses a custom multicall contract, which is not in Balancer's Github repo. This was a major show stopper for the deployment of Balancer to Metis. Our fork does not require this contract anymore.
Accomplishments that we're proud of
We have ported one of the most sophisticated DeFi protocols to Metis. Our port can become a core building block of DeFi infrastructure on Metis.
What we learned
We gained many insights into Balancer protocol, its architecture, optimizations and security mechanics.
What's next for Metalancer
We have a very ambitious roadmap for Metalancer. Below are some of the features we plan to introduce:
- Revamped tokenomics and DAC. We will introduce new multi-tier incentives for providing liquidity early and longer, increasing Metis TVL.
- Intuitive user experience for investors, e.g. pools that correspond to mid-to-long term portfolio investment strategies, e.g. "invest in Metaverse tokens", "invest in L2 tokens", "invest in DeFi tokens", "invest in stable coins"
- Yield farming protocol extension (akin to Balancer’s boosted pools)
- NFT pools and NFT/Token pools (akin to Spectre protocol) to facilitate the growth of Metis GameFi ecosystem
- On-chain smart order routing for more efficient swaps
- Impermanent loss protection via insurance contracts
- Community managed smart pools and meta pools (pools-of-pools) to further encourage long TLV
- Protocol extensions for institutional investors using Metis (e.g. multisig, additional security features)
- ZK proof dark pools
- Derivatives protocol extension
Log in or sign up for Devpost to join the conversation.