completed
Classified Smart Contracts for Distinct Use Case dApps
Current Project Status
Complete
Amount
Received
₳130,000
Amount
Requested
₳165,000
Percentage
Received
78.79%
Solution

Complete a developing MVP that publish, classify smart contracts written in either Plutus, Marlowe or Aiken for others to create, run dApps with single or combined validation logics through APIs.

Problem

Smart contract defines dApp features. A platform that provides free smart contracts with well classified validation logics will help grow dApp adoption for identified Cardano use cases.

Team

1 member

Classified Smart Contracts for Distinct Use Case dApps

Please describe your proposed solution.

<u>Introduction</u>

This proposal is to complete a developing mainnet MVP. We submit this proposal into this category because we believe free, available smart contracts with classified validation logics will back to grow diverse dApps that clearly adopt to identified use cases.

The platform named PAAS based on our developing Cardano mainnet MVP uses for smart contract developers to publish their smart contracts classified by validator logics then dApp developers can select the right ones to build dApps by fetching APIs each time dApp build transactions.

It also provides the utilities:

  • Tools to compile Plutus, Marlowe and Aiken smart contract source code into Json objects.
  • Audit tools to:
  • Verify the source code of compiled smart contract.
  • Audit smart contract's validators and features.
  • Record meta data to track smart contract transactions which are built through platform.

The smart contracts should be classified by it validation logics:

  • Time.
  • Addresses.
  • Signature.
  • Harvest locked UTXOs.
  • Logic with params in datum, redeemer.
  • Combined validation logics.

Below are sample map smart contract validation logics to identified use case dApps:

  • Addresses validation -> pay salaries to a group, dividends to stake holder dApps.
  • Signature validation -> shipping, gift dApps.
  • Harvest locked UTXOs -> live casino dApp.
  • Logic with params in datum, redeemer -> DEX dApp.

So the idea is simple: if someone identified a use case to adopt dApp, they can go the platform select one smart contract that reflects the use case to build and launch its dApps.

The core logics of MVP is already worked for bWorks project and other dApp examples.

Paas MVP prototype demo video:

<https://www.youtube.com/watch?v=4w8NyZIOnCM>Please try the MVP prototype at <https://paas.bworks.app>, credentials: demo/demo with functions:

  • Post, get a smart contract APIs.
  • Run dApp examples with posted smart contracts.
  • Verify in app and onChain transactions at <https://cardanoscan.io>

<u>Current status of the project</u>

  • Prototype of the MVP is developed and worked, core logics are verified.
  • Common smart contract validators are not fully developed.
  • Parts of project code is still at prototype level need refactor.
  • Utilities are not fully developed yet e.g generalized contract audit tool.
  • Security is not enforced. Performance is not benchmarked yet.

The proposal is to complete the project with outputs as a ready to go MVP for users with required works are listed in the milestones.

<u>Example</u>

A developer developed a Plutus smart contract script with validator logic that return true then the transaction will be succeed if:

  • The signer’s signature is correct.
  • The transaction submit time within given deadline.

Otherwise smart contract will return false and the transaction will be failed.

This contract can be used in many use case contexts e.g manage shipping, pay salary so the developer can publish this contract to PAAS then the contract will be persisted for other to use by fetching APIs every time they need smart contract to build transactions.

A dApp developer who develops e.g shipping manager dApp It can use this smart contract to rule the delivery by verify the signer signature and delivery time. It doesn't need to develop its own smart contract, they use available contract on platform by fetching API for every transactions.

This example worked on Cardano mainnet:

<https://cardanoscan.io/address/71fdf7eb205ba9ba574032db49fcdbf24e64d93c2a149e77c8807ce041>

<u>How it works</u>

<u>The possibilities</u>

Complied Cardano smart contracts are JSON objects either they written in Plutus, Marlowe or Aiken languages so it is possible to post/get a smart contract via restful APIs and store it in document based db e.g Mongo DB at backend.

<u>Publish a smart contract</u>

  • A developer register its own smart contract as serialized script and source code github link
  • Describe datum and redeemer as a JSON object
  • Describe how script work with sample lock, unlock transactions and other extra information
  • The backend then verifies the behavior of registered smart contract object to confirm its validator logic and datum & redeemer data type.
  • The admin from the community then audit this smart contract manually through a web function.
  • Approve to list or reject the registered smart contract object.

