over budget
EternalSwap: Perpetual contract DEX
Current Project Status
Unfunded
Amount
Received
$0
Amount
Requested
$70,000
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 vehicles such as perpetual contracts.

Addresses Challenge
Feasibility
Auditability

MLabs

1 member

EternalSwap: Perpetual contract DEX

Market

DeFi investors and portfolio managers seeking a simple way to gain long and short exposure to 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, SundaeSwap users receive dividends 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.

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 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.

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.

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. Fund8 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, and 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 skilled at creating technical specifications.

Funding:

Engineering hours: 875

Total: $70,000

Breakdown:

Feature……………………………………………………………………………………………………….Total Time

Initial Branding, Identity, Strategy, and Touchpoints……………………………………..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

General Smart Contract Security Analysis…..………………………………………………100

Timeboxing…………………………………………………………………………………………………60

Subtotal………………………………………………………………………………………………………725

Change Budget……………………………………………………………………………………………150

Total Time……………………………………………………………………………………………………875 hours

Total Cost……………………………………………………………………………………………………$70,000

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. We employ over 80 developers and have helped build community projects such as:

• Liqwid

• SundaeSwap

• Ardana

• 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: <https://mlabs.city/>

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 summer 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-Traded-Funds, Optim, and others. Before joining MLabs as an intern in summer 2020, he covered Cardano and blockchain developments for AdaPulse and other online outlets.

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

-Branded website

-Social channels and engagements

-Finalized whitepaper

-V1 product development

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

Intended Fund – Fund8: DApps and Integrations

Challenge Statement: “What applications will provide the most value for end-users in 2022?"

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

Definition of Success After 3 and 6 Months (Milestones)

3 Months:

Commission brand assets, launch website, and complete the final revision of the EternalSwap whitepaper. Assign engineering team to compose the technical specification.

6 Months:

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

This a new project

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