not approved
EternalSwap - Perpetual Swaps dApp
Current Project Status
Unfunded
Amount
Received
$0
Amount
Requested
$66,800
Percentage
Received
0.00%
Solution

EternalSwap allows traders to trade on margin without the need for counterparties via vAMMs. vAMMs guarantee liquidity & limit capital loss.

Problem

Cardano’s DeFi ecosystem is rapidly growing. However, it lacks several advanced trading vehicles such as perpetual contracts.

Impact / Alignment
Feasibility
Auditability

MLabs

1 member

EternalSwap - Perpetual Swaps dApp

Please describe your proposed solution.

Proposal Background

Our team included an EternalSwap proposal for consideration in Fund 8. Yet, despite positive feedback and high CA scores, EternalSwap narrowly missed funding. Inspired by the supportive words of numerous Project Catalyst participants, we are reapplying in Fund 9 with this proposal updated per community feedback. Changes, marked with *** below, include:

  • Budget Breakdown section: “change budget” discounted and total budget and engineering hours lowered by ~5%
  • Auditability: added specifics concerning contact points and how our team will make this proposal’s deliverables are publicly available to the extent possible
  • Definition of Success: clarified timeline including social engagement strategy
  • Our Proposal: provided a breakdown of the contents planned for our finalized whitepaper

Market

DeFi investors and portfolio managers seeking a simple way to gain long and short exposure to digital assets.

Problem Space

As Cardano DeFi dApps come online, several products are recently available or just around the corner. Lending and borrowing protocols like Liqwid and Meld offer crypto-backed loans with competitive APYs. Meanwhile, Minswap users receive LP rewards by providing liquidity to traders exchanging tokens across the DEX. Naturally, each platform offers unique investing strategies and capital efficiency gains.

That said, traders and investors on Cardano remain limited when it comes to long and short price exposure to tokens. Most simply hold tokens they like and hope for the best. In traditional finance, traders often rely on derivatives like futures contracts to gain price exposure to an asset without actually holding it.

As the name suggests, futures contracts are agreements to trade an underlying item at a future date, the "expiration" date. With futures, investors can alter the risk/return features of a portfolio as they apply advanced trading strategies. Traditional future contracts are either settled for cash upon expiry or extended (“rolled over”) for a fee.

Please describe how your proposed solution will address the Challenge that you have submitted it in.

Perpetual Contracts

EternalSwap is a trading platform for perpetual contracts. Analogous to futures contracts, these derivatives offer both long and short price exposure. However, unlike traditional futures contracts, perpetual contracts do not expire, meaning costly rollovers are unnecessary.

More importantly, perpetual contracts are flexible. Traders can apply leverage to trades relative to their deposited collateral, increasing capital efficiency and profitability. Alongside long and short positions, this allows for more complex strategies around hedging, arbitrage, and so on. EternalSwap also employs funding payments between market participants to ensure prices across the exchange track their underlying assets.

vAMMs

Uniswap popularized the Automated Market Maker (AMM) model of decentralized exchanges. Rather than rely on an order book to sort trades, an AMM exchange prices assets along a constant product curve described by the simplified equation x * y = k. Assets held in liquidity pools may be freely traded as long as their available amounts preserve this price relationship.

While useful, basic AMMs suffer from several shortcomings, not least of which is impermanent loss. Fortunately, virtual AMMs (vAMMs) bypass the issue by foregoing the actual asset swap. Rather, buyers and sellers arrive and leave with stablecoins and are compensated relative to the performance of their positions. Traders need only lock their collateral with EternalSwap and price discovery occurs without exchanging the underlying. This virtualization means impermanent loss and slippage are not an issue.

What are the main risks that could prevent you from delivering the project successfully and please explain how you will mitigate each risk?

EternalSwap will be required to support high-frequency trading. As such, layer one congestion must be avoided. Scaling solutions like Hydra will be a necessary prerequisite to a successful implementation. Fortunately, several team members have been working closely with the Hydra team on scaling the throughput of Cardano and are well aware of the engineering involved.

Please provide a detailed plan, including timeline and key milestones for delivering your proposal.

How does EternalSwap help Cardano?

Overall, EternalSwap is a decentralized perpetual contract protocol capable of supporting any asset. EternalSwap's vAMM model uses the same x∗y =k constant product formula as most AMMs. However, the vAMMs themselves do not contain an actual asset pool ( k ). Instead, a trader's collateral is kept in a smart contract vault that oversees and manages the solvency of the platform.

In other words, EternalSwap uses vAMMs as price discovery mechanisms, not for spot trading. Because of path independence, vaults will always have enough collateral to pay back all traders trading against vAMMs (assuming all the under-collateralized assets are successfully liquidated before going bankrupt). This allows EternalSwap to operate with infinite liquidity with zero impermanent loss for stakeholders as liquidity providers aren't required.

Traders using EternalSwap will be able to:

  • easily trade against their stablecoin collateral
  • forget about slippage and impermanent loss
  • apply leverage for greater capital efficiency
  • protect collateral via partial liquidations and an insurance fund
  • participate in trading competitions and other incentives

