xGov-38 Decentralized Perpetual Margin Exchange

Author Grzegorz Raczek (@grzracz), Erik Hasselwander (@ErikHasselwander), BunsanMuchi (@BunsanMuchi), David Blazek (@Zykoz)

Category dApps

Focus DeFi

Open-Source Yes

ALGO Requested 350000

Abstract

This proposal features three distinct components designed to increase volume and access to liquidity across the Algorand ecosystem.

  • Integrating Stableswaps and Lending Pools into the Vestige Aggregator, as well as open-sourcing the routing smart contract
  • Establishing a fully decentralized on-chain aggregator for new dApps to utilize the available liquidity on Algorand
  • Developing a comprehensive margin trading platform that leverages existing liquidity for all actions, driving volume towards the entire ecosystem by enabling up to 20x leveraged positions

Component 1: Stableswap and Lending Pools Aggregator Integration
We will integrate stableswaps into the Vestige aggregator, enabling tokens like gALGO to have greater utility by providing instant access to swap from gALGO to any other asset in the ecosystem with minimal slippage. This will be achieved by utilizing highly liquid stableswap pools, which are not currently routed through any Algorand aggregator. This milestone also covers integrating AlgoFi’s existing lending pools, as well as the soon-to-be-released Folks Finance lending pools, into the Vestige aggregator.

These integrations play a pivotal role in optimizing liquidity utilization for bridged and stable assets, leading to a significant reduction in price impact. A 10000 ALGO swap to goBTC through our router nets you over a percent more than doing a single swap, and these integrations will boost this number a lot. This grant will enable us to open-source the smart contract used for the routing, equipping other developers with the necessary tools to create their own complex swap transactions without reinventing the wheel concerning cfAMM swaps, stableswaps and lending pool integrations.

Component 2: Fully Decentralized Liquidity Aggregator
The component is a fully on-chain, decentralized liquidity aggregator. This on-chain tool will be callable from other dApps, allowing developers to tap into on-chain liquidity programmatically without incurring significant price impact from single-pool swaps. Furthermore, an oracle-like component will be introduced to track on-chain liquidity over time, enabling smart slippage during transaction execution and preventing frontrunning or MEV-like attacks.

Component 3: Decentralized Perpetual Margin Trading
The third component is a fully decentralized perpetual margin trading platform, offering a wide range of leverage for specific on-chain assets. This protocol will exclusively tap into existing AMMs for opening orders, closing orders, and liquidating orders by leveraging the decentralized liquidity aggregator mentioned earlier. This approach ensures that liquidation incentives and fees remain within the ecosystem, instead of being consumed by bots and moved off-chain, which is a current issue.

Link for details

4 Likes

Hey @Adri Erik is @Swaggelwander on this forum :slight_smile:

1 Like