completed

Reference Inputs SDK ▶ MLabs+Orcfax

$112,200.00 Received
$112,200.00 Requested
Ideascale logo View on ideascale
Community Review Results (1 reviewers)
Addresses Challenge
Feasibility
Auditability
ソリューション

An open source Javascript SDK that demonstrates how best to publish and consume on-chain data using Cardano's CIP-31 reference inputs.

Problem:

参照入力(CIP-31)は、カルダノの「並行処理問題」に対処するものですが、この機能をどのように実装するのが最適かについてのガイドラインはありません。

Yes Votes:
₳ 189,848,634
No Votes:
₳ 11,855,475

This proposal was approved and funded by the Cardano Community via Project F8: Open Source Development Ecosystem Catalyst funding round.

[IMPACT]

Reference inputs are a solution to Cardano's on-chain data publishing problem. Currently, the only way that Cardano smart contracts can receive input datum is from transaction outputs. In Cardano's EUTXO model these are single use. This creates a concurrency problem. Only one script can spend and read the output and then it does not have any obligation to re-post that datum as a new transaction output.

The only way to resolve this issue currently is via off-chain coordination. That goes against decentralization principles.

Fortunately, <u>CIP-31 reference inputs</u> provide the ability to reference the output of a Cardano transaction without having to spend it. This will allow for a data publication model where datum can be read many times by multiple smart contracts without the requirement to consume the publishing transaction. This will greatly simplify the ability for oracles to publish data on-chain for use by Cardano smart contracts.

CIP-31 functionality will be introduced by IOG in the <u>June Vasil hard fork</u>. The Cardano community will be well-served by an exemplar implementation. <u>MLabs</u> and <u>Orcfax</u> are uniquely positioned to design a CIP-31 reference implementation. Both teams have use for this new reference inputs functionality in their projects. They want to share their design choices and tooling with the Cardano open source development community as a Software Development Toolkit (<u>SDK</u>) written in Javascript.

The SDK will be released under <u>MIT</u> license. Documentation will be released under <u>Creative Commons</u> license. The SDK will contain a sample Plutus smart contract for a stop-loss order that is triggered using an oracle data feed.

The ability to consume smart contract data as reference inputs, without having to spend transaction data, will be a major design upgrade for the Cardano smart contract ecosystem.

MLabs will use its well-respected Cardano infrastructure engineering expertise to develop a best-practice reference implementation with a Javascript SDK. It will be used to create a Cardano oracle that publishes off-chain data as CIP-31 reference inputs to an exemplar smart contract that consumes this data on-chain.

The Orcfax project will use this design pattern and SDK for its Cardano oracle implementation. The tooling and documentation will be a valuable resource in the Cardano open-source ecosystem for all developers tackling the input of off-chain data to Cardano smart contracts.

RISK 1: The introduction of CIP-31 (and supporting CIP-32, CIP-33) is delayed by IOG.

STRATEGY: This feature is a top priority for IOG to make Cardano a competitive L1 so delays are very unlikely. Reference inputs have been publicly announced by the IOG delivery manager for June release and CIP-31 related issues and PRs on Github are active and advanced. Even if it is delayed, this Reference Inputs SDK project can progress on Testnet.

RISK 2: The project introduces insecure code onto Cardano Mainnet.

STRATEGY: This project will not be creating a production Mainnet implementation. It will create as-is development tools that will be tested on Cardano Testnet and released, without liability, under open-source MIT license. When Orcfax pushes its infrastructure to Cardano Mainnet it will engage a third-party security audit. It is recommended that all risk-averse Cardano projects do the same.

RISK 3: The complexity and scope of smart contract use cases makes it difficult to chose a generic example.

STRATEGY: The most well-known implementation of oracles in the blockchain space is crypto-currency exchange rate feeds. We'll create an exemplar Plutus smart contract that sets a stop-loss order at a specific BTC/ADA price. We'll trigger that script when the oracle publishes the matching data. The design pattern adopted to implement this use case can form the basis of many other types of interactive oracle-based smart contracts that Cardano developers will need to implement.

[FEASIBILITY]

This project will launch during summer vacation in North America/Europe so the schedule has been extended to six months to account for a soft launch start.

After 2 months:

  • Data input collection and validation for price feed use case
  • Technical update post

