completed

Liquid staking for Milkomeda / L2s

$100,000.00 Received
$100,000.00 Requested
Ideascale logo View on ideascale
Community Review Results (1 reviewers)
Impact / Alignment
Feasibility
Auditability
解决方案

We will design & implement a standard for Milkomeda to allow its users to keep earning staking rewards. We will share the approach publicly so other L2s / sidechains can implement their own variation

Problem:

Although we need to encourage moving computation to L2s to scale, currently doing so will cause you to lose your staking rewards making it hard to convince users to migrate

Yes Votes:
₳ 360,974,703
No Votes:
₳ 37,679,625
Votes Cast:
747

This proposal was approved and funded by the Cardano Community via Project F9: Dapps, Products & Integrations Catalyst funding round.

[IMPACT] Please describe your proposed solution.

It's clear that it's not possible to have a single chain process all the computation in the world. Although people still attempt this (Solana, BNB, EOS, Tron, etc.), most recent projects are trying to optimize for safely splitting computation off of the L1 (Cosmos, Polkadot, Ethereum, Avalanche, Cardano). This concept was even part of the initial Cardano roadmap in 2017.

Cardano itself has multiple work stream that are tackling this: Mamba (IOG sidechain), Milkomeda, Orbis and Hydra to name a few.

However, even though Cardano needs move computation out of the base layer to scale, current users are hesitant to due this as it will cause them to lose their staking rewards on mainnet (so unless the L2 can provide them more than 4% APY, they will be losing money). Additionally, the fact that this ADA is unstaked has a negative impact on the total % of ADA staked in the network which is a crucial metric for the safety of Cardano

Although Cardano provides liquid staking in the protocol itself, it is by itself not powerful enough for use-cases where ownership of tokens is tracked by some off-chain state (sidechains, CeFi, L2s, etc). However, our solution leverages the built-in liquid staking in Cardano to providing staking rewards for users of these protocols

The general proposed solution works as follows:

  • Cardano user A want to use Milkomeda
  • A wraps 50 ADA and get 50 milkADA on Milkomeda. The ADA on the Cardano side is staked by to a pool chosen by the Milkomeda DAO
  • By default, users get no staking rewards at all (all the staking rewards go to the Milkomeda DAO)
  • A user on Milkomeda can wrap their milkADA into a smart contract (which locks their ADA for 1+ epoch) to get back stMilkADA which we encourage DEXs, etc. to support 1:1 with ADA
  • Milkomeda DAO shares staking rewards with stMilkADA holders every epoch

So now stMilkADA holders are getting their staking rewards while still being able to use Milkomeda

One key issue with this is who should the ADA on Cardano be delegated to? If you have a single pool (which is okay if you have <64M ADA), then it's simple. However, if you want to delegate to multiple pools or you have 64M+ ADA, you have to split it up to multiple pools. I think the easiest way to do it is instead of constantly rebalancing the UTXO set maintained by the bridge (which would be a nightmare) is to abuse the fact that staking snapshots are only taken on epoch boundaries. Every time an epoch boundary approaches, you rebalance your bridge to make sure the delegation is split correctly, and then re-adjust back to your old configuration (if needed) after the boundary has passed. The problem with this approach is Cardano has no fee market so there is no guarantee your rebalancing will happen before the epoch boundary (but the lack of a fee market makes many use-cases in Cardano including L2 and DeFi in general very unreliable so we are hoping a solution like the tiered fees proposal by IOG will be introduced)

