funded
Anastasia Labs - Smart Beacons, Router NFTs
Current Project Status
In Progress
Amount
Received
₳125,000
Amount
Requested
₳150,000
Percentage
Received
83.33%
Solution

Through the use of Smart Beacons & router scripts users will be able to interact with DApps without going through centralized front-ends or building the smart contract transactions themselves.

Problem

Interacting with a DApp on Cardano requires going through the project’s front-end to submit your transactions or writing custom code (or using CLI) to build and submit the relevant transactions.

Feasibility
Value for money
Impact / Alignment

Team

3 members

Anastasia Labs - Smart Beacons, Router NFTs

Please describe your proposed solution.

Smart Beacons is a framework for routing transactions. It is essentially AdaHandles for Smart Contract addresses.

For example consider the following transaction:

namisubmit-08e1b8.png

A user, Bob, is sending 15 ADA to the Smart Beacon @ada-to-min. The wallet resolves the address of @ada-to-min (which is the address of the router smart contract) and builds the transaction sending a UTxO with 15 ADA to the router smart contract including Bob's address in the UTxO's datum. The UTxO that is locked at the router smart contract is then spent by a routing agent (anyone can be a routing agent) to a DEX as a swap request. The router script enforces that the datum of the swap request correctly specifies that the beneficiary of the swap is the correct party (in this case Bob). Once the swap request is submitted by the DEX's batchers, the user will receive the some number of MIN tokens (depends on the current balance of the pool). There is a 1 ADA fee awarded to the routing agent, so the amount of MIN token the sender would receive is equivalent to the amount they would get if they swapped 14 ADA directly on the DEX UI.

It doesn’t need to be a swap, this can be done for any arbitrary smart contract interaction

For instance sending funds to @offer-spacebudz (which resolves to a router smart contract for SpaceBudz collection offers) could create a collection offer for SpaceBudz on some NFT marketplace. Each smart handle requires a custom routing smart contract. As a proof of concept, we have only implemented the routing script for @ada-to-min that was described above.

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

Right now, most interaction with smart contract protocols is done through centralized front-end services where the transactions are built and submitted through centralized backend infrastructure. In addition to the negative impact this has on decentralization, it is also really hampers adoption through the restrictions it imposes. For instance, users with mobile wallets have severely limited options when it comes to interacting with DApps. Also, regular users will be unable to interact with most DApps if the DApp front-end were to become unavailable for any reason or if the backend was down.

There are a few attempts to address this problem, such as DApp Schemas or Smart Contract Blueprints; however, all of these solutions rely on offchain infrastructure to specify how to interpret a DApp's datums, redeemers, and other onchain data in order to build transactions. Smart Beacons differs from these other approaches in that it is a fully onchain solution that does not rely on offchain infrastructure.

A Smart Beacon is an NFT that lives at a UTxO locked in a spending validator; the datum of the UTxO specifies how to interact with the spending validator that locks it. The datum is in essence an onchain Schema describing how to interact with the associated DApp (or at-least with the spending validator that locks the associated UTxO).

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

The most important metric for measuring the success of this framework is the feedback of developers who use it, and the wallets that adopt it. We will also track the number of wallets that integrate with this standard. Finally, the number of stars, forks and closed issues on the Github repo is a great naïve indicator for the success of this project. The entire process of development is easily trackable by viewing the Github commits and issues.

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

The resulting code and framework will be entirely open-sourced. A large amount of effort will go towards helping wallets integrate with Smart Beacons, including creating PRs to assist with integration on behalf of open-source wallets.

The router script framework will be shared with developers throughout the ecosystem including:

  • Emurgo Academy Lectures
  • IOHK Developer Experience Working Group
  • Developer Twitter Spaces

We will attempt to add the documentation to use and integrate with this framework to all the open-source documentation sources in the ecosystem (cardano developer portal, plutonomicon, working group discord)

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

I am the current main smart contract developer for two projects- LendFi V2 & Yamfore. Both have reached test-net stage, and showcase my abilities writing smart contracts. I am familiar with the Aiken smart contract language and have been writing in Plutus for almost 2 years (since PPP3). I also utilised lucid & Haskell throughout my work.

Anastasia Labs has rapidly established itself as a leading development firm within the Cardano Ecosystem. Our team consists of highly skilled developers who have made significant contributions to various community projects, including Lucid, Agora, Liqwid-Plutarch-Extra, and Aada Finance. Furthermore our developers have had experience developing and publishing end-to-end DApps including production projects such as WingRiders.

In addition to our project involvement, our team has been actively engaged in the developer experience domain. We have actively participated in educational panels focused on DApp Security Practices and Design Patterns, and our members have served as co-chairs of the IOHK developer experience working group.

Furthermore, our collaboration with Emurgo Academy has been instrumental in educating aspiring developers, with our team playing an essential role in this endeavor. We have also recognized and recruited the most exceptional talents from the academy's classes.

We have developed software development kits (SDKs) that facilitate the integration of existing dApps with other systems through off-chain code. Our team has also designed various protocols, including bridges and staking systems, while also actively contributing to open-source smart contract languages and their associated standard libraries.

Overall, Anastasia Labs has established itself as a highly capable and versatile development firm with a broad range of expertise within the Cardano Ecosystem.

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

Goals:

  • provide educational material in the form of a robust routing script and associated schema.
  • improve developer experience
  • encourage decentralization by allowing regular users to interact with DApps without needing to go through some centralized Plutus application backend.
  • get wallets to integrate with this standard.

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.

Budget is given as % of total:

  1. Prototype complete (available before voting) - 20%
  2. Polishing, working offchain (2 months) - 40%
  3. Decentralized routing agents (1 month) - 20%
  4. Documentation and wallet integration - 20%

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

Each milestone will be either additions to an existing GitHub repository, or new ones. Each milestone will include small example scripts which show they work in the described way.

Public benefits (dApps utilising this) shouldn't be expected within the milestones, as it can take some time for teams to start using a new tool. Completion of the described project itself, is the only milestone.

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

No third party products or services are needed.

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

Compiler & Programming Language Research

Philip DiSarro

Philip is a Computer Science Graduate School Student specializing in Compiler Development & Programming Language Theory. He was one of the first developers to formally verify smart contracts in Cardano using Agda. Philip was the lead architect of many features (both live and upcoming) on WingRiders DEX. Philip has also made significant contributions to the Cardano developer ecosystem. As a co-chair of the IOHK developer experience working group he worked to identify and resolve pain points that DApp developers experience in Cardano, and had an integral role in getting Lucid & Plutus Simple Model included in the Plutus Pioneer Program. He is a blockchain consultant & educational lecturer for Emurgo. Many know him as the primary instructor for the Cardano Solutions Architect course.

Philip is currently the lead smart contract developer at Ikigai Technologies, a consultant and lecturer for Emurgo and a founder of Anastasia Labs.

His previous experience includes:

WingRiders - Lead Smart Contract Developer

Agora - open source contributor

Plutarch-Liqwid-Extra - open-source contributor

Plaid - FinTech Software Engineer

Philip developed the initial MVP for Smart Beacons, the @ada-to-min swap routing script which allows users to initiate a swap on Minswap directly from any compatible wallet by sending ADA to the Smart Beacon "@ada-to-min"

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

I'm estimating this to take more hours than I would be getting paid for at my contract rate, so that is value for money in my point of view. This will very quickly enable large ecosystem projects, who haven't been able to allocate resources in this direction.

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