not approved
A Perpetual DEX on Milkomeda usable directly from Cardano - open leveraged positions in a dApp while needing only your Cardano wallet
Current Project Status
Unfunded
Amount
Received
₳0
Amount
Requested
₳523,000
Percentage
Received
0.00%
Solution

We’d like to create a perpetual DEX with leveraged long/short positions, deploy it on Milkomeda, and make it usable from a Cardano-based dApp. A whole platform with a frontend will be built.

Problem

Vacuumlabs

Cardano is missing many important pieces of DeFi infrastructure. One we feel is missing the most is the ability to open leveraged positions.

Impact / Alignment
Feasibility
Value for money

Team

1 member

A Perpetual DEX on Milkomeda usable directly from Cardano - open leveraged positions in a dApp while needing only your Cardano wallet

Please describe your proposed solution.

Our goal is to provide a platform that allows for opening long/short positions with leverage in a decentralized way. Implementations of these features exist on other chains. One of these solutions is known as a perpetual DEX. We think that the most cost and time-efficient approach would be to modify Solidity contracts of an existing, well-tested, and audited EVM-based solution, deploy them on Milkomeda, and build a platform for interacting with these contracts directly from Cardano.

The idea of this platform is to have a single pool of assets (wrapped Cardano-native assets in this case). Anyone can provide liquidity to this pool. Funds from this pool could be borrowed (using collateral) which enables users to use leverage. A user with an open long/short position has to pay a funding fee, which is an hourly fee based on the size of the position. Once the price of the asset crosses a liquidation price (based on the amount of collateral provided), anyone could liquidate this position. Liquidity providers directly profit from platform fees and liquidation events.

This is not an order-book-based platform. All asset prices are determined by oracles. Deploying oracles on Milkomeda is one of the innovative steps that are a part of this proposal.

Let's summarize all the steps that would be needed:

  1. Forking GMX contracts, modifying them for our needs and deploying them on Milkomeda. As GMX is quite advanced, we will need to perform some non-negligible changes to these contracts for an MVP.
  2. Designing and implementing our own frontend for interactions with Solidity contracts. The offered features will be the following:
  3. Wrap ADA on Milkomeda, so that the user will be able to use the app.
  4. Swap between two assets. GMX uses a pool of assets for its functionality. Only swaps between assets in the pool will be allowed.
  5. Providing liquidity to the pool of assets. Rewards for providing liquidity will be paid from the platform fees.
  6. Opening a long position with possible leverage.
  7. Opening a short position with possible leverage.
  8. Implementing a simple backend so that we will be able to easily display statistics such as profit and loss.
  9. Researching options for oracles on Milkomeda. Vacuumlabs (the proposer) has close relations with API3. Therefore, we would like to explore an option of deploying API3 oracles on Milkomeda. There is a new feature provided by API3 called OEV (oracle extractable value), which we want to support. This feature allows anyone to bid for an Oracle update if they see a position that they would like to liquidate. In case of such liquidation, the dApp shares part of the liquidation profit. This means even better rewards for the liquidity providers.

Modifying and porting existing Solidity contracts to Milkomeda entails multiple steps, there are many non-trivial challenges to solve. One of them is the need for oracles. Another major part of the project that we need the funding for is the frontend implementation and its design.

How does your proposed solution address the challenge and what benefits will this bring to the Cardano ecosystem?

We would like to enrich Cardano with a novel DeFi protocol that is well-established on other chains, such as Arbitrum. This will give Cardano users access to options that were not available before, such as opening short/long positions and using leverage in a decentralized manner. This could also attract people from ecosystems of other blockchains, extending the Cardano user base.

Modifying smart contracts of an already existing perpetual DEX (GMX) to build an MVP for Cardano has multiple advantages. The most obvious one is the trustworthiness of the protocol. Another one would be the cost and time efficiency of development.

How do you intend to measure the success of your project?

The simplest measures of success for us are a traded volume and a TVL alongside the total number of active users.

We will integrate with DefiLlama so these statistics can be easily accessible to public.

Please describe your plans to share the outputs and results of your project?

The oracle deployment design document as well as Solidity smart contracts will be published in the Github repository of the project. At the launch, we will also publish Frontend and Backend source code.

Besides these, we plan to release a development progress article monthly.

We are planning to launch this protocol in a fully decentralized manner:

  • The contracts will be immutable and if fixes are needed, we will implement a newer version and migrate
  • We will omit the native governance token so that no legal entity needs to be created. All of the fees will be instead directed to liquidity providers (to be confirmed by community feedback, we might keep the token, or introduce it later, if there is interest in the formation of a DAO around the project)
  • The Frontend will be deployed on both a cloud solution and IPFS to stay available

