not approved
Stellar Contracts: Open-source next-generation library for great contract architecture
Current Project Status
Unfunded
Amount
Received
₳0
Amount
Requested
₳112,111
Percentage
Received
0.00%
Solution

We created Stellar Contracts - a library for creating dApp components with advanced architecture using multiple on-chain contract scripts, along with their off-chain code, all from the browser.

Problem

Creation of smart contracts & dApps on Cardano is too difficult for most software developers. There is no framework for applying strong architectural patterns for flexible, evolving contracts

Feasibility
Value for money
Impact / Alignment

Done Collectively

1 member

Stellar Contracts: Open-source next-generation library for great contract architecture

Please describe your proposed solution.

We have developed and open-sourced the Stellar Contracts library during 2023. We will continue to do development on the project and we're seeking Catalyst sponsorship for already-delivered code supporting smart-contract developers on Cardano.

Stellar Contracts is a Typescript library that developers can use to construct constellations of collaborating smart contracts, in a design pattern that has not yet gained broad attention in the Cardano development community.

Stellar works by enabling smaller, simpler, more-focused contracts to be combined for powerful results, including the ability to update an on-chain contract's behavior without changing its address; to better reuse on-chain and off-chain code; and to plug in policy variants for customization and flexibility in reuse.

Stellar Contracts provides a framework for dApp developers to represent the internal capabilities of their on-chain code (+off-chain txn-building code) using higher-level interfaces that directly fit the problem/solution space of their application.

As a result, you can present a dAPI for your application - a decentralized API or dAPI providing application-level concepts, activities, data structures, and transaction-building helper-functions that match your app.

Being able to publish a pure javascript package with the dAPI for your application creates benefits including:

  • UI developers can integrate with blockchain code through Javascript/Typescript, with type-safety built into their editor, so more Cardano-using applications can be built more easily
  • A dApp developer can choose to provide their on-chain capabilities in a library that can be used by other projects, so other projects can include chain-connected / on-chain behaviors into other application UI's, and magnify the impact of the smart-contract code.
  • dApp developers can publish their dAPIs as open-source, advancing transparency and auditability while integrating them into advanced UI's that create richer experiences and sustainable business value.

The essential library for Stellar Contracts has already been created, and can benefit from funding support for further development. The scope of work already completed includes:

  • Use-case analysis (user-level and developer level) and functional requirements development
  • Project architecture design
  • Integration-test-driven development for a simple coin-minter (SampleTreasury in the repo)
  • Technical content development providing guidance for developers using the platform
  • Beta / testnet-ready code complete
  • Scenario-driven test-automation helper classes

The remaining scope of work being proposed includes:

  • Create and publish detailed reference material for test helpers, contract-helper functions, and a few classes and types.
  • Continue testnet validation, refinements to packaging, publishing to NPM
  • Continue low-level unit testing for code-coverage redundancy

The essential results of this proposal are already available on Github. Support open-source development for Cardano.

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

Stellar Contracts addresses the "Plutus tools and software" segment of the challenge, as it is a development tool that helps developers more easily write and deploy smart contracts onto the Cardano blockchain.

Because Stellar (and Helios) are javascript-based, they can run within the browser, so that application developers can get started simply by using their normal build environment (node.js on developer machines) and a one-line installation command. It also means that static web applications will be deployable e.g. to Github Pages with built-in smart contracts, forming self-sovereign static web apps. Easier smart contract development ✅

