not approved
Scalus – multiplatform Scala implementation of Cardano Plutus
Current Project Status
Unfunded
Amount
Received
₳0
Amount
Requested
₳290,400
Percentage
Received
0.00%
Solution

Scalus allows the development of DApps using Scala language.

Scala has a larger talent pool, good dev experience, large ecosystem/community, and is multi platform (JVM/JavaScript/LLVM), on/off-chain.

Problem

Cardano Dev is challenging. Haskell: hard to hire talent, bad Dev experience. Aiken: new language, no devs, no low-level control. Neither works on multiple platforms (JVM, LLVM, JS).

Feasibility
Value for money
Impact / Alignment

Team

1 member

Scalus – multiplatform Scala implementation of Cardano Plutus

Please describe your proposed solution.

Scalus is a Scala implementation of Cardano Plutus, PlutusTx, including UPLC evaluation machine.

It allows developers to write Cardano smart contracts using Scala programming language.

Scalus leverages Scala compiler plugin system and macros to convert Scala code to Cardano Untyped Plutus Core (UPLC), similarly to how Plutus converts Haskell to UPLC.

Scalus has huge benefits over all other solutions.

Scala code can be compiled to JVM bytecode, JavaScript, and LLVM via Scala Native. This means that you write code once in one language, and use it everywhere, cross-platform, frontend and backend. And easily integrate with other code in Java, Kotlin, JavaScript, TypeScript, or even Rust, if needed.

Scalus will provide Java API, and TypeScript binding to generated JavaScript, enabling Plutus Virtual Machine evaluation and cost computation for JVM/JavaScript platforms. This can be leveraged by other projects from the ecosystem like <https://github.com/bloxbean>, Lucid, etc.

Scalus has an API for low level UPLC code creation, composition and manipulation, unlike, say, Aiken. So developers have unlimited flexibility and power over their contracts, comparable to the Plutarch library.

Scalus leverages Scala property-based testing framework, ScalaCheck, analogue of Haskell QuickCheck, to rigorously test its code, and will provide primitives and solutions to meticulously test your contracts and DApps with all possible/feasible inputs.

There is nothing even close to this solution in terms of power to cost ratio.

How does your proposed solution address the challenge and what benefits will this bring to the Cardano ecosystem?

Adding Scala support will have a large impact on the Cardano Developer Ecosystem:

  • open a large pool of talent for hire
  • simplify adoption by the financial sector companies that heavily invested in Java and Scala ecosystems
  • greatly improve developers experience with working debugger, good IDE support, faster 'change-compile-test' turnaround
  • Allow code reuse between multiple platforms (JVM, JavaScript, TypeScript, potentially LLVM/WebAsm, Android, and iOS), on-chain, and off-chain backend and frontend.
  • Great performance, code maintainability and modularity, universality
  • Scala is one of the best functional programming languages in existence, with a mature ecosystem, libraries, tools, and community.

How do you intend to measure the success of your project?

By the amount of happy Cardano developers, and the amount of projects successfully using Scalus. And GitHub stars, number of issues and PRs.

Please describe your plans to share the outputs and results of your project?

The project is fully open source. All the outputs and results will be published on GitHub:

<https://github.com/nau/scalus>

<https://github.com/nau/scalus-starter>

The documentation will be published online on https://scalus.org

The news, updates and announcements will be published on the official Scalus Twitter:

<https://twitter.com/Scalus3>

and Discord: <https://discord.gg/ygwtuBybsy>

What is your capability to deliver your project with high levels of trust and accountability?

I’m a former compiler engineer at IOG, I worked on Marlowe DSL (<https://marlowe.iohk.io>).

I’m a senior Scala engineer with more than 10 years of Scala development experience with companies like UBS and Deutsche Bank.

I’m already working on Scalus and have visible results. Current version of Scalus 0.2 already works quite well and is able to compile large and complex contracts that work on Testnet and Mainnet.

What are the main goals for the project and how will you validate if your approach is feasible?

Scalus aims to provide Cardano developers with the tools to make DApp development more simple, faster, and less expensive. No need to learn a new language, multi-platform support, frontend and backend.

It’s absolutely feasible because, firstly, Cardano Plutus uses this approach, secondly, current version of Scalus 0.2 works, and is able to compile and run fairly complex contracts, generate minting policy scripts on JVM and JavaScript.

Please provide a detailed breakdown of your project’s milestones and each of the main tasks or activities to reach the milestone plus the expected timeline for the delivery.

Milestones/Goals/Deliverables

Hours

Scalus Core

Scala Compiler Plugin features and improvements

160

Script Execution Budget calculation

80

Plutus v2 builtins implementation (JVM and JavaScript)

80

Generic Data serialization/lifting for Scala datatypes

80

CIP-0057 Plutus Blueprint generation

40

Scalus APIs and Integrations

Scalus Standard Library

80

ScalaCheck Property-based framework for testing Scalus contracts

80

TypeScript bindings for script serialization/construction/execution/cost/evaluation

40

Java API for script serialization/construction/execution/cost/evaluation

40

DevOps Effort (CI, Maven Central release, npm release etc)

40

SBT tasks to deploy and test contracts on private and public testnets

40

Scalus Docs, Examples and Tutorials

Scalus Starter Project and Demeter.run template

40

Documentation, examples, tutorials

80

From the estimates you can derive that Scalus Core would be ready in about 3 months, APIs and Integrations – in 2 months, and Documentation – in 1 month, adding up to 6 months of development.

Please describe the deliverables, outputs and intended outcomes of each milestone.

Implementation of Scalus Core will result in a working and tested code of the features on the project’s GitHub, and published to Maven Central JAR files.

I expect the library to reach version 0.7 and be production ready.

Similarly for Scalus APIs and Integrations milestone: code on GitHub, plus published JavaScript packages to NPM, working CI with all tests passing, plus a way to start a private testnet with your app using a single command.

Scalus Docs, Examples and Tutorials will result in a working site with API documentation, a tutorial and examples. Also, there will be a scalus-starter GitHub template project and Demeter.run template.

At this point I expect the library to reach version 1.0 and be production ready.

Please provide a detailed budget breakdown of the proposed work and resources.

From the above main tasks estimation we get this.

Subtotal hours

880

Contingency Budget (10%)

88

Total engineering hours

968

Engineering hour price, including taxes etc, $/hour

75

Development Budget

$72,600

Ada price

0.25

Budget in Ada

290,400

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

The main proposer, Alexander Nemish, will be actively working on the proposal.

I am considering hiring another Scala engineer to help make the project sooner.

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

Considering that Plutus was developed by a team of at least 5 people for multiple years, I argue that paying one person a fraction of their salaries for 6 months for the comparable result is a bargain.

For the money you’ll get a highly motivated, invested, and skilled professional compiler engineer and domain expert. What’s not to like?

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