stacksgov / decentralized-grants

An experimental funding program designed by the Stacks community, for the Stacks community.
3 stars 0 forks source link

Reputation onchain SIP - Zerobtc #26

Open Hero-Gamer opened 1 month ago

xyzerobtc commented 1 month ago

Cohort 2

Discord Name:

xyzero.btc

Total grant amount:

$1,000

Project Description:

Reputation onchain is a framework designed to bring reputation management onchain for the entire decentralized ecosystem. Our Reputation onchain SIP ensures trust and transparency by recording and evaluating onchain interactions. This system empowers users to build and maintain verifiable reputations across Web3 platforms, enhancing the integrity and reliability of decentralized applications and communities.

Impact:

Definition: Percentage of decentralized applications (dApps) that integrate the Reputation Impact: Measures the penetration and acceptance of the framework within the ecosystem.

Project Timelines, Milestones, and Deliverables:

Kick-off payment: 0% - $0

Milestone 1: Phase 1: Create a SIP Standard - 70% - $700 Aug 30, 2024 Deliverables:

Milestone 2: Phase 2: Implement User Guides - 30% - $300 Sep 30, 2024 Deliverables:

Is/Will this Project be Open-Sourced?

Completely open source for anyone, anywhere in Stacks ecosystem.

ZeroAuthorityDAO Profile Link:

https://zeroauthority.xyz/profiles/SP7QQ9DV0DMV7YW4HR713MKBWADVA0BFC2J65PJT

xyzerobtc commented 1 week ago

@Hero-Gamer hello - I still have some clarity code to be reviewed by a few people. The framework is ready and need to get some test examples.

xyzerobtc commented 1 week ago

Development Summary for SIP: Standard Reputation Framework and NFT Minting for Reputation Badges

Preamble

SIP Number: XXX
Title: Standard Reputation Framework and NFT Minting for Reputation Badges
Authors: [Zero, "xyzerobtc", omelet.btc, "GH-ID", AcrossFire, “GH-ID”, HodlSTX "HodlSTX" ]
Status: Draft
Type: Standard
Created: 2024-05-01
License: MIT License

Abstract

This SIP proposes a framework for implementing a standard reputation system on apps or websites. Each reputation transaction results in the minting of a Non-Fungible Token (NFT) to provide a verifiable, immutable record of the reputation event. This proposal outlines the standard attributes for the reputation system, the structure for XML and JSON representation, and the NFT minting process.

Motivation

A standardized reputation system with blockchain integration provides several benefits:

  1. Transparency and Trust: Immutable records of reputation transactions increase transparency.
  2. Interoperability: Standardized attributes allow for consistent implementation across different platforms.
  3. Ownership: Minted NFTs represent a user’s reputation transactions, providing verifiable proof of reputation that users own.
  4. Gamification: NFTs can be used to incentivize positive behavior and engagement.

Specification

Standard Attributes

User Information

Reputation Event

NFT Information

Clarity Code Representation

(define-data-var user_id (string-ascii 50) "unique-user-id")
(define-data-var username (string-ascii 50) "username")
(define-data-var profile_url (string-ascii 100) "https://example.com/user/profile")

(define-data-var event_id (string-ascii 50) "unique-event-id")
(define-data-var event_type (string-ascii 20) "upvote")
(define-data-var event_description (string-ascii 100) "Received an upvote on a comment")
(define-data-var event_timestamp (buff 32) 0x1234567890abcdef)
(define-data-var event_value int 10)

(define-data-var nft_id (string-ascii 50) "unique-nft-id")
(define-data-var nft_url (string-ascii 100) "https://blockchain.com/nft/unique-nft-id")
(define-data-var nft_metadata (buff 1024) 0xBase64EncodedMetadata)

NFT Minting Process

  1. Event Trigger: A reputation event occurs on the platform (e.g., a user receives an upvote).
  2. Data Aggregation: The platform collects the necessary data for the reputation transaction.
  3. NFT Creation: The platform generates an NFT with the collected data as metadata.
  4. Blockchain Interaction: The platform interacts with a blockchain service to mint the NFT.
  5. Storage and Access: The minted NFT’s URL and metadata are stored in the platform’s database and linked to the user’s profile.

