Cardano MultiParty Escrow (MPE) System Proposal

chevron-icon
RFP Proposals
Top
chevron-icon
project-presentation-img
Expert Rating 4.5
JordanMlabs
Project Owner

Cardano MultiParty Escrow (MPE) System Proposal

Expert Rating

4.5

Overview

This proposal is for an open-source, decentralized multiparty escrow (MPE) solution on Cardano’s Extended UTxO model, aimed at secure payments through Multiparty validation. We propose a simplified approach by leveraging Cardano transactions as message equivalents, removing the need for complex cryptographic primitives. This will streamline the validator’s design while maintaining robust security. Key features include single-channel interaction per transaction and automatic prevention of double-spending by design. This design prioritizes transaction security and ease of use while providing flexibility for future enhancements, aligning with the goals of decentralization and accessibility.

RFP Guidelines

Development of a Cardano-Based MultiParty Escrow (MPE) System

Complete & Awarded
  • Type SingularityNET RFP
  • Total RFP Funding $40,000 USD
  • Proposals 7
  • Awarded Projects 1
author-img
SingularityNET
Oct. 15, 2024

The MultiParty Escrow (MPE) smart contract is a critical component of the SingularityNET platform's integration with the Cardano blockchain. Designed to manage payment channels within SingularityNET’s Decentralized AI Platform and AI Marketplace, this contract enables secure, decentralized transactions between clients and AI service providers. By leveraging Cardano’s Extended UTxO (EUTxO) model, this solution facilitates efficient and trustworthy interactions, ensuring streamlined payments for AI services.

Proposal Description

Company Name (if applicable)

MLabs LLC

Project details

Overview

This proposal is for an open-source, decentralized multiparty escrow (MPE) solution on Cardano’s Extended UTxO (EUTxO) model, aimed at secure payments through Multiparty validation. We propose a simplified approach by leveraging Cardano transactions as message equivalents, removing the need for complex cryptographic primitives. This will streamline the validator’s design while maintaining robust security. Key features include single-channel interaction per transaction and automatic prevention of double-spending by design.

This design prioritizes transaction security and ease of use while providing flexibility for future enhancements, aligning with the goals of decentralization, efficiency, and accessibility.

 


 

Implementation Details

  • Open Channel: A State Thread Token (STT) minting policy will validate initial channel UTxOs by minting a unique token for each channel, ensuring only legal states. Any channel UTxO must include this STT, preventing illegal UTxOs. At this moment, the channel owner is set.

    • Checks: Minting of channel STT, sending STT and tokens to channel validator.

  • Modify Channel: Allows any party to add funds or, if signed by the service consumer, extend expiration. Modifications rely on transaction validity intervals as a proxy for current time.

    • Checks: Fund additions, expiration extension if signed, and STT return.

  • Close Channel: When signed by the owner and expiration has passed, the remaining funds can be claimed, and the STT burned.

    • Checks: Owner signature, validity after expiration, STT burn.

  • Claim: The STT is returned, with checks consistent with specifications to ensure safe and intended usage.

We will simplify the "message" system to use Cardano transactions instead. If a transaction was signed by a given party, that is equivalent to signing a message and checking for the signature in the validator. This allows us to cut costs on developing required cryptographic primitives and simplifies the implementation of the validator. More precisely, it allows us to not bother with the possibility of using the same message twice (with some sort of on-chain set) because even if the same signed transaction is submitted twice, it will be rejected the second time as inputs were already spent, providing the same security guarantees at way lower implementation time. The other limitation will be to allow interactions only with one channel at a time in the same transaction (this may get lifted, depending on implementation of `Claim` redeemer we may get this one for free).

### Open Channel

Because anyone can create any UTxO at any validator we need a way to distinguish between legal and illegal initial states. This can be done by a STT minting policy that gets invoked when creating channel UTxOs. Any spending of channel UTxO requires this STT to be present so all illegal UTxOs are automatically unspendable. Moreover, the specification requires us to mint a unique token for each of the channels and STT can fulfill this requirement simultaneously. During the mint the policy will check if datum of the channel UTxO is not malformed.

 

#### Checks

  • Mint channel STT with channel STT minting policy

  • This verifies channel datum fields

  • Send channel STT to channel validator

  • Send tokens in the same UTxO as STT

### Modify Channel

