LIT-Protocol / LitGrants

Apply for a Lit grant and be part of the Lit ecosystem!
19 stars 2 forks source link

Open Grant: Threshold cryptographic quests SDK for autonomous accomplishment graphs and decentralized social platforms #45

Open emmajane1313 opened 1 year ago

emmajane1313 commented 1 year ago

Open Grant Proposal: Threshold cryptographic quests SDK for autonomous accomplishment graphs and decentralized social platforms

Name of Project: Labyrinth SDK Suite

Proposal Category: (grants:devtools-libraries)

Proposer: emmajane1313

Do you agree to open source all work you do on behalf of this grant and dual-license under MIT, APACHE2, or GPL licenses?: Yes

Project Description

Labyrinth provides a technical and conceptual framework for creative devs to build user owned social platforms through extending Lit’s core features –– making use of event listening, conditional signing, autonomous functions, personal records encryption, token gating, and PKPs in particular –– to translate threshold cryptography into conditions based quests and social graphs, and enhance the quest accomplishment data to web3 grant coordination pipeline in the process.

Threshold cryptography is generally understood as a programmatic way to protect and permit access to secret information by dividing it into smaller parts, and distributing those to a set of trigger conditions. The protected value is unlocked or activated when a valid number of these parts are gathered, crossing the programmed threshold. These conditions can be autonomous functions, real people holding private keys, NPC entities, or many variations on the same basic theme.

We see an unrealized relationship between the dev experience of building systems with threshold cryptography through Lit, and the behavioral experience of users gathering accomplishments through condition triggered quests.

Labyrinth is an SDK for creative devs to build the kind of autonomous social platforms which were previously not possible without threshold cryptographic quests, which will now be enabled by Lit.

Problem

The Internet Without Humans Recent sudden seeming advances in AI have raised fears of displacement triggered by unresolved questions about content authenticity, ownership, valuation, and access. With LLMs and diffusion models able to make good enough essays, audio, and video, today, and quickly improving to being indistinguishable from content made by humans tomorrow, there's a growing need for conditional cryptographic signing and novel approaches to social coordination, in every imaginable social, economic, and technical context.

Unsigned content, however, is far from the only problem.

Proprietary Platform Dependencies Every decision we make starts with a message, or an image. Yet, the social platforms we send and receive content through are concentrating power into the hands of an ever smaller set of centralized operators. Meanwhile, without parallel advancements in open access, consumer choice, and creator monetization, generative content threatens to saturate the unsigned internet with homogenous copy-pasta because of a hardware bottleneck. When a small set of participants dominate access to a market, everything starts to look, sound, and behave the same.

Model Training and Use A few of the most powerful models available today may be open source, but supply of GPUs needed to run them remains far less available than demand. The race to hoard silicon, along with uncertain licensing on commercial use cases, seems to reinforce the accelerating market dominance and rewards claimed by proprietary models from the most monopolistic players, leaving developers and businesses building on web2 APIs with no guarantee access will not be cut off or throttled, that models will not be nerfed for unknowable strategic reasons, and critical functions will continue to operate as expected, or even continue to exist when you need them.

Grant Availability and Coordination As a small solution for some, training of open source models like Stable Diffusion was made possible through heavy use of generous compute grants. But there is a problem there too, as data useful for coordination between dev, creative, and open model training grant seekers and platform operators continues to fall far behind demand, as it suffers from the combined vulnerability to hallucinative content saturation and Sybil attacks.

How do we find our way through this labyrinth of challenges?

Solution

Lit based threshold cryptographic quests are uniquely suited to solve challenges to autonomy in social platform development. We propose an accomplishment graph SDK and smart contract factory that will enable devs to build event listening, conditionally signed, private in public by default, and threshold gated applications and strategies for greater token holder autonomy ––– providing an integrated p2p grant framework for open source LLM model training and compute resources in the process.

Users of applications and strategies built with the Labyrinth SDK will own and sign their history of quest accomplishments and content interactions, receive PKPs as conditional triggers for further token gated awards, provide meaningful data through Lit Actions to local and cloud compute operators for more autonomous grant evaluation, and mitigate risks of being replaced by proprietary LLM or diffusion model machines.

Value

Labyrinth SDK brings practical benefits to developers, users, and the broader web3 creative community by way of user-owned social platforms and autonomous accomplishment graphs. By extending Lit's core features and expanding practical understanding of threshold cryptography, it allows for more authentic and useful interactions in decentralized spaces.

User Engagement and Monetization Opportunities Labyrinth helps developers create conditions-based quests and social graphs that enhance user engagement and provide novel monetization opportunities for creators. By offering threshold gated collections of PKPs, audio, video, print, and apparel NFTs, and decentralized social media publications, users of applications built with Lit and Labyrinth can access new revenue streams and gain greater autonomy through generative content and its unlocked value.

This will also result in a heightened sense of ownership in decentralized applications. By incorporating relevant challenges and rewards, users are encouraged to explore, learn, and interact with autonomous platforms and each other, creating a more vibrant and connected web3 community, in a disintermediated “third space” style.

Underwriting Human Friendly AI and Mitigating Platform Dependency As we grapple with threats caused by centralization and spreading to AI-generated content, Labyrinth equips devs with tools needed to build private in public, user-owned social platforms. Using Lit-based threshold cryptographic quests, users can authenticate content, validate accomplishments, and build trust in a decentralized way, regaining independence from reliance on centralized platforms and reducing fears about LLM-generated content.

Effective Grant Coordination and Resource Availability We offer a p2p grant framework for open-source LLM model training and compute resources, promoting more effective, informed, and reliable allocation of grants and resources. By using Lit Actions and PKPs, devs and grant seekers can share meaningful data with resource operators, improving resource distribution and enhancing grant coordination within web3 ecosystems.

Lit Adoption and Growth The successful development of Labyrinth can lead to increased demand for Lit and PKPs within the ecosystem. As users participate in threshold cryptographic quests, they will require PKPs for authentication, access control, and reward distribution. This increase in demand will not only drive the adoption of Lit Protocol but also contribute to its overall value and growth.

Deliverables

The final deliverable for this project includes two SDKs— the Event Listener SDK and the Labyrinth SDK. Full documentation for both SDKs will also accompany final delivery, as well as a PoC demo.

Event Listener SDK: The Event Listener SDK enables developers with an easy interface to integrate the Lit event listener into their dApp, subscribe to on-chain actions and automate the responses through triggered callback functions and the use of PKPs.

Key Modules:

*At later stages functionality would also be added to this SDK for supporting periodic time intervals and web hooks.

Labyrinth SDK: The Labyrinth SDK is an extension of the Event Listener SDK that is tailored to the creation, logging and awarding of on-chain quests, offering a comprehensive toolset for building blockchain-based quests. The Labyrinth Contract Factory allows developers to deploy custom smart contracts for their quests, while also managing rewards and sub-milestones within the SDK.

Key Modules:

Proof of Concept (PoC): The PoC will include a complete implementation of the Labyrinth SDK along with a first quest to showcase its functionality.

It will be integrated within Chromadin, a channel surfing drop site built on Lens Protocol, recently deployed within the DIGITALAX ecosystem. Chromadin currently supports social media interactions, 24/7 video playlists, token-gated content and a storefront for purchasing apparel and print NFTs from select creators. The storefront incorporates encryption and decryption functionality from Lit for sharing encrypted private address and fulfillment records on-chain between buyers and a local decentralized fulfillment network.

With the SDK functional in the dApp, users can participate in the deployed quest. Here, completion of sub-milestones are triggered by combinations of their decentralized social media interactions on Lens Protocol (likes, comments, mirrors, collects) and financial transactions through the apparel and print NFT storefront. The quest logic in this case will give weighted focus to the adjacent activity that a user’s social interactions generate and also how much value was spent along with each transaction (collects + storefront purchases). The sub-milestones achieved through these interactions will unlock user access to token-gated drops, posts, and encrypted content within the dApp.

The PoC will also include a dashboard display for pulling in user quest progress, history and data from the Quest Completion Log Module.

Development Roadmap

Milestone One ($3,000):

Milestone Two ($3,000):

Milestone Three ($3,000):

Milestone Four ($1,000):

Total Budget Requested

Milestone Time Budget
Milestone 1 Event Listener SDK 2 weeks $3,000
Milestone 2 Labyrinth SDK + Smart Contract Suite 2 weeks $3,000
Milestone 3 PoC Integration 10 days $3,000
Milestone 4 Launch + Documentation 6 days $1,000
Total   $10,000

Maintenance and Upgrade Plans

Labyrinth’s success as a project relies on continuous improvement and adaptability in evolving hypertech environments and uncertain markets. As part of our long-term strategy, we will prioritize maintaining and upgrading the SDK by incorporating it into our daily operations. This allows us to stay ahead of market downturns or systemic risks, and make necessary adjustments. We will extend APIs and implement new features in future development, such as open source LLM chat NPCs as novel interfaces for quest completion.

As the Labyrinth ecosystem expands and attracts more users, we anticipate the need for ongoing development and support. To accommodate this growth, we will dedicate a portion of our resources to refining existing features, introducing new ones, and bolstering our development team when required. By doing so, we ensure Labyrinth remains relevant and valuable to the community it serves.

Moreover, initial development and community onboarding will build a solid base for users interested in applying threshold cryptographic quests to more of the net, particularly within the web3 grants ecosystem, as a sustainable source of funding for public goods. As that base expands, we will focus on growing the NFT, print, and apparel sales, which will generate additional revenue streams to support future development. This revenue will enable us to further refine Labyrinth tools, attract more users, and contribute to the widespread use of Lit Protocol.

Team

Team Members

Emma-Jane MacKinnon-Lee

Team Member LinkedIn Profiles

https://www.linkedin.com/in/emmajanemackinnonlee/

Team Website

https://digitalax.xyz/ https://chromadin.xyz/ https://f3manifesto.xyz/

Relevant Experience

Team code repositories

https://github.com/emmajane1313 https://github.com/DIGITALAX

Additional Information

How did you learn about the Lit Open Grants Program? We found the Lit Open Grants Program by taking a deeper look at Lit in the last 5 months, while developing decentralized social media apps with Lens Protocol. Beyond private records in public contexts and token gated access, PKPs, Lit Actions, and reading through desired use cases in the Docs and on the Blog inspired too many solutions to immediate challenges to pass up.

Email: emma.jane@digitalax.xyz

debbly commented 1 year ago

hey @emmajane1313 appreciate the grant application, in order to make is easier for us to review your proposed architecture can you include some diagrams of what the flow might be for the event listener SDK and the Labyrinth SDK?

Some additional questions: Which environment would the SDK support - browser or nodejs? For the case of instantiating multiple event listeners, what would the flow be? For the event listener SDK, will it solely support on-chain event listening or additional features such as webhooks, intervals, etc...?

emmajane1313 commented 1 year ago

hey @debbly :) here are the two requested diagrams. Also working on a more user facing explainer video.

Thanks for the questions.

The SDK would support both browser and nodejs.

I included a simple case in the sample interface for instantiating multiple event listeners and adding them to the conditions array. The setConditionalLogic() method in the diagram allows devs to specify more advanced logic, such as thresholds or combinatorial condition logic for intended actions to be executed. Would also be great to discuss and prioritize additional logic or related features you see as particularly beneficial for the wider Lit community.

It would also support webhooks and intervals. In the initial application above I mentioned that compatibility for these additional features would be built in a later stage, after the first 3 milestones. However, if you think that it would be more beneficial for the Lit community for this to take earlier priority, I can extend /rearrange the proposed time on the first milestone so that the final Event Listener SDK produced includes all of these 3 features (on-chain, webhooks, intervals) out of the box. Originally, the SDKs will be built with compatibility for JS/TS, additionally, a Rust compatible branch will be a high priority as it is necessary for upcoming projects of our own we are intending to build and is clearly where demand from the broader web3 dev community is heading.

diagram_labrinyth diagram_event_listener

debbly commented 1 year ago

Hey @emmajane1313, we'd like to see the event listener supported for the following asap: on-chain, webhooks, intervals.

We currently have a platform and front end that we'd like to build out.

https://github.com/LIT-Protocol/lit-apps https://event-listener.litgateway.com/

If you're interested, I'd like to prioritize a grant to support these possibilities with the event listener first!

emmajane1313 commented 1 year ago

That sounds great! What's the best way to move forward? telegram?

emmajane1313 commented 1 year ago

Hey @debbly, following up from our call, here is the update breakdown and milestones for the grant:

  1. Upfront payment - $1.5K USDC
  2. Milestone 1: Event Listener SDK - $3K USDC
  3. Milestone 2: No Code Event Listener Interface - $2K USDC
  4. Milestone 3: Documentation + Testing - $1K

Looking forward to moving ahead :)

debbly commented 1 year ago

Awesome, we're accepting this grant and our team will reach out via email shortly with next steps!