Rationale

This framework leverages the immutability and transparency of blockchain technology to create a verifiable and trustworthy reputation system. By standardizing the attributes and using NFTs to record reputation transactions, users gain ownership and can showcase their reputation across different platforms.

Backwards Compatibility

This proposal introduces a new system and does not affect existing implementations. Platforms adopting this standard will need to integrate the reputation framework and NFT minting process.

Implementation

Implementing this proposal requires:

  1. Database Changes: Modify the database to store the new reputation and NFT attributes.
  2. Blockchain Integration: Implement the logic to interact with a blockchain service for minting NFTs.
  3. API Development: Develop APIs to handle reputation transactions and provide data in the specified formats.
  4. Frontend Changes: Update user interfaces to display reputation and NFT information.

Security Considerations

Conclusion

This SIP provides a standardized approach to implementing a reputation system with blockchain integration. By minting NFTs for each reputation transaction, we create a transparent, verifiable, and user-owned record of reputation, enhancing trust and engagement across platforms.

15 Common Categories to Build Reputation Onchain

1. Community Engagement

2. Transaction History

3. Content Creation

4. Skill Verification

5. Project Contributions

6. Review and Feedback

7. Attendance and Participation

8. Mentorship and Coaching

9. Achievements and Awards

10. Learning and Development

11. Bug Reporting and Issue Resolution

12. Reputation and Endorsements

13. Compliance and Certifications

14. Social Impact and Volunteering

15. Peer Reviews and Ratings

Example where the Stacks Foundation gives a skill badge for "Critical Bounty" as a form of skill verification:

(define-data-var user_id (string-ascii 50) "user-stx-address")
(define-data-var skill_id (string-ascii 50) "critical-bounty-001")
(define-data-var skill_name (string-ascii 50) "Critical Bounty Completion")
(define-data-var verification_timestamp (buff 32) 0x1234567890abcdef)
(define-data-var verifier_id (string-ascii 50) "stacks-foundation")

(define-public (award-skill-badge (user_id (string-ascii 50))
                                  (skill_id (string-ascii 50))
                                  (skill_name (string-ascii 50))
                                  (verification_timestamp (buff 32))
                                  (verifier_id (string-ascii 50)))
    (begin
        ;; Mint an NFT representing the skill badge (this would involve a separate NFT contract)
        (print (tuple (user user_id)
                      (skill-id skill_id)
                      (skill-name skill_name)
                      (timestamp verification_timestamp)
                      (verifier verifier_id)))
        (ok (tuple (user user_id)
                   (skill-id skill_id)
                   (skill-name skill_name)
                   (timestamp verification_timestamp)
                   (verifier verifier_id)))
    )
)

Explanation:

The award-skill-badge function can be called to log the awarding of the skill badge. This could later be expanded to include minting an NFT that represents this skill badge on the blockchain.

Hero-Gamer commented 1 hour ago

Hi @xyzerobtc thanks for sharing the draft SIP.

Reviewing the part regarding "... request feedback from the community." how many or much feedback have you got so far and has something been changed/improved/adjusted due to the feedback?

xyzerobtc commented 1 hour ago

Hi @Hero-Gamer Waiting for feedback. Asked AcrossFire , Jude, Jason, and 3-10

Hero-Gamer commented 30 minutes ago

Hi Zero Understand this already had some feedback before draft is done such as from Hodlstx, HZ, and AcrossFire. And I see you are continuing to seek feedback (it will be ongoing refinement throughout next months / crypto years perhaps). Therefore imo Milestone 1 has been achieved.

Milestone 1: Phase 1: Create a SIP Standard - 70% - $700 Aug 30, 2024 Deliverables: Develop a comprehensive Self-Improving Protocol (SIP) standard and request feedback from the community.

Looking forward to seeing further development from this project!

@shaktistacks please kindly distribute M1 payment tysm!