OUR PROPOSAL

As Cardano builders are well aware, a fully-functional dApp requires considerable time and investment. Fund 9 marks the beginning of this journey for our team. As such, we naturally start at the beginning and consider this proposal a request for seed funding.

If successful, we will deliver the initial building blocks of the EternalSwap platform. These include:

  • Professional technical specification (a dApp "blueprint")
  • Website, pitch deck, social channels, and a finalized whitepaper (first-draft completed but under revision)
  • Branding assets (logos, brand portfolio, marketing materials, etc.)

What is a technical specification, and why does it require funding?

Smart contract applications are mission-critical software. This is especially true of DeFi dApps, where poorly written protocols can result in massive losses for investors. Detailed planning and careful implementation are crucial to avoiding such vulnerabilities.

Software engineers developing mission-critical software offset these risks by initially composing a technical specification — also called a technical design document — to guide implementation. The situation is analogous to drafting the blueprint of a building. Naturally, architects exercise extensive prudence and due diligence when designing blueprints because oversights can be disastrous. Smart contract engineers must do the same.

An integral engineering document, a technical specification acts as the “blueprint” of a software application. In more concrete terms, the document involves:

  • careful analysis of a problem and its solution
  • definition of technical requirements
  • timeboxing and delineating the work involved
  • security analysis
  • identification of relevant third-party services

Specifically, technical specifications for Cardano projects clearly define:

  • the modules of a protocol (governance, liquidation pools, reward systems, etc)
  • the internal and exposed data structures and functions of a given module
  • the parameters, state, and calculations managed by a module
  • dependencies of a module and actions taken by components of a module
  • diagrams of module interactions and information flow
  • eUTXO structure and function with particular importance placed on validators
  • tokens and their minting policies (this often includes security considerations)
  • and more

Members of our team have developed several mission-critical fintech and Cardano applications and are well-equipped to create technical specifications.

***What will the whitepaper include?

Per usual, we will publish a whitepaper outlining the EternalSwap protocol at a high level while describing how the project will likely unfold. In fact, an initial version has already been written but work remains. The finalized document will include:

  • overview of perpetual contracts
  • introduction to vAMMs and a brief history of their development
  • explanation of vAMMs within the context of Cardano’s EUTXO ledger
  • overview of leverage
  • description of EternalSwap’s mechanics (liquidations, funding payments, trading fees, etc)
  • considerations of insurance funds
  • example use cases
  • tokenomics
  • and more

Please provide a detailed budget breakdown.

Funding:

Engineering hours: 835***

Total: $66,800***

Breakdown:

Feature Total Time

Initial branding, identity, strategy, and touchpoints/socials 30

Branded website and pitch deck 50

Finalizing whitepaper including team review 30

Technical Specification

Analysis of Problem Domain, Notation, Technical Requirements 80

Architecture and Module Design 120

Analysis of data structures and eUTXO 80

Token Functionality and Minting Policy Security Analysis 100

eUTXO and Module Diagramming 75

Security Analysis 100

Timeboxing 60

Subtotal 725

Change Budget 110***

Total Time 835 hours***

Total Cost $66,800***

Please provide details of the people who will work on the project.

OUR TEAM

MLabs

MLabs has quickly become one of the premier development firms in the Cardano Ecosystem. We are an IOG Plutus Partner and work regularly with IOG to develop the Cardano blockchain and ecosystem. Our team is composed of talented developers who have helped build community projects such as:

  • Liqwid
  • SundaeSwap
  • Optim
  • Many others

Through our work with early-stage projects, we have one of the largest groups of Haskell/Plutus developers in the community. Moreover, MLabs has the capacity to conceptualize and ship advanced financial applications in Plutus. These products provide the core building blocks of a decentralized financial system. Derivatives are an essential risk management tool as well as a suitable test case for an L2 implementation that MLabs is working on with development partners.

Website: <u>https://mlabs.city/</u>

Core Team

MLabs Founder and CEO

Mark Florisson

Mark founded MLabs in 2018 for consultancy in AI, Fintech, and Information Technology. He specialized in functional programming, particularly Haskell, as well as compilers and full-stack development. Currently, he heads business strategy at MLabs and manages several clients and internal projects.

GitHub: https://github.com/markflorisson

Head of Cardano Operations

Ben Hart

Ben heads the majority of MLabs’ Cardano-based projects. This includes open-source efforts such as the Cardano-Tx-Lib, currently under development, which aims to facilitate web3-like browser-based applications on Cardano. Although he previously developed in Solidity on Ethereum, he is a Haskell expert. He also has experience in implementing accounting software, web development, functional javascript, technical writing, and more.

GitHub: https://github.com/Benjmhart

Plutus Lead Developer

Maksymilian Brodowicz

Maksymilian does a lot of research, both technical and product-wise, financial and user-experience related. Specifying and creating innovations in protocols, his designs have been used in a variety of efforts. By education a mathematician and a computer scientist, HoTT enthusiast, and five-year Haskell practitioner.

