How Points fit in (Using the language of the WhitePaper)
A Loop requires the ability to reward participants
A Loop MUST reward its participants
Community members earn Points as their Reward.
Similar to a VotingStrategy in Snapshot, Points are calculated via a PointStrategy and are a Score.
Because Points can be calculated permissionlessly onchain (via a read function anyone can call), Points can be used by anyone building on or with a community. Some example ways points can be used:
establishing an airdrop (ERC20, or NFTs)
gating a group on Common
gating onchain actions via a hook that checks the current points of an address
updating content ranking in an offchain system that reads from the chain
A community can have many PointStrategy contracts that are used toward different ends.
The actions that communities members can take as a part of a Loop are the inputs on the PointStrategy. Examples:
if an address is staking governance tokens, a PointStrategy may reward the address by weighting the number of tokens and time the tokens are staked into the output score.
for all winners of contests (received NFT reward), their points increase by x amount.
if token holder, receive x amount of points based on number of tokens held (calculated against a curve, linear or log)
if address bought community token during launchpad phase, receive points or increase point multiplier.
User Story 1: Setting Up a Reward System for a Community
As a community manager,
I want to set up a PointsContract that rewards community members for their participation,
so that I can incentivize and acknowledge their contributions.
Acceptance Criteria
I can deploy a new PointsContract using the PointsFactory with initial point sources.
I can add multiple point sources to the PointsContract, specifying the contract address, function selector, and multiplier.
Community members can view their current points by calling the calculatePoints function.
I can remove point sources from the PointsContract when they are no longer relevant.
The PointsContract emits an event when a point source is added or removed.
User Story 2: Securely Managing PointsContract Ownership
As a PointsContract owner,
I want to securely manage the addition and removal of point sources,
so that the integrity of the reward system is maintained.
Acceptance Criteria
Only the owner of the PointsContract can add or remove point sources.
The PointsContract emits events when point sources are added or removed.
The contract prevents reentrancy attacks when adding or removing point sources.
Ownership can be transferred securely to another address if needed.
Additional Context
This is a POC bucket ticket, to dig into implementation issues that arise through iteration and development of this aspect of our Protocol.
How this fits into the UI + interacts with other parts of the system we're building is still TBD, but some potential avenues are discussed in the Doc.
Description
How Points fit in (Using the language of the WhitePaper)
A Loop requires the ability to reward participants
Community members earn Points as their Reward.
Similar to a VotingStrategy in Snapshot, Points are calculated via a PointStrategy and are a Score.
Because Points can be calculated permissionlessly onchain (via a read function anyone can call), Points can be used by anyone building on or with a community. Some example ways points can be used:
A community can have many PointStrategy contracts that are used toward different ends.
The actions that communities members can take as a part of a Loop are the inputs on the PointStrategy. Examples:
Project Owner
zakhap
PRD (LOCKED DOC for POC)
Including an overview of a potential contract architecture, for consideration: https://www.notion.so/buildcommon/Points-toward-a-Spec-97be198d11b7483f9a97b0529db8f5b5
Tasks
User Story 1: Setting Up a Reward System for a Community
As a community manager, I want to set up a PointsContract that rewards community members for their participation, so that I can incentivize and acknowledge their contributions.
Acceptance Criteria I can deploy a new PointsContract using the PointsFactory with initial point sources. I can add multiple point sources to the PointsContract, specifying the contract address, function selector, and multiplier. Community members can view their current points by calling the calculatePoints function. I can remove point sources from the PointsContract when they are no longer relevant. The PointsContract emits an event when a point source is added or removed.
User Story 2: Securely Managing PointsContract Ownership
As a PointsContract owner, I want to securely manage the addition and removal of point sources, so that the integrity of the reward system is maintained.
Acceptance Criteria Only the owner of the PointsContract can add or remove point sources. The PointsContract emits events when point sources are added or removed. The contract prevents reentrancy attacks when adding or removing point sources. Ownership can be transferred securely to another address if needed.
Additional Context
This is a POC bucket ticket, to dig into implementation issues that arise through iteration and development of this aspect of our Protocol.
How this fits into the UI + interacts with other parts of the system we're building is still TBD, but some potential avenues are discussed in the Doc.