Table of Contents
Fetching ...

Non-Fungible Programs: Private Full-Stack Applications for Web3

Blake Regalia, Benjamin Adams

TL;DR

The paper addresses privacy and hostless frontend challenges in Web3 by introducing Non-Fungible Programs (NFPs), which pair a self-contained SVG frontend with private on-chain data and confidential contract logic. It presents an on-chain package manager and Secret NFT ownership as the backbone for immutable, accessible frontends and private, verifiable backends. A two-player Bayesian game implemented as an NFP demonstrates end-to-end feasibility, from minting to on-chain game state maintained privately and interacted via a bootloaded frontend, on a $10\times10$ grid. The work discusses engineering tradeoffs, decentralization considerations, storage costs, and future directions such as sandboxing and broader developer tooling.

Abstract

The greatest advantage that Web3 applications offer over Web 2.0 is the evolution of the data access layer. Opaque, centralized services that compelled trust from users are replaced by trustless, decentralized systems of smart contracts. However, the public nature of blockchain-based databases, on which smart contracts transact, has typically presented a challenge for applications that depend on data privacy or that rely on participants having incomplete information. This has changed with the introduction of confidential smart contract networks that encrypt the memory state of active contracts as well as their databases stored on-chain. With confidentiality, contracts can more readily implement novel interaction mechanisms that were previously infeasible. Meanwhile, in both Web 2.0 and Web3 applications the user interface continues to play a crucial role in translating user intent into actionable requests. In many cases, developers have shifted intelligence and autonomy into the client-side, leveraging Web technologies for compute, graphics, and networking. Web3's reliance on such frontends has revealed a pain point though, namely that decentralized applications are not accessible to end users without a persistent host serving the application. Here we introduce the Non-Fungible Program (NFP) model for developing self-contained frontend applications that are distributed via blockchain, powered by Web technology, and backed by private databases persisted in encrypted smart contracts. Access to frontend code, as well as backend services, is controlled and guaranteed by smart contracts according to the NFT ownership model, eliminating the need for a separate host. By extension, NFP applications bring interactivity to token owners and enable new functionalities, such as authorization mechanisms for oracles, supplementary Web services, and overlay networks in a secure manner. In addition...

Non-Fungible Programs: Private Full-Stack Applications for Web3

TL;DR

The paper addresses privacy and hostless frontend challenges in Web3 by introducing Non-Fungible Programs (NFPs), which pair a self-contained SVG frontend with private on-chain data and confidential contract logic. It presents an on-chain package manager and Secret NFT ownership as the backbone for immutable, accessible frontends and private, verifiable backends. A two-player Bayesian game implemented as an NFP demonstrates end-to-end feasibility, from minting to on-chain game state maintained privately and interacted via a bootloaded frontend, on a grid. The work discusses engineering tradeoffs, decentralization considerations, storage costs, and future directions such as sandboxing and broader developer tooling.

Abstract

The greatest advantage that Web3 applications offer over Web 2.0 is the evolution of the data access layer. Opaque, centralized services that compelled trust from users are replaced by trustless, decentralized systems of smart contracts. However, the public nature of blockchain-based databases, on which smart contracts transact, has typically presented a challenge for applications that depend on data privacy or that rely on participants having incomplete information. This has changed with the introduction of confidential smart contract networks that encrypt the memory state of active contracts as well as their databases stored on-chain. With confidentiality, contracts can more readily implement novel interaction mechanisms that were previously infeasible. Meanwhile, in both Web 2.0 and Web3 applications the user interface continues to play a crucial role in translating user intent into actionable requests. In many cases, developers have shifted intelligence and autonomy into the client-side, leveraging Web technologies for compute, graphics, and networking. Web3's reliance on such frontends has revealed a pain point though, namely that decentralized applications are not accessible to end users without a persistent host serving the application. Here we introduce the Non-Fungible Program (NFP) model for developing self-contained frontend applications that are distributed via blockchain, powered by Web technology, and backed by private databases persisted in encrypted smart contracts. Access to frontend code, as well as backend services, is controlled and guaranteed by smart contracts according to the NFT ownership model, eliminating the need for a separate host. By extension, NFP applications bring interactivity to token owners and enable new functionalities, such as authorization mechanisms for oracles, supplementary Web services, and overlay networks in a secure manner. In addition...
Paper Structure (23 sections, 3 figures, 1 table)

This paper contains 23 sections, 3 figures, 1 table.

Figures (3)

  • Figure 1: Schematic diagram of a sample NFP game deployment and its execution, which shows the interactions between the developer, the on-chain smart contract, and the user.
  • Figure 2: Screenshot of the active preview of the evaluation game NFP. This view is shown when the SVG file is loaded directly from the file system. The ship is animated to float over the desert floor, and the action bar at the top provides the user the ability to connect to the chain and run the game package stored on-chain in the NFP smart contract.
  • Figure 4: Screenshot of the board setup page for a new game where the player configures the placements of vehicles.