GitHub: <https://github.com/zygomeb>

Delivery Manager

George Flerovsky:

George manages a portfolio of projects at MLabs including decentralized exchanges, governance, auctions, yield optimization, and on-chain analytics. He completed his Master of Arts degree in Economics in 2017 and has five years of professional experience in data science and engineering. Before joining MLabs, George was involved with designing the streaming merge algorithm for concurrency in the Cardax decentralized exchange.

George has developed in and loved Haskell since 2015, and has been involved with Cardano since 2018. He has carefully studied the Cardano research papers and specifications, developing a deep knowledge of the Cardano consensus protocol, smart contract framework, and network stack. He participated in the first cohort of the Plutus Pioneers Program in the summer of 2021, and actively contributed to the Alonzo Blue, White, and Purple testnets.

GitHub: https://github.com/GeorgeFlerovsky

DeFi and Business Development

Luke Mahoney

Luke helps manage the business needs of several MLabs’ and client projects, both in the DeFi and NFT space. He also works as the product owner of Seabug, an NFT marketplace and protocol, and has assisted in the early stage planning of DeFi projects such as DAO Funds, Optim, and others. Before joining MLabs as an intern in the summer of 2021, he covered Cardano and blockchain developments for AdaPulse and other online outlets.

AdaPulse: https://adapulse.io/author/luke-m/

If you are funded, will you return to Catalyst in a later round for further funding? Please explain why / why not.

EternalSwap will most definitely require additional funding before becoming a full-fledged dApp. We will likely look to Catalyst for some of the support moving forward as well as source funding from elsewhere.

Please describe what you will measure to track your project's progress, and how will you measure these?

EternalSwap will be as transparent as possible regarding progress. As part of this grant, we will establish social channels that will post development milestones while being entirely available to queries from community members. Moreover, these proposal deliverables will be easily observable:

  • Branded website
  • Social channels and engagements
  • Finalized whitepaper
  • V1 product development progress

Finally, since this grant does not include a fully-functional dApp as a deliverable, community and social channels will be furthermore be leveraged to source development support and to keep voters informed of the steps taken towards a working product.

What does success for this project look like

Key Metrics of this project related to the Catalyst Fund 9 Goals

Intended Fund – Fund9: Dapps, Products, and Integrations

Challenge Statement: “What dApps, products, and integrations can be implemented to bring impactful use cases to Cardano ecosystem that help drive more adoption?”

On other blockchains, protocols similar to EternalSwap enjoy robust consumer demand. DyDx built on StarkWare, Perpetual Protocol on Ethereum's layer 2, and Drift on Solana are all excellent examples. DyDx alone regularly records over 1 billion dollars in daily trading volume.

Project Impact: High

1. Capital Efficiency: EternalSwap allows traders and investors a cost-effective and easy way to execute trading strategies that may otherwise be difficult to realize. Leverage is available to advanced users while slippage and impermanent loss are abstracted away.

2. Usability: EternalSwap will incorporate a polished trading platform complete with a clean and responsive UI/UX.

3. Community Involvement: Built for the Cardano community, EternalSwap will be governed by users and holders of the Eternal token. Incentives such as trading campaigns and rewards will further drive engagement.

Core Features of EternalSwap

  • A stablecoin vault structure, codified in a smart contract, that secures a user's collateral while they maintain open positions
  • Trading platform UI for longing and shorting supported assets
  • Smart contract functionality that manages leveraged positions, collateral liquidations, limit orders, and so on
  • Open source keeper bots
  • Oracle integration

Future functions

  • Robust governance integrating the Eternal token
  • Instruments for more advanced trading techniques such as hedging
  • Automated emergency management functions
  • Staking pool and reward structure

What does success for this project look like?

1 Month:

Commission brand assets, launch website and social channels, and assign engineering team to compose the technical specification

3 Months:

Actively engaging with the community via socials – posting updates, answering questions, etc. Complete final revision of the EternalSwap whitepaper, and present through social channels.

6 Months:

Technical specifications complete with a structured and precise outline of the EternalSwap dApp and how it will be securely and efficiently implemented. Several partnerships established with established projects

Please provide information on whether this proposal is a continuation of a previously funded project in Catalyst or an entirely new one.

This is a new proposal.

close

Playlist

  • EP2: epoch_length

    Authored by: Darlington Kofa

    3m 24s
    Darlington Kofa
  • EP1: 'd' parameter

    Authored by: Darlington Kofa

    4m 3s
    Darlington Kofa
  • EP3: key_deposit

    Authored by: Darlington Kofa

    3m 48s
    Darlington Kofa
  • EP4: epoch_no

    Authored by: Darlington Kofa

    2m 16s
    Darlington Kofa
  • EP5: max_block_size

    Authored by: Darlington Kofa

    3m 14s
    Darlington Kofa
  • EP6: pool_deposit

    Authored by: Darlington Kofa

    3m 19s
    Darlington Kofa
  • EP7: max_tx_size

    Authored by: Darlington Kofa

    4m 59s
    Darlington Kofa
0:00
/
~0:00