Channel modification can be done by anyone by spending channel UTxO, adding some tokens and returning it otherwise unchanged. There is a special case when this transaction is signed by the channel owner in which case they can also increase expiration period. Because it is impossible to know current time from within validator execution context, time checks are based on transaction validity interval. If transaction validity is enforced to be short enough (e.g. 10 minutes), we can approximate that "now" is the same as end of the validity interval.

 

#### Checks

  • - Anyone can add funds

  • - Expiration period can be extended if signed by channel owner

  • - STT returned

 

### Close Channel

If transaction is signed by the channel owner and it is already past the channel expiration, the owner can claim all remaining funds by consuming channel UTxO and burning the STT. Note that time is being handled just like in the modification case.

Checks

  • - Signed by channel owner

  • - Validity range starts after channel expiration period

  • - STT is burnt

 

### Claim

 

### Checks

  • - STT is returned

  • - Rest of the checks like in documentation


Estimated Execution Time: 4 Months

Team Requirements: 2 primary developers experienced in Haskell, Plutus, and decentralized payments.  1 Delivery Manager for oversight, 1 additional expert Developer for oversight.

Project Objectives

  1. Smart Contract Development: Implement multiparty escrow using EUTxO with simplified transaction signing as a substitute for message verification.

  2. Integration compatibility with SingularityNET: Integrate with SingularityNET’s marketplace for AI services to allow secure escrow-based transactions.

  3. Open-Source Deployment: Release as an open-source project for broader community use and potential Catalyst-funded enhancements.

Open Source Licensing

AGPL - Affero GPL

Subject to change.

Links and references

Company site: mlabs.city
Github: https://github.com/mlabs-haskell

Proposal Video

Not Avaliable Yet

Check back later during the Feedback & Selection period for the RFP that is proposal is applied to.

  • Total Milestones

    5

  • Total Budget

    $40,000 USD

  • Last Updated

    25 Nov 2024

Milestone 1 - Requirement Analysis & Formal Specification

Description

thorough research and an detailed technical specification that defines datum/redeemer types and enforces validator checks according to simplified message handling.

Deliverables

PDF of Specification

Budget

$4,800 USD

Milestone 2 - Validator Development

Description

Validators with logic for channel management and transaction-based message signing including "open" "modify" and "close" functions.

Deliverables

Public Gitlab repository of the development at https://github.com/mlabs-haskell/cardano-mpe

Budget

$14,400 USD

Milestone 3 - Proof-of-Concept Frontend Development

Description

Dev proof-of-concept frontend for escrow interactions including full functionality for testing (without final UI styling).

Deliverables

Hosted as a GitHub Pages site linked from the project's repository.

Budget

$8,000 USD

Milestone 4 - Compliance Testing

Description

Comprehensive test suite to verify compliance with specification and ensure security under different transaction conditions.

Deliverables

Folder contained in the public Gitlab repository of the development at https://github.com/mlabs-haskell/cardano-mpe. an additional document on the testing outcomes.

Budget

$8,000 USD

Milestone 5 - Deployment & Documentation

Description

Deployment on a server with documentation covering setup operation and integration details for users and developers.

Deliverables

Contained in a documents folder the Gitlab repository at https://github.com/mlabs-haskell/cardano-mpe.

Budget

$4,800 USD

Join the Discussion (0)

Expert Ratings

Reviews & Ratings

Group Expert Rating (Final)

Overall

4.5

  • Compliance with RFP requirements 5.0
  • Solution details and team expertise 4.5
  • Value for money 4.0

While experts rated this submission highly, ultimately we selected another proposal for strategic reasons.

  • Expert Review 1

    Overall

    5.0

    • Compliance with RFP requirements 5.0
    • Solution details and team expertise 4.0
    • Value for money 0.0
    Not a very detailed description of the contents of the main milestones.

    The main page has a good description of the project, but the milestones are quite small and not very detailed. The size of the team (and roles within it), as well as previous experience of interaction, are a bit confusing.

  • Expert Review 2

    Overall

    4.0

    • Compliance with RFP requirements 5.0
    • Solution details and team expertise 4.0
    • Value for money 0.0
    Good `Implementation Details` section with provided info regarding solution design, would like to see more detailed description and success criteria for the milestones

    Team got an idea of the system and is experienced enough to build optimized MPE on Cardano

Welcome to our website!

Nice to meet you! If you have any question about our services, feel free to contact us.