Please describe your proposed solution.
<u>Current Cardano dApp building & execution model</u>
<u>dApp development</u>
- Develop a Plutus or Marlowe smart contract as Cardano onChain code.
- Compile Plutus or Marlowe source code to serialized Plutus script format.
- Develop web3 part as offChain code to interact with onChain code.
- Put it all to form a dApp that works with Cardano blockchain network.
<u>dApp execution</u>
Lock asset
- Sender sends the amount of an asset to a smart contract address with datum data.
- The locked asset is then locked at Cardano blockchain as an UTXO then waits for another user to unlock (spend).
Unlock asset (spend a locked UTXO)
- A user builds and signs a transaction with attached plutus script, redeemer data then submit to Cardano node.
- If the transaction is validated by plutus script then the locked amount of an asset will be sent to the receiver wallet otherwise the transaction will fail.
Currently each Cardano dApp project usually builds its own smart contract and web3 part to interact with plutus script for every transaction. These works are difficult with high risk that potentially leads the dApp project into failure. Many dApps projects are stuck at this step.
<u>Our motivations</u>
The possibilities to generalized plutus smart contract scripts then provide them as a service through APIs:
- A plutus script validates a transaction through its validator logic with datum, redeemer and script context as params. This means we can generalize a smart contract for multi dApps to use at multi execution contexts.
- A compiled serialized plutus script is a normal JSON object that is able to store in a document based database e.g mongo db then provider as a return of an API call with the same JSON format.
The benefit of having Plutus smart contract services to simplify the smart contract execution model for Cardano dApp by providing APIs for:
- Plutus developers to register its common use dApps
- dApp developers to use the registered plutus scripts via fetching contract APIs
<u>How it works</u>
A developer developed a Plutus smart contract script with validator logic that returns TRUE or FALSE if both of below conditions are validated:
- The unlock transaction signer’s signature
- The unlock transaction submit time with the given signature and deadline inside locked transaction’s datum.
This smart contract can be used in many contexts e.g:
- Pay to the seller when the buyer receives goods from the shipper with an unlock transaction signed by the shipper.
- Pay the salary to staff with an unlock transaction signed by the assigned admin.
The developer who developed this plutus script can register it as a JSON object to the PAAS platform for others reuse through API fetch.
The other developers who develop shipping and salary dApps then no need to develop its owned smart contract or even web3 part. They can call PAAS API: <https://paas.bworks.app/api/contracts/641005aa53053539eda273de>
The API will return a serialized plutus script:
{
"name": "ValidateSignerSignatureV2",
"address": "addr_***er73qh9c4kr5lh",
"cborhex": "5908c55908c201***011",
"description": "<p>Plutus V2, validate unlock PKH</p>" }
This result is a JSON object that dApp uses every time it submits a lock or unlock (spend) transaction to Cardano network.
Note that the Marlowe code will also need compile to serialized Plutus script format before it can be used as onChain code. So the APIs will work for Marlowe similarly as Plutus smart contract.
Please see how it works with attached screenshoots of demo app at functions section.
<u>Architecture</u>
The project is designed with following 05 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>AppFlows</u>
<u>Submit a plutus script appFlow</u>
- A developer register its own plutus 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
- Microservice then verifies the behavior of registered plutus script to confirm its validator logic and datum & redeemer data type.
- The admin from the community then verifies the plutus script manually through our plutus verification web function.
- Approve to list the registered script or reject to list it with feedback to developer
Note: Since it is impossible to read the logic with the serialized plutus script 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 plutus script appFlow</u>
dApp developer select a smart contract they want to use in his dApp
Fetch the smart contract through it public API to have return contains script address, cborHex
Develop web3 lock function (send asset to script address) with desire datum
Develop web3 unlock function (spend locked UTXO) with desire redeemer
Note: It is expected to have lock and unlock web3 components shipped with plutus script when the developer registers its script. However dApp developers can build its own component on top of Cardano Serialization Lib.
<u>Functions</u>
- Plutus store manager:
- Register a plutus script
- Compile haskell plutus source code to serialized script
- Verify serialized plutus script with given github haskell code
- Verify behavior of a plutus script
- Approve smart contract to list then available for dApp developer to use
- Plutus 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>Some demo screenshoots</u>
Dashboard
Publish a script
Perform a web3 transaction
Transactions & reports
<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>
- Plutus developers. Who published its smart contracts
- dApp developers. Who consume published smart contracts through APIs
<u>Business model</u>
PAAS is an open source platform. It provide both free and commercial services:
Free accounts:
- Has permission to access simple smart contracts only
- Less than 100 requests per a month
Commercial accounts:
- Has no limit to access all listed smart contracts and web3 component on the platform
- No requests limit
- Have permission to request official support from developers
Revenue and expenses
The revenue from subscriber will be use to cover the expenses:
- Operation & staffs cost
- Pay to plutus & web3 developers who contribute scripts and codes.
The payment amount to a Plutus developer depends on the number of API calls to its published scripts.
<u>User acquisition</u>
Our user acquisition strategy will target users from two groups - within the Cardano community, and outside of Cardano at 2 different periods.
<u>At development and trial launch periods</u>
We will firstly target users from existing Cardano developers communities. We can reach them through Cardano community groups on Telegram, Twitter and Discord channels.
At this stage we aim to have around 50 paid and unpaid members to join the project. These members form an initial community who well understand project ideas for viral communication strategy at the next stage.
<u>After launch product period</u>
At this stage we will focus on users from Cardano communities and from outside, through user engagement, communication and campaigns.
- User engagement
- Through word of mouth
- Through communication channels, github repo, and the product itself\
- User acquisition through communication campaigns
The different campaigns are designed separately to solve problems with specific groups of users:
- Users from Cardano communities: these users are friendly to Cardano technologies, so the campaigns will focus on our product features, functions and values
- Non-Cardano developers: the campaigns will focus on the unique features of building on Cardano, and how b-Learn can help them transition from other developer environments
- Crypto users: the campaigns focus on showing the advantages of Cardano and how the product solves problems through Cardano technologies e.g Plutus versus other chains e.g Ethereum.
- Non crypto users: the campaigns focus on showing blockchain’s unique values versus traditional technologies.
The target is to have around 1000 users after 01 year launch the product. This includes around 400 users from the existing Cardano community and 600 users from outside.
<u>Conclusion</u>
The project central missions:
- Offer alternative approach to build and run Cardano dApps with 30-50% lower cost:
- Reduce the developer and time cost of building Cardano dApp by using available smart contracts and web3 parts.
- Reduce running cost with pay as you go cost without maintaining smart contract and Cardano node.
- Build dApps faster and better with available smart contracts and web3 components.
- Grow Plutus and web3 developers and plutus smart contracts by having a place where they can submit their smart contracts then earn.
You can see the project as:
- A smart contract verification and publication platform.
- A platform to share serialized Plutus scripts.
- The APIs to develop dApp without developing Plutus or Marlowe scripts.
- The service for Plutus developers to promote their product and earn.
Through any above point of view our central missions are still the same: build dApp faster and easier with less cost.
By fulfilling above missions the project will result in growing Cardano developers and Cardano dApps.
<u>Note to PAs and readers</u>
Please contact our telegram to have demo credentials or if there is anything needs clarify: https://t.me/paasCardano
How does your proposed solution address the challenge and what benefits will this bring to the Cardano ecosystem?
<u>Solving the challenge</u>
<u>Infrastructure and tools to build Cardano dApps faster and better </u>
As a place where plutus developers can publish its scripts, then other dApps can use it via APIs. PAAS plays a role to become infrastructure to build dApps much faster and easier.
<u>Scale and standardize Cardano dApps</u>
With available smart contracts services developers can scale UP or DOWN its dApps just through the use of pay as go service APIs.
By using proven plutus smart contract scripts and web3 parts the platform helps to standardize Cardano dApps’s quality.
<u>Improve and grow the developer ecosystem </u>
The proposed method to build dApp lead the developer focused to work at the expertises they really good at:
- Plutus developers focus on building smart contracts
- Web3 developers focus on building its web3 component to interact with dAPp from the client side.
- Application developers focus to build traditional parts of the dApps
The impact to dApp development process:
- Remove the barrier that stops developers from building dApps by using the service with proven ones.
- Reduce the time to build and launch dApps by using the service APIs instead of developing all.
Bring benefits to Cardano ecosystem from different point of view:
- Attract more smart contract and web3 developers to Cardano as its works are paid and public appreciated through the usage of its smart contract API calls.
- Encouraged more dApp projects are built on Cardano with a new approach and architecture.
- The more dApps are created and adopted the more transactions on Cardano networks are created.
PAAS are smart contract infrastructure and tools to easier build and scale Cardano dApps. This solves the challenge directly and brings the benefits to Cardano ecosystem from some point of view.
How do you intend to measure the success of your project?
The ultimate goal of this project is to offer an alternative approach to build Cardano web3 dApp much faster and easier with significantly lower cost. dApp developers need not to build its own smart contracts and web3 components, they can use services from PAAS to have available smart contracts for their dApps.
For detail KPIs please refer to "how will you validate if your approach is feasible" section.
<u> Measure the success of the project at development period</u>
- All proposed functions and features are implemented and deployed.
- The simplicity and the speed of application met defined KPIs.
- System stability and security met defined KPIs.
<u>Measure the success of the project as a running product</u>
- How it helps to build dApp faster and better :
- The required hours a developer a dApp compare with normal processes that build it owned Plutus script and web3. We expected it to reduce 50% of time to build an dApp with API from PAAS.
- How it helps to build and run dApp with lower cost:
- The required engineering cost to build dApps with PAAS compared with normal processes.
- The required running cost includes maintenance, infrastructure and operation costs.
- Number of registered smart contract developers and published smart contract scripts:
- Registered developers
- Published plutus smart contract scripts
- The validate logics that published smart contracts cover e.g validate time, validate address …
- Number of published web3 components that help to build dApps with given plutus scripts.
- Number of service subscribers:
- Number of developers submit to use the service APIs
- Number of dApps that use the services and its API requests.
This measured data will be public on the platform dashboard where everyone can have a look, feedback to improve:
Please describe your plans to share the outputs and results of your project?
<u>Communicate the project</u>
Our works, problems and outputs are always communicated across the process through public GitHub repo, staging server and checklist and documents:
- Github commits show our works in term of source code
- Github problems show community feedback and how developers work out.
- Staging server where we deployed the latest code to test, shows the updated version of the product.
- CheckList show what we are working on & its status
- Screenshot folder capture the product screens for each code commit
- Telegram channel to realtime communicate with the community and Catalyst.
<u>Track the project milestones</u>
The community can always keep track project activities, outputs, try the newest developed functions through the links:
Checklist: <https://docs.google.com/spreadsheets/d/1ILWSRlA5IBnSEU05vD63MH3nmdFNloXsWZAIUybbjL4/edit#gid=0>
App screenShoots: https://drive.google.com/drive/folders/1icI_jTJqdEp39-_N5GyZ6Y8iNdCBde72
GitHub: <https://github.com/saigonbitmaster/paas>
APIs: https://paas.bworks.app/api
CMS: <https://paas.bworks.app/cms>
WEB: <https://paas.bworks.app/web>
Through above resources the community can always track project works, timeline and commitment:
- What tasks we are working on
- Who is working on the task
- The passed or failed result of a task or job.
- How the code present product functions and features
<u>Give us your input</u>
Our GitHub is also open for the community to comment, and raise the issue about what feature or function they want to add to the product. By getting more comments from the community we will get the project out from the rut to be from community to community.