After 3 months:

  • Design pattern recommendation
  • Initial code commits - agile development sprints
  • Technical update post

After 4 months:

  • MVP - Javascript tool to publish data on-chain as CIP-31 reference inputs
  • MVP - Plutus stop-loss smart contract
  • Technical update post

After 5 months:

  • Cardano Testnet deployment and QA
  • Demo site and public Github repository
  • Technical update post

After 6 months:

  • MVP - Reference Inputs SDK
  • SDK documentation site
  • Release announcement and wrap-up video

MLabs: 2 developers + 1 project manager

6 months - 560 hours x $145USD/hr ($81,200)

Tasks:

  • Design pattern recommendation
  • Stop-loss Plutus smart contract that uses Reference Inputs
  • Reference Inputs SDK in Javascript
  • Project management and administration

Orcfax: 1 developer + 1 project manager

6 months - 310 hours x $100USD/hr ($31,000)

Tasks:

  • Offchain data input and storage
  • QA on Testnet
  • Demo site
  • Documentation
  • Project management and administration

TOTAL: $112,200

* Both MLabs and Orcfax command high hourly rates due their Cardano domain expertise. However, they charge less than many expert software consultants do in similar North American/European markets.

MLabs (6 months / 560 hours): 2 software developers + 1 project manager

Orcfax (6 months / 310 hours): 1 software developer 1 project manager

----------------------------------------------------

MLabs lead: George Flerovsky - Delivery Manager

George manages a portfolio of projects at MLabs including decentralized exchanges, governance, auctions, yield optimization, and on-chain analytics. He has been a Haskell developer since 2015 and has a deep knowledge of the Cardano consensus protocol, smart contract framework, and network stack.

George participated in the first cohort of the Plutus Pioneers Program in summer 2021 and has actively contributed to the Alonzo Blue, White, and Purple testnets. George has also worked on innovative solutions such as a streaming merge algorithm for concurrency in the Cardax decentralized exchange. We'll be relying on his Cardano architecture expertise to guide the design of the oracle smart contract use case.

LinkedIn: <https://www.linkedin.com/in/george-flerovsky-01943836/ >

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

Orcfax lead: Peter Van Garderen - Project Manager

Peter is founder of the Orcfax Cardano oracle project. Peter is a professional archivist and renowned digital records expert. For the past fifteen years he has managed the delivery of open source software projects used by archival repositories around the world.

In the first phase of the Orcfax project he has been applying archives and record-keeping standards to the oracle information pipeline to improve the trustworthiness of on-chain data. As co-founder of the Landano project, Peter is also working on bringing reliable geo-spatial data into Cardano smart contracts for use in land administration systems.

Peter will manage software QA, implementation of Reference Inputs into the Orcfax oracle reporting solution, as well as documentation of the SDK for use by the Cardano open source development ecosystem.

LinkedIn: <https://www.linkedin.com/in/petervangarderen/>

Github: <https://github.com/peterVG>

[AUDITABILITY]

  1. Monthly technical update posts
  2. Git code commits per month (JS/Plutus)
  3. Number of automated tests
  4. Number of words on documentation site
  5. Number of Github repository interactions (stars, forks, etc.)

This project will be successful and done when the Cardano open source development ecosystem has:

  1. a sound and proven design pattern for implementing CIP-31 reference inputs
  2. a MIT-licensed Javascript SDK for publishing reference inputs
  3. clear documentation that demonstrates how to use the SDK

This project is a continuation of the Catalyst Fund 6 Orcfax project. See <https://cardano.ideascale.com/c/idea/367650>

Orcfax developed a Plutus proof-of-concept for oracle publication when it encountered the concurrency problem inherent in the current EUTXO design. It is eagerly awaiting the implementation of CIP-31 to push its oracle project into production on Cardano Mainnet. See this post for more background.

For Orcfax updates follow us on Twitter:

<https://twitter.com/orcfax>

Sign up for our blog newsletter:

<https://orcfax.link>

MLabs developers maintain a repository of Plutus best practices for Cardano developers. The design pattern chosen for this reference inputs project can contribute to this knowledge base: <https://github.com/Plutonomicon/plutonomicon>

コミュニティ・アドバイザー・レビュー (1)

Comments

Monthly Reports

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