Since it is impossible to read the logic with the compiled smart contract code. It is required to provide script public github code repo that lets microservice verify it comes from known source code and for the community to audit the contract.

<u>Get a smart contract for dApp to build transactions</u>

  • dApp developers select a smart contract that fit their dApp use case.
  • Developer web3 functions to submit transactions with this smart contract fetched via PAAS APIs.

<u>Architecture</u>

The project is include modules:

  • Backend APIs to provide REST endpoints for client requests and perform logics.
  • Microservices to handle system particular jobs e.g interact with Cardano nodes.
  • Developer frontend for plutus developer submit its plutus smart contract scripts.
  • CMS for admin to manage the platform overall.
  • Service subscriber frontend for users who want to use smart contract services.

<u>Functions</u>

  • Smart contract manager:
  • Register a compiled smart contract.
  • Compile haskell plutus, marlowe, aiken source code to serialized script.
  • Verify serialized script with given github code.
  • Audit the smart contract.
  • Approve smart contract to list then available for dApp developer to use
  • Smart contract service provider:
  • Fetching serialized plutus script through APIs to build dApp
  • Monitor transactions of plutus scripts
  • Rate the usage of scripts
  • Dynamic modeling datum and redeemer data type
  • Delegate unlock trusted partner
  • Fetch smart contract list and a single smart contract to use in dApp for every transaction
  • Payment to pay developers for his smart contract usage
  • Model base and global search
  • Report
  • Plutus script utilizing statistic, number of API calls and amounts
  • Lock and unlock transaction status
  • Dashboard

<u>Features</u>

  • Freezed listed plutus script. This to make sure once a smart contract is listed and used by dApps it can not be changed since the change of plutus script may cause the scratch of dApps. The script developer has the right to provide another version only.
  • Multi cabal and plutus versions build tool
  • Dynamic modeling datum and redeemer data type
  • In app verify script behavior
  • Seamless applications
  • Email or Cardano wallet authentication

<u>Users</u>

  • Smart contract developers. Who published its smart contracts
  • dApp developers. Who consume published smart contracts through APIs

<u>Conclusion</u>

The project can be seen as:

  • A smart contract verification and publication platform.
  • A platform to share smart contract.
  • The APIs to develop dApp without developing Plutus, Aiken or Marlowe scripts.
  • The service for smart contract developers to promote their product and earn.

This help to develop Cardano dApps much easier with significant lower cost. This benefit dApp investors, owners and developers.

<u>Project contact</u>:

https://t.me/paasCardano

<u>Project diagram</u>

Architecture

Architecture

Publish smart contract flow

publishScript

Get a smart contract flow

getScript

MVP screenshoots

Dashboard

dashboard

Published classified smart contracts

contracts

Publish a smart contract

publish

dApp lock transaction with smart contract from PAAS API

lock

dApp unlock transaction with smart contract from PAAS API

unlock

Result, Asset unlocked to receiver wallet

received

Reports

report

Mainnet TXs

txs

Please define the positive impact your project will have on the wider Cardano community.

Measure the impact of project

  • How fast and lower cost the dApp are built with services from platform.
  • Number of smart contracts and its classified logics submit to the platform.
  • Number of dApps and its use cases use services from the platform.
  • Number of transactions make with smart contracts on the platform.

Values to Cardano ecosystem

  • Simplify process and reduce the time and cost to build and launch dApps.
  • Attract web3 developers to Cardano with simpler development process.
  • More, clear use cases for dApp adoption with classified smart contracts.
  • Promote proven smart contracts lead to more quality dApps.
  • Indirectly grow network transactions contribute network fees to the Cardano.

Share outputs and opportunities

  • Open source the project, smart contracts code so newbies and others can inherits.
  • The knowledge, experience of the project are share through documents so newbie and other can learn from.
  • The services from deployed MVP is free so dApps, smart contract developers can use to help the works.

What is your capability to deliver your project with high levels of trust and accountability? How do you intend to validate if your approach is feasible?

<u>Team capacity </u>

The team consists capable members in various domains which required by the project:

  • Experienced Cardano web3, smart contract engineers.
  • Seasoned backend, frontend software and Cardano DevOps engineers.
  • Operation, community and marketing people.

<u>Reference Cardano projects:</u>

<u>Proposal MVP:</u>

  • APIs: <https://paas.bworks.app/api>
  • App: <https://paas.bworks.app/web#/>
  • dApps examples: <https://paas.bworks.app/web#/examples>
  • GitHub: <https://github.com/saigonbitmaster/paas>