Notably, we see three steps towards fully implementing this system:

  • v1: implement the protocol with single stake pool run by the Milkomeda Foundation. This is not ideal, but will make dApps on Milkomeda start being able to integrate stMilkADA support and gets Milkomeda users their staking rewards as soon as possible (currently they earn nothing)

  • v2: delegating to multiple fixed stake pools. This will require implementing the rebalancing protocol mentioned above

  • v3: delegating to a dynamic set of stake pools voted on by the Milkomeda DAO (most likely outside of the scope of this proposal due to the complexity, but we're mentioning it here for completeness)

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

Liquid staking is a hot topic at the moment because for a lot of protocols that drive adoption, it is hard to get the necessary adoption without liquid staking options. A reference implementation of liquid staking for Cardano will not only be useful in itself, but also inspire other protocol and business models that would not have been possible without this construction

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

The lack of tiered fees or fee markets in Cardano makes it hard to ensure that rebalancing the stake pool delegation happens in an orderly fashion. During times of congestion (such as in 2021 where txs could take over an hour to appear on-chain), this may cause protocols to miss rebalancing (causing users to lose their staking rewards) and may cause downtimes in L2 onboarding as it may have to pause during the rebalancing. If a solution isn't implemented for Cardano, liquid staking may be too unreliable for protocols to adopt (but can be enabled without any additional modifications once the issue is resolved in Cardano itself)

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

Q2: come up with design for how liquid staking will work (see protocol description above)

Q3: implement v1 with a single stake pool

Q4: implement v2 with multiple stake pools

v3 is a stretch goal. It will definitely happen eventually, but may not be doable with the funding requested in this proposal

[FEASIBILITY] Please provide a detailed budget breakdown.

  • Implementing UTXO selection logic modification to handle the rebalancing

  • Implement the Solidity smart contract to mint/destroy stMilkADA

  • Implement the Solidity feature to hand out rewards to stMilkADA users

  • Implement Milkomeda DAO feature to hand out the accumulated staking rewards on the Cardano side

  • Audit implementation (Solidity)

  • Audit implementation (Plutus / Cardano)

  • Outreach to Milkomeda projects to encourage them to adopt stMilkADA

  • Blog post & content detailing our solution to help other protocols that also need to implement liquid staking

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

The Milkomeda developer team will build the implementation detailed in the budget breakdown. We will use a 3rd party auditors and the Plutus contract itself may be sub-contracted.

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

There may be a follow-up proposal for v3 or to implement additional functionality required by other projects who also need to use liquid staking

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

  • (before v1) progress on writing the code
  • (after v1) amount of ADA participating in the liquid staking

v2/v3 may have some additional metrics for growth in total % of ADA stake and how much ADA is being staked to single-pool operators

[AUDITABILITY] What does success for this project look like?

Milkomeda users (or users of similar projects like Orbis, Mamba, etc) can continue receiving staking rewards while using L2s to scale Cardano without lowering the total % of ADA staked

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

New proposal, however parts of Milkomeda have previously been funded by Catalyst

社区顾问评论 (1)

Comments

Monthly Reports

We finished v1 of the smart contract as well as documentation and we're currently doing an internal review of what we've created so far before moving onto the next step. Documentation can be found in link

Disbursed to Date
$100,000
Status
Still in progress
Completion Target
3. In the next 6 months
Comments 0

Login or Register to leave a comment!

We finished v1 of the smart contract as well as documentation and we're currently doing an internal review of what we've created so far before moving onto the next step. Documentation can be found here: https://github.com/dcSpark/milkomeda-documentation/tree/liquid-staking/docs/cardano/liquid-staking

Disbursed to Date
$100,000
Status
Still in progress
Completion Target
2. In the next 3 months
Comments 0

Login or Register to leave a comment!

This report is to provide an update on the progress of the audit of the Liquid-staking smart-contracts. The audit was initiated on December 12th, with the well-known auditor Arbitrary Execution. The audit is expected to be completed in the middle of January.

Background:

The Liquid-staking smart-contracts are an important part of the Milkomeda ecosystem, allowing users to earn rewards by staking their tokens on the sidechain. It is critical that these contracts function correctly and that rewards are properly distributed to users.

Audit Process:

The audit is being conducted by Arbitrary Execution, a reputable and experienced auditor in the field. The audit process involves a thorough review of the code, as well as testing to ensure that the contracts function as intended. The audit team will be looking for any potential vulnerabilities or issues that could impact the functioning of the contracts.

We are confident that the audit being conducted by Arbitrary Execution will provide valuable insights and help ensure the continued smooth functioning of the Liquid-staking smart-contracts. We will provide upload the audit results as a PoM2. Soon we should also add NPM Package for the Liquid Staking project thus completing PoM1. In the meantime, more information on the Liquid-staking contracts and their role in the Milkomeda ecosystem can be found at the following link: https://github.com/dcSpark/milkomeda-documentation/blob/liquid-staking/docs/cardano/liquid-staking/c1-overview/bridge-logic.mdx.

In the meantime, we have begun work on the UX&UI of Staking DApp, which we present in the evidence section.

Disbursed to Date
$100,000
Status
Still in progress
Completion Target
2. In the next 3 months
Attachment(s)
Comments 0

Login or Register to leave a comment!

close

Playlist

  • EP2: epoch_length

    Authored by: Darlington Kofa

    3分钟24秒
    Darlington Kofa
  • EP1: 'd' parameter

    Authored by: Darlington Kofa

    4分钟3秒
    Darlington Kofa
  • EP3: key_deposit

    Authored by: Darlington Kofa

    3分钟48秒
    Darlington Kofa
  • EP4: epoch_no

    Authored by: Darlington Kofa

    2分钟16秒
    Darlington Kofa
  • EP5: max_block_size

    Authored by: Darlington Kofa

    3分钟14秒
    Darlington Kofa
  • EP6: pool_deposit

    Authored by: Darlington Kofa

    3分钟19秒
    Darlington Kofa
  • EP7: max_tx_size

    Authored by: Darlington Kofa

    4分钟59秒
    Darlington Kofa
0:00
/
~0:00