Skip to content

Commit e681367

Browse files
Create Lollipop.md
1 parent ad609ab commit e681367

File tree

1 file changed

+215
-0
lines changed

1 file changed

+215
-0
lines changed

applications/Lollipop.md

+215
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
# Lollipop: sBPF Runtime as a Service on PolkaVM
2+
3+
- **Team Name:** Lollipop Builders
4+
- **Payment Details:**
5+
- **DOT**: 13W1E9hU8oKgVL1uaAGYTFLY9G1q2YJTjrVN5YEhUoXM4QHT
6+
- **[Level](https://grants.web3.foundation/docs/Introduction/levels):** 3
7+
8+
9+
# Project Overview :page_facing_up:
10+
11+
### Overview
12+
13+
**Tag line:** **Lollipop** - modular framework for Solana and SVM, based on Polkadot JAM and PolkaVM.
14+
15+
**Brief description:** Lollipop is a provider of modular solutions for Network Extensions/Solana L2/Rollup with diverse execution environments that can broadly be categorized as middlewares and instances. As opposed to Layer 2 solutions, Network Extensions does not result in liquidity or user fragmentation. Lollipop is an extension of Solana's monolithic infrastructure. NES environments can include TEEs, co-processors, zk-encryption, FHE, trusted solver networks, AI agents and more, even in non-blockchain contexts. Lollipop Instances and Middlewares do not rely on cross-chain technologies for integration with Solana. Instead, they interconnect via Solana itself, utilizing program delegation, preserving direct connectivity without bridges.
16+
17+
**Integration into Polkadot:** Polkadot JAM in emulating SVM execution with PolkaVM, which is RISK-V level virtual-machine, so users may use SVM programs with Polkadot’s JAM, just like Mac users can run windows app with emulators like Parallels Desktop. With this being successful, the Execution Environment (VM) Fragmentation will be gone completely.
18+
sBPF Runtime as a Service in PolkaVM - is a middleware that will enable running SVM-related environments, taking full advantage of PVM and increasing Polkadot utilisation through synergies with the Solana and SVM-based ecosystems.
19+
20+
**Motivation:** The Lollipop team is made up of members who are deeply immersed in Polkadot, Solana, and other ecosystems. Being inspired by the opportunities presented by the Polkadot JAM along with understanding the functional bottlenecks for Solana led us to the vision for Lollipop. We came to the conclusion that a modular framework based on Polkadot technologies with the widest customization possibilities is ideal for both the Solana ecosystem and for running individual spaces (runtimes) based on PVM combined with sBPF.
21+
22+
23+
### Project Details
24+
25+
**Overview of the Technology Stack**
26+
- **PolkaVM** – The execution environment for running sBPF programs.
27+
- **sBPF Runtime** – Embedded sBPF interpreter to support Solana smart contracts.
28+
- **Rust** – Primary development language for modifying the sBPF interpreter and integrating it with PolkaVM.
29+
- **jam-pvm-common** – Provides common utilities for interaction with PolkaVM.
30+
- **Solana Program Library (SPL) Support** – To enable compatibility with existing Solana contracts.
31+
32+
**PoC/MVP or Other Relevant Prior Work**
33+
- **Concept Validation:** Discussions with Dr. Gavin Wood on feasibility.
34+
- **Technical Research:** Published article ["sBPF Program Execution on PVM - HackMD"](https://hackmd.io/@clearloop/rk6JhtdK1g).
35+
- **On-going Work:** Adaptation of 'anza-xyz/sbpf' for no_std execution.
36+
- **Initial Feasibility Testing:** Binary profiling and testing of execution overhead.
37+
38+
**Data Models / API Specifications of the Core Functionality**
39+
40+
The sBPF Runtime Feasibility & Prototype Development in PolkaVM aims to evaluate whether sBPF programs can be executed inside PolkaVM with modified sBPF runtime, with a minimal prototype that includes basic contract execution and result storage, the API specifications focus on:
41+
1. Submitting an sBPF program for execution in PolkaVM
42+
2. Retrieving and storing execution results
43+
3. Validating the feasibility of state management
44+
45+
**Execution API (Minimal Prototype Scope)**
46+
- Purpose: Allows an off-chain service to submit a precompiled sBPF program for execution inside PolkaVM.
47+
- Input:
48+
- 'program_id': Unique identifier of the sBPF contract
49+
- 'execution_params': Parameters for the execution (e.g., function input, gas limit)
50+
- Output:
51+
- Execution logs (`stdout`, `errors`, `syscall output`)
52+
- State difference (`{storage_addr: old → new}`)
53+
54+
**State Diff & Result Storage API**
55+
- Purpose: Stores execution results outside of PolkaVM for later verification.
56+
- Input:
57+
- `execution_id`: Unique execution session ID
58+
- `state_diff`: Key-value pairs of changed state values
59+
- `logs`: Execution logs for debugging
60+
- Output:
61+
- Confirmation of successful storage
62+
63+
> **Please Note:**
64+
> - The state difference is stored in an external DB rather than committed to blockchain storage.
65+
> - This ensures minimal modifications to PolkaVM while still capturing execution feasibility.
66+
67+
**Documentation of Core Components, Protocols, Architecture:**
68+
The architecture for this feasibility study and prototype development is designed to:
69+
- Execute a basic sBPF contract (counter program) inside PolkaVM
70+
- Store the execution results externally
71+
- Validate whether execution is feasible within PolkaVM’s constraints (4MB limit, memory access, syscalls, etc.)
72+
73+
We have justified the need for a modular solution for Solana in detail in a number of our researches and observations:
74+
- https://hackmd.io/@clearloop/rk6JhtdK1g
75+
- https://www.lollipop.builders/Lollipop%20Network%20Extensions%20Report.pdf
76+
- https://www.lollipop.builders/research
77+
- https://medium.com/lollipop-builders/trump-and-melania-transactions-failure-investigation-b2a5c54d2021
78+
- https://medium.com/lollipop-builders/how-lollipop-is-turning-solana-into-a-modular-playground-for-developers-c715262a5a1e
79+
80+
**Business-oriented activities (marketing, business planning), events or outreach:**
81+
At the moment, the test environment is in the process of being deployed. We are currently working with Mantis, RWA business, perp dexes and we are also developing a presence in the gaming sector. Lollipop also has arrangements with RWA business, RWA business which will issue tokens and be regulated by the HK authorities based on Solar power plant receivables for the next ten years. We are also in the process of discussing engagement with marketing agencies such as Market Across and Cointelegraph.
82+
The other most important domain for Lollipop is PayFi. Demand for crypto-based infrastructure and stablecoins is growing from FinTech and banking. This includes the creation of new financial primitives for payment functions with financial services based on blockchain technology and smart contracts. For PayFi, it is critically important that transaction costs remain minimal and predictable.
83+
To fully deploy PayFi infrastructure, it will be necessary to implement Lollipop modules, which will facilitate off-chain processing with predictable costs combined with all the benefits of JAM and PolkaVM. Additionally, NE can assist in ensuring compliance and regulatory adherence for payment applications across different regions by utilising the Solana Permissioned Environment with JAM.
84+
85+
86+
### Ecosystem Fit
87+
88+
**Where and how does your project fit into the ecosystem?**
89+
The sBPF Runtime as a Service in PolkaVM will bring value to Polkadot by connecting to the huge ecosystem and user base of SVM-based spaces (including Solana and other ecosystems like Eclipse, Termina and so on). PVM capabilities will enhance SVM frameworks by introducing additional functionality. This implies many different network effects and utilisation by shifting both user and economic load to the Polkadot tech stack, with the introduction of fundamentally new economic models targeting enterprise customers, institutional players, users, and infrastructure providers.
90+
91+
**Who is your target audience (parachain/dapp/wallet/UI developers, designers, your own user base, some dapp's userbase, yourself)?**
92+
In the context of "sBPF Runtime as a Service in PolkaVM", the proposed solution targets the user and developer base of Solana, Polkadot, and SVM-based L1/L2 ecosystems. The Runtimes/Environments are designed for different use cases:
93+
- **Solana-related dApps and Protocols:** Off-chain process handling will enable the creation of highly customizable execution environments tailored to various requirements and tasks, with direct connectivity to Solana.
94+
- **Isolated customizable execution environments:** Designed for diverse applications such as Perp DEXes, Gaming, Oracles, enterprise, and government solutions.
95+
- **Developers:** Our solution expands development opportunities by seamlessly bridging different developer cohorts through the introduction of new tools and primitives.
96+
- **Users:** the customizability of runtimes will open up new capabilities not available to institutional and enterprise customers in Solana and SVM forks
97+
- **Polkadot ecosystem participants:** validators, delegators, developers.
98+
99+
**Are there any other projects similar to yours in the Substrate / Polkadot / Kusama ecosystem?**
100+
Previously, the Polkadot community considered proposals for deploying SVM on Parachains **[(link)](https://forum.polkadot.network/t/solana-parachain/7055)**. However, this approach involved significant trade-offs due to the architecture of Polkadot 1.0 and required a compatibility layer for the Substrate node to function as a Solana node. The constraints related to performance limitations and the need to develop an ecosystem around a Solana fork within a Parachain—without providing tangible benefits to either the Solana or Polkadot ecosystems—rendered this idea impractical.
101+
In the case of Lollipop, JAM is used as the primary execution layer. Moreover, it is an application-specific implementation rather than merely a fork of Solana, as in the approach described above.
102+
103+
**Are there any projects similar to yours in related ecosystems?**
104+
The approach presented by Lollipop using PolkaVM, as far as we know at the moment, has no alternatives also in other ecosystems and is unique. Restaking platforms can be considered somewhat conceptually related, as they enable the deployment of Actively Validated Services (AVS) within specific environments. Some Solana/SVM-related projects refer to themselves as Network Extensions, but in most cases, they are standard rollups (e.g., Soon SVM as an optimistic rollup, Termina as RaaS) or sidechains (e.g., Neon EVM) without seamless integration into the Solana.
105+
106+
107+
## Team :busts_in_silhouette:
108+
109+
### Team members
110+
111+
- Name of team leader: Qinwen Wang
112+
- Names of team members: Kyle Gu, Tianyi , Stepan Soin, Wu, James Wade
113+
114+
### Contact
115+
116+
- **Contact Name:** Qinwen Wang
117+
- **Contact Email:** [email protected]
118+
- **Website:** https://www.lollipop.builders/
119+
120+
### Legal Structure
121+
122+
- **Registered Address:** Chambers, Road Town, Tortola VG1110, British Virgin Islands
123+
- **Registered Legal Entity:** Lollipop Builder Ltd.
124+
125+
### Team's experience
126+
127+
The Lollipop team consists of experienced cryptographers, developers and crypto builders and is focused on building Network Extensions for Solana using Polkadot technologies.
128+
- **Qinwen Wang:** CEO, Founder. 4 years in Web3 foundation; Producer of "Virtual Niche" - the World's first Crypto Art NFT Museum Exhibition; Curator and lecturer for Christie's NFT 101 HK & London; Curator and collector of Sotheby's metaverse auction; Angel investor, Forbes 30U30.
129+
- **Kyle Gu:** Founder’s office. MSC in Actuarial Science & PD in Computer Science of University of Kent; Over 8 Years of development operation experiences for crypto projects; Prev Magnet Network Project Manager; Prev Darwinia Network BD Manager.
130+
- **Tianyi:** Head of JAM Implementation. Author of Spacejam Network, Zink language contributor, prev developer and top 5 contributors of GEAR, prev developer in Chainsafe.
131+
- **Stepan Soin:** Head of Research. 4 years General manager and ecosystem researcher at Avalanche, Researcher and Coordinator at Dehales Capital, VC Investment analytics Cryptomeria Capital.
132+
- **Wu:** Lead developer. Expert in VM compilation and cross-platform compatibility, specializing in EVM, WASM, and BPF. Designs efficient toolchains for seamless smart contract execution across Ethereum, Polkadot, and Solana. Proficient in Rust, developing blockchain nodes, VM runtimes, and cross-chain protocols with a focus on security, efficiency, and high-performance computing.
133+
- **James Wade:** Developer. Expert in blockchain architecture and protocols across Bitcoin, Ethereum, Polkadot, and Solana. Specializes in cryptographic algorithms and cross-chain interoperability, designing secure and efficient multi-chain asset exchange and data transfer solutions for decentralized environments.
134+
135+
### Team Code Repos
136+
- https://github.com/HONGYI-SD
137+
- https://github.com/clearloop
138+
- https://github.com/lei-1993
139+
140+
### Team LinkedIn Profiles (if available)
141+
- https://www.linkedin.com/in/qinwenwang/
142+
- https://www.linkedin.com/in/kyle-gu/
143+
- https://www.linkedin.com/in/stsoien/
144+
145+
146+
## Development Status :open_book:
147+
148+
At this stage, development has not yet commenced. However, significant groundwork has been completed to ensure a well-structured and feasible implementation of sBPF Program Execution on PolkaVM.
149+
1. **Technical Design & Research**
150+
- We have formulated a detailed approach for executing sBPF programs in PolkaVM, which is documented in the article: **[sBPF Program Execution on PVM - HackMD](https://hackmd.io/@clearloop/rk6JhtdK1g#Specification)**.
151+
- This document outlines the key architectural decisions, execution flow, and potential challenges, particularly addressing the 4MB PolkaVM service limit.
152+
2. Discussions with Key Experts
153+
- We have engaged in multiple discussions with Dr. Gavin Wood, both via email and in face-to-face meetings, to validate our approach.
154+
- These discussions have provided valuable insights into optimizing execution, handling state validation, and ensuring efficient integration with Polkadot’s ecosystem.
155+
3. Next Steps
156+
- With the technical research phase complete, we are now prepared to begin actual development.
157+
- The next milestone will focus on compiling and testing the feasibility of embedding sBPF in PolkaVM, followed by state validation and execution optimization.
158+
159+
## Development Roadmap :nut_and_bolt:
160+
161+
### Overview
162+
163+
This roadmap outlines the phased development of the sBPF Runtime as a Service in PolkaVM, ensuring that Solana smart contracts can execute efficiently within Polkadot’s infrastructure. Given the 4MB size constraint of PVM services, the roadmap prioritizes feasibility analysis, optimization, and transaction processing integration.
164+
- **Total Estimated Duration:** 8 weeks
165+
- **Full-Time Equivalent (FTE):** 3
166+
- **Total Costs:** $60,000 USD
167+
168+
### Milestone: sBPF Runtime Feasibility & Prototype Development in PolkaVM
169+
170+
- **Estimated duration:** 8 weeks
171+
- **FTE:** 3
172+
- **Costs:** $60,000 USD
173+
174+
| Number | Deliverable | Specification |
175+
| -----: | ----------- | ------------- |
176+
| **0a.** | License | Apache 2.0 / GPLv3 / MIT / Unlicense. See the [delivery guidelines](https://grants.web3.foundation/docs/Support%20Docs/milestone-deliverables-guidelines#license) for details. |
177+
| **0b.** | Documentation | Initial architecture documentation explaining sBPF execution in PVM |
178+
| **0c.** | Testing and Testing Guide | Unit tests to measure compiled sBPF interpreter size |
179+
| 0d. | Article | Publish an article outlining feasibility analysis and prototype development |
180+
| 1. | Compile `anza-xyz/sbpf` with 'no_std' and analyze feasibility | Analyze feasibility of `no_std` adaptation and remove Solana-specific dependencies |
181+
| 2. | Memory & Execution Profiling for Minimal sBPF | Measure compiled binary size, execution time, and memory footprint for minimal sBPF programs. |
182+
| 3. | Fork `anza-xyz/sbpf` & Introduce PVM Service (`jam-pvm-common`) | Refactor sBPF interpreter to work as a PolkaVM service using `jam-pvm-common`. |
183+
| 4. | Compile & Measure sBPF Binary Size | Ensure it fits within 4MB PVM service limit. |
184+
| 5. | Minimal sBPF Execution Test in PVM | Deploy and execute a simple contract (e.g., counter) in PolkaVM to confirm functional sBPF execution. The result of execution to be stored in a separated DB. |
185+
186+
187+
## Future Plans
188+
189+
Lollipop is committed to expanding Polkadot's execution capabilities by enabling Solana sBPF program execution within PolkaVM. Our work on sBPF Runtime as a Service in PolkaVM is just the first step toward a broader cross-ecosystem compatibility strategy.
190+
191+
In the near future, we aim to:
192+
193+
**1. Scale Up Development & Deployment**
194+
- Complete the implementation and optimization of sBPF execution in PolkaVM with multiple PVM services,
195+
- Deploy this execution layer, ensuring efficient performance and seamless interaction with Solana’s state model.
196+
197+
**2. Enhance Compatibility & Performance**
198+
- Investigate additional optimizations to improve the efficiency and security of sBPF execution.
199+
200+
**3. Expand Developer Adoption**
201+
- Provide SDKs and tooling to help developers port and deploy Solana smart contracts to Polkadot.
202+
- Offer comprehensive documentation and examples to simplify integration.
203+
204+
**4. Long-Term Vision: Unified Execution Layer**
205+
- This initiative aligns with Lollipop’s broader vision of creating a unified execution layer across multiple ecosystems.
206+
- In future iterations, we plan to extend PolkaVM’s support beyond Solana’s sBPF to other high-performance execution environments, such as AI-based computation or modular rollups.
207+
208+
Our goal is to position Lollipop as a key infrastructure provider, bridging execution environments across Polkadot, Solana, and beyond.
209+
210+
211+
## Additional Information :heavy_plus_sign:
212+
213+
- Lollipop is an innovative project focused on bridgeless scaling and execution infrastructure for Solana with Polkadot JAM. Unlike traditional Layer 2 solutions, Lollipop’s Network Extensions (NEs) leverage cryptographic proofs and diff-based validation to ensure trustless execution without additional verification overhead.
214+
- Our work on sBPF Runtime as a Service in PolkaVM represents a significant advancement in multi-chain execution compatibility, allowing Solana smart contracts to run seamlessly within Polkadot without needing a bridge.
215+
- This initiative has already gained attention within the Polkadot and Solana communities,as we move forward, we look to collaborate with both the Polkadot and Solana ecosystems to ensure this technology benefits developers, validators, and users alike.

0 commit comments

Comments
 (0)