Stellar provides architectural patterns through its APIs and its documentation which developers can apply in their projects. By plugging together various scripts, unique-utility-tokens (or UUT's) and contract delegates, designers and developers get the chance to work at a higher level and create more advanced product value from smaller, more-reliable components that are more easily audited. ✅

Stellar's requirements API will provide product teams and developers with a bridge between planning and development, supporting iterative development as well as clear mappings between requirements, tests, and code.

When developers arrive to Cardano and find an accessible pathway to create meaningful application logic that integrates easily with their web application, Cardano will get more productive developers ✅, more useful applications ✅, more end-users ✅ and better economic health ✅.

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

When we see chain-connected serverless applications built in weeks, not months, we'll know we have succeeded. We'll also be interested to see engagement in our discord server, stars on Github, and signups for our learning program.

We'll hope for issue-reports in our Github repo - but not too many.

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

We have already provided the open-source repository and CC website. We look forward to continuing refinements to Stellar Contracts, including an additional F10 proposal to support a learning program to teach these new patterns and practices of JS/TS-based test-driven contract development.

We will also be using Stellar Contracts to develop tokenomics models, utility contracts such as vesting and revenue-sharing, and for cooperative stake-sharing.

Our aspiration is to multiply by 1000x the number of software developers who can build value-centric applications on Cardano.

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

It has been developed. It has test coverage. It has already been released on Github. It is being used for a small and growing number of projects for learning and product development.

30 years of experience in application development, 24 years of exposure to cryptography.

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

We want to make software development way easier on Cardano. For this phase, contributing this working code and documentary guidance has already made a powerful start. We're not done with that mission, but we feel we've clearly achieved this goal already.

We have used test-driven development techniques to validate the general approach, and already validated some of the key patterns for dAPI development in sample applications. We will continue validating and iterating as needed for further applications and further patterns of effective smart contracts.

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.

Milestone 0: Visioning, use-case analysis and foundational prototyping (1-2 years; done)

Thanks to Chris Prudhomme for introducing me to Cardano and engaging together over a multi-year collaboration on vision and possibilities.

No distinct outputs, no deliverables. No separate budget.

Thanks to Alex Seregin for paving the way with his vitest + Helios integration work and for giving me grace for leading him down one blind alley during the exploration before finding our way. Please show him some Catalyst love.

Milestone 1: Design and Initial implementation (~5 months; done) 95k ADA

Intensive period of development, iterative design, refactoring. Designed and implemented Test-helpers for efficient TDD. Test-drove StellarContract.ts base class (for any contract script) using CommunityCoin example. Prototyped requirements() data format. Refactored test-helper, created base class for multi-script contract constellation.

Drafted extensive guides and other website content at https://stellar-contracts.org/

Output, Deliverables: current code uploaded to Github. Website content on Github.

Given we have already achieved and delivered these goals, we will be requesting a waiver of the normal limitations on budget for the first milestone.

Milestone 2: refine and release (ongoing, ~2+ months); 16.8k ADA

Refine code and website, conduct further validations; gather and publish reference material; extend integration-test coverage with further redundancy in unit tests.

Some of this effort will be proceeding through the F10 evaluation and voting cycle; certain docs efforts may be released pending successful funding (depending on workload).

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

Milestone 0

Output: inspiration and design concept

Success Criteria: achieved.

Milestone 1

Output, Deliverable: github repo, website content

Outcome: Proof of concept for Application-level DSLs

Outcome: naming conventions and app/chain interaction-patterns

Success Criteria: delivered code and website docs on github.

Milestone 2

Output: Updated code and website with reference material

Outcome: Testnet-validated and begin using in mainnet

Deliverable: Summary report & demo video

Success Criteria: Reference documentation added to website

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

~44k ADA - Design & Analysis: ~4 months (~40% time) ~40 hard days

~33.5k ADA - Coding: ~30 hard days

~17k Content Development (website) ~15 hard days

~17k Refinements: testing, create reference docs, closeout

~15 work weeks at low-market-rate for principal developer = $USD 75k

Requested ADA: 112111

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

Design & Analysis: ~4 months (~40% time)

Coding: ~30 hard days

Content Development: ~15 hard days (website)

$75k = ~15 work weeks at low-market-rate for principal developer

Requested ADA: 112111

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

Randall, architect and principal developer

<https://www.linkedin.com/in/randall-harmon-aa52765/>

Special thanks to:

Chris Prudhomme, visioning collaborator

Alex Seregin: experiential learner, alpha tester

my mom

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

Creative innovation and committed community contribution can't be priced.

Budgeted by accounting for time spent, and with consideration to US/west-coast market rates for high-skill software developers.

Low risk, 85%+ already delivered. Asking less than market-rate for time, converted to ADA at a very favorable exchange

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