What is your capability to deliver your project with high levels of trust and accountability?

Vacuumlabs established itself as one of the top companies building on Cardano during the past years. We've already built multiple successful projects on Cardano, such as Adalite wallet, that has been supporting Cardano from early days.

We also closely collaborate with dcSpark, the creators of Milkomeda. Therefore, we are confident in our competence to bring this project to life with no significant issues.

Regarding deploying API3 oracles on Milkomeda, API3 is one of the big clients of Vacuumlabs and we have great relations with them. Due to this, we also have expertise in the field.

What are the main goals for the project and how will you validate if your approach is feasible?

The main goal is to bring a perpetual DEX to Cardano in a cost-effective and safe way. Opening decentralized long/short positions with leverage is the most distinguishing feature we are aiming for. The feasibility of our approach comes from the fact that this type of platform is very popular on Arbitrum already and from the availability of Milkomeda, where Solidity contracts can be deployed.

We already have extensive experience in interacting with Milkomeda directly from Cardano from our previous projects.

Please provide a detailed breakdown of your project’s milestones and each of the main tasks or activities to reach the milestone plus the expected timeline for the delivery.

  1. Research the optimal approach for oracles on Milkomeda. Create a design document describing our choice and design. This is needed because the platform will not be using an order-book, but will rely on oracles for current asset prices instead.
  2. 2-3 weeks
  3. Fork GMX Solidity contracts and perform modifications for our MVP. Only use a centralized source of data until we add oracles as a later milestone.
  4. 3-4 weeks
  5. Design and implement the frontend such that the UX will be smooth and enjoyable. The whole experience should be similar to GMX itself.
  6. 2-3 weeks
  7. Implement the backend for statistics.
  8. 2-3 weeks
  9. Deploy oracles on Milkomeda and modify Solidity smart contracts to use them such that the application is truly decentralized.
  10. 2-3 weeks

Overall, the total expected time is around 12 weeks

Please describe the deliverables, outputs and intended outcomes of each milestone.

Let's break the outcomes of each milestone down:

  1. A design document describing the approach we've chosen for oracles. We expect this to be a detailed description of how we will deploy oracles on Milkomeda and how our smart contracts will be using them.
  2. Modified Solidity contracts of GMX that we will be using. These will be open-source so that anyone can review them. Some non-trivial changes to contracts of GMX are expected.
  3. A deployed frontend that will be accessible by anyone. Functionality such as sending a bridging transaction (into the protocol), swapping tokens or opening a short/long position will be available for testing. The experience on this frontend should be similar to leading DeFi platforms in crypto.
  4. After the backend is implemented, there will be statistics such as profit and loss available from the frontend.
  5. After we implement oracles on Milkomeda, our Solidity contracts will be changed such that they use these oracles. These changed contracts will be available for anyone to review. This will make the application completely decentralized.

Please provide a detailed budget breakdown of the proposed work and resources.

1 Tech lead: 22.5 MDs - €20,250

1 Senior smart contract engineer: 60 MDs - €47,400

1 Mid frontend developer: 45 MDs - €26,550

1 Mid fullstack developer: 40 MDs - €23,600

Non-developers

1 Senior UX/UI designer: 20 MDs - €11,800

1 Project manager: 10 MDs - €6,490

Sum of the budget for the project team: €136,090

Our funding request is based on price of ADA from July 13th.

We are open to receiving an andjusted amount equal to the price in Eur above.

Image file

Who is in the project team and what are their roles?

Vacuumlabs developers, designer and project manager.

How does the cost of the project represent value for money for the Cardano ecosystem?

Most importantly, a new DeFi product would be brought to Cardano. In our opinion, expanding the DeFi ecosystem is crucial for more widespread adoption. Shorting or longing with leverage in a decentralized manner is not available on Cardano at the moment as far as our knowledge goes. However, this financial instrument is very popular on other chains (and traditional finance).

The protocol aims to become one piece of a DeFi Money-Lego, thanks to which other protocols can build utilizing our smart contracts. We have seen it on other chains, where more complex DeFi dApps use leveraged positions, for example, as a hedge for their yield optimizations.

Many Arbitrum and Avalanche users are very familiar with this product. Offering this product on Cardano could potentially onboard some of these users.

Innovation in the form of deploying API3 (or other) oracles on Milkomeda might also benefit other dApps greatly. This will pave the road for implementing other DeFi products on Milkomeda and therefore benefit Cardano itself.

We hope our project can also serve as a best-practice example of how to use wrapped Smart Contracts to create a seamless experience for interaction with Milkomeda deployments directly from Cardano (using dApps connected to Cardano wallets).

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