A Solana program that enables creators to earn rewards based on how much the community likes their posts. A creator is elibigle to claim rewards after getting likes beyond a certain set threshold.
Features:
- Creators can create posts with titles and content
- Community members can upvote or downvote posts
- Creators whose posts reach 10+ upvotes can claim SPL token rewards from a fund
- Users can directly tip creators with SPL tokens (creators must have at least 1 post)
- Prevents double voting and duplicate reward claims
This program incentivizes quality content creation through community voting and token-based rewards.
Acceptance Criteria:
- Title must be provided and cannot be empty
- Title cannot exceed 100 characters
- Content must be provided and cannot be empty
- Content cannot exceed 280 characters
Acceptance Criteria:
- User can only vote once per post; after voting, votes can't be changed/recast
- Vote increases the corresponding vote counter (up_votes or down_votes)
Acceptance Criteria:
- Creator must have at least 1 post to receive tips
- Tipping user must have sufficient token balance
- Tokens are transferred from tipper's token account to creator's token account
Acceptance Criteria:
- Post exceed threshold(10 in this case).
- Only the post author can claim the reward
- Reward can only be claimed once per post; subsequent reclaims are rejected
- Tokens are transferred from fund to creator's vault
- Clone the project
git clone git@github.com:danielwangai/creator_fund.git
cd creator_fund- Install dependencies
yarn install- Build the Anchor program
make build- Run tests
make test