What are the key milestones you need to achieve in order to complete your project successfully?

Time: Month 01-02

<u>Develop Backend APIs</u>

Design DB schemas

Backend APIs

  • APIs for smart contract developers publish its scripts:
  • Submit a serialized smart contract objects API.
  • Classify smart contracts into type of logics it solves.
  • Upgrade smart contract API.
  • APIs for dApp developers get smart contracts for dApps transactions:
  • Get list and get one of smart contract objects.
  • APIs to audit a smart contract.
  • Backend security functions.
  • APIs to record the transaction metadata.
  • Report & dashboard APIs.
  • Common CMS APIs.
  • User APIs.

Utilities

  • Verified published smart contracts with given gitHub repo.
  • Freeze publish smart contracts.

<u>Outputs</u>

All DB schemas, APIs, utilities are developed, deployed at https://paas.bworks.app/api and ready to use.

The API runs fast, secured, no error with average latency &lt; 1 second.

>Time: Month 03

<u>Develop CMS frontend</u>

  • General admin management.
  • Published smart contract management.
  • Verify the smart contract validator logics.
  • User management.
  • Analytic and reports: published scripts, script transactions.
  • Dashboard.

<u>Outputs</u>

The CMS frontend app is developed, tested, deployed and ready to use.

The app runs fast, secured, no error with average response time &lt; 2 seconds.

>Time: Month 04-05

<u>Develop frontend apps</u>

Publisher frontend for smart contract developer

Time: Month 04

  • Publish a compiled smart contract.
  • Flexible datum, redeemer datatype builder UI.
  • View status of script verification and confirmation.
  • Upgrade version of a published smart contract.
  • Script consuming tracking.
  • Report, dashboard.

Web frontend for dApp developer

Time: Month 05

  • List of published smart contracts and web3 components
  • Select a smart contract to build dApps
  • Track the usage of account.
  • Track transaction status.
  • Report, dashboard.

<u>Outputs</u>

The frontend app for smart contract, dApp developers is developed, tested, deployed and ready to use.

The app runs fast, secured, no error with average response time &lt; 2 seconds.

>Time: Month 06

<u>Initial list of smart contracts</u>

  • Develop a list of smart contracts with most common validators:
  • Validate wallet signature.
  • Validate transaction date.
  • Validate receiver address.
  • Validate common logics with params extract from datum, redeemer.
  • Mint token.
  • Develop dApp web3 components for those smart contracts.

<u>Outputs</u>

The above smart contracts are developed, compiled and published on the platform and ready to use.

><u>QA/QC</u>

Time: Month 07

  • Perform all function and feature test.
  • Feedback, fix bugs.
  • Verify the working of key functions:
  • Publisher for smart contract developers
  • Submit service and use APIs to build dApps for dApp developers

<u>Outputs</u>

Test and log all functions, features.

Fix bugs.

Make sure the platform is good to go.

>Time: Month 08

<u>Launch platform</u>

  • Deploy and run platform.
  • User acquisition and engagement.
  • Function, feature improvement

Outputs:

The platform is deployed to AWS in a production environment with defined functions, features and available for smart contract and dApp developers to use.

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

1-Thang Tran

Full stack, smart contract & web3 engineer.

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

Responsibilities:

  • Engineering management.
  • Smart contract, web3 developer.
  • full stack developer.

2-David do

Professional social marketing and online business manager

<https://www.linkedin.com/in/david-do-0bb52b283/>

Responsibilities: Product promotion, user acquisition and community engagement.

3-Thang Vu

Senior software and web3 developer.

<https://github.com/vmthang>

Responsibilities:

  • Smart contract, web3 developer.
  • Full stack engineer.

4-Thanh Ngoc

Senior full stack and database developer.

<https://www.linkedin.com/in/ngocthanhit/>

Responsibilities:

  • Full stack engineer

5-Thanh Nguyen

Senior full stack engineer

<https://www.linkedin.com/in/congthanh-nguyen-b152361a0>

GitHub: https://github.com/makotovnjp

Responsibilities:

  • Full stack engineer

6-Oanh Ngo

Experienced QA/QC leader.

<https://www.linkedin.com/in/oanh-ngo-06b331100>

Responsibilities: QA/QC leader.

7-Chuong Pham

Senior devOps, experienced Cardano engineer.

<https://github.com/jackchuong>

Responsibilities: Develop Cardano scripts, System operation.

8-Dung Phan

Senior infrastructure engineer.

<https://www.linkedin.com/in/phan-d%C5%A9ng-6682b5245/>

Responsibilities: System provisioning, operation.

Other resources that hire through https://www.bworks.app

Please provide a cost breakdown of the proposed work and resources.

Total requested budget: 165,000 Ada

Milestone-01.

<u>Develop Backend APIs</u>

Time: Month 01-02. Budget: 40,000 Ada.

Estimated 340 work hours at cost 120 Ada per hour for 04 developers work in 02 months.

DB schemas: 10,000 Ada.

Backend APIs: 20,000 Ada.

  • Plutus script APIs for plutus developers publish its scripts.
  • Submit a serialized plutus script API
  • Upgrade version of a published serialized plutus script API
  • Plutus script APIs for web3 developers get to build dApps.
  • Get list and get one of plutus scripts
  • Cardano transaction submitted APIs to record the transaction which made with published plutus scripts.
  • Record the Cardano transaction which was made by a service account with published scripts and its status.
  • Record lock and unlock status of a transaction.
  • Report APIs.
  • Dashboard APIs.
  • Common CMS APIs.
  • User APIsa.

Backend logics & microservices: 20,000 Ada.

  • Verified a serialized script with its accomplished github source code.
  • Interact with Cardano node to execute a Cardano CLI script with params.
  • Analytic services.

Milestone-02.

<u>Develop CMS frontend</u>

Time: Month 03. Budget: 25,000 Ada

Estimated 250 work hours at cost 100 Ada per hour, for 03 developers work in 01 months to build the below functions/features:

  • General admin management: 10,000 Ada
  • User management.
  • Analytic and reports: published scripts, script transactions.
  • Dashboard.
  • Promotion functions.
  • Smart contract management functions: 15,000
  • Published scripts management
  • Verify the script validator logics
  • Payment with Ada functions

<u>Milestone-03.</u>

Develop publisher frontend

Time: Month 04. Budget: 20,000 Ada

Estimated 200 work hours at cost 100 Ada per hour, for 03 developers work in 01 months to build the below functions, features and UI/UXs:

  • Publish a compiled serialized smart contract script.
  • Flexible datum and redeemer datatype builder.
  • View status of script verification and confirmation.
  • Upgrade version of a published smart contract script.
  • Script consuming tracking.
  • Dashboard.

Milestone-03.

<u>Service subscriber frontend</u>

Time: Month 05 budget: 20,000 Ada

Estimated 200 work hours at cost 100 Ada per hour, for 03 developers work in 01 months to build the below functions, features and UI/UXs:

  • List of published smart contracts and web3 components.
  • Select a smart contract to build dApps.
  • Tracking the usage of an account.
  • Tracking transaction status, its output and status.
  • Reports.
  • Dashboard.

Milestone-04.

<u>QA/QC</u>

Time: Month 06. Budget: 8,000 Ada

Estimated 100 work hours at cost 80 Ada per hour, for 03 developers and QA/QC work in 01 months for the below works:

  • Perform function, feature and performance test.
  • Feedback, fix bugs and improvement.
  • Verify the working of key functions, list known bugs.

Milestone-05.

<u>Develop initial smart contracts</u>

Time: Month 07. Budget: 25,000 Ada

This to pay to have at least 05 generalized smart contracts and web3 sample code with different validator logics:

  • Develop a list of smart contract to init the platform.
  • Web3 components for dApps for each smart contract.
  • User guide and cli scripts.

<u>Launch platform</u>

Time: Month 08. Budget: 27,000 Ada is equivalent

  • 01 year running for 03 AWS medium servers infrastructure cost: 12,000 Ada
  • Grow community and operation: 14,000 Ada
  • User engagement
  • Reward to community developers who have for excellent smart contracts

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

The use of requested budget:

  • Complete the proposed MVP of the platform.
  • Develop set of smart contracts for project initiation.
  • Pay community developer for excellent posted smart contracts.
  • Pay server infrastructure cost for development and 01 year after.
  • Grow community users.

The return of funds:

  • Less time and low cost to build dApps.
  • Grow dApp adoption, Cardano use cases for real life.
  • Indirectly grow transactions that contribute Cardano network fees.
  • Attract developers from other backgrounds come Cardano to build dApps.

The estimated cost in Ada is equivalent to around 50k $ at average last year Ada price 0.3$ with average 100 Ada for a work hour.

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