Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unlock Protocol-powered, members only Farcaster Channels #13890

Open
julien51 opened this issue May 24, 2024 · 7 comments
Open

Unlock Protocol-powered, members only Farcaster Channels #13890

julien51 opened this issue May 24, 2024 · 7 comments
Assignees
Labels
💰bounty There's a bounty on this issue!

Comments

@julien51
Copy link
Member

julien51 commented May 24, 2024

The goal here is to create an application that would integrate completely in the Farcaster ecosystem, thru both channels and frames (and maybe actions).

Let's start with user stories:

  • As a "creator" I have already set-up a farcaster channel and I want to configure it so that only my fans (members) can join. I want to choose whether I allow them to "read" or "write" messages (and maybe, later, allow them to do either based on a different membership level).
  • As a "fan", I want to join the channels of my favorite creators and read their casts (or write depending on permissions set by the creator).

@nestorbonilla

@julien51 julien51 changed the title Unlock-powered, members only Farcaster Channels Unlock Protocol-powered, members only Farcaster Channels May 24, 2024
@julien51
Copy link
Member Author

Assumptions (which can be revised later):

  • creators have already deployed their channel
  • creators will add the Unlock token-gating mechanism through the "moderation" feature
  • fans will use frames to "purchase/mint" their NFT memberships (possible to use checkout URL for debugging purposes initially)

@julien51 julien51 added the 💰bounty There's a bounty on this issue! label May 24, 2024
@nestorbonilla
Copy link
Contributor

Hi @julien51, here's a breakdown of the plan based on our chat and the research I've done:

Custom Hook Implementation:
Create custom hooks to trigger actions when a cast is submitted to a specific channel.
Hook Trigger: New cast detected on the designated channel.

Data Extraction:

  • Retrieve the FID (Farcaster ID) associated with the cast.
  • Retrieve the Ethereum address(es) associated with the FID that created the cast.
  • Query the Unlock Protocol's ERC721 contract to:
    • Determine the balance of Unlock NFTs held by the address(es).
    • Validate any additional conditions specified in the NFT contract (e.g., subscription expiration date, membership tier, referral, etc).

Validation & Action:

  • Scenario 1 (User Owns Unlock NFT):
    • Upvote the cast to show in the feed.
  • Scenario 2 (User Doesn't Own Unlock NFT):
    • Initiate a Direct Cast (DC) to the user.
    • Include a link in the DC suggesting the purchase of an Unlock NFT.

Notes:

  • Farcaster's current design doesn't allow for preventing casts. The primary focus is on moderating the feed by upvoting or downvoting content.
  • Currently, DC doesn't allow frame rendering, but this feature is coming soon, so I'll build the application with that in mind to enable a smoother purchase flow in the future.

@julien51
Copy link
Member Author

Currently, DC doesn't allow frame rendering, but this feature is coming soon, so I'll build the application with that in mind to enable a smoother purchase flow in the future.

Instead of a DM, can we just send an @reply to the user (outside of any channel) ? This way that would render as a frame...

@nestorbonilla
Copy link
Contributor

Yes, we can. To confirm, you'd like the bot to create a public cast (not on the channel) that tags the user, including a frame to do the purchase flow, instead of sending a DM. Is that right?

@julien51
Copy link
Member Author

julien51 commented Jun 5, 2024

@nestorbonilla please post updates here :)

Yes, we can. To confirm, you'd like the bot to create a public cast (not on the channel) that tags the user, including a frame to do the purchase flow, instead of sending a DM. Is that right?

That is right! In fact the frame can be "generic" (and we may let the "owner" of the channel" customize it in the future) because is the the same one that every user will user to "purchase" their membership).

@nestorbonilla
Copy link
Contributor

Great, sharing some updates:

Custom Hooks: Implementation complete for triggering actions on new casts to a specific channel.
Next Up: Scalability. I'm opting to use a hook per channel for now, while still exploring options for more dynamic multi-channel management in the future.

Validation & Action Refinements:

  • Scenario 1 (NFT Owner): Cast upvoted. 👍
  • Scenario 2 (No NFT): Public @reply to the user with a mint/purchase frame. I'll explore the DC option too.
  • Scenario 3 (Channel Owner): Initial implementation using a moderation frame triggered by @botname setup. The bot will reply with an embedded frame for chain, contract, and referral selection to gate main feed access.

@nestorbonilla
Copy link
Contributor

nestorbonilla commented Jun 15, 2024

Sharing some updates:

  • Scenarios 1 (NFT owner casting) and 3 (channel owner setup) are implemented.
  • Channel leads can now add or remove an Unlock token for their channels directly within the moderation frame.
  • Implemented frame validations to ensure only authorized users can modify channel settings.

Next Steps:

  • Develop a purchase flow frame for new memberships.
  • Develop renewal flow frame for expired memberships.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💰bounty There's a bounty on this issue!
Projects
None yet
Development

No branches or pull requests

2 participants