Coder Social home page Coder Social logo

Emergent Reputation System

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Generic License.

Build instructions

  1. $ npx hardhat clean
  2. $ npx hardhat compile
  3. $ npx hardhat test
  4. $ npx hardhat run scripts/deploy
  5. $ npx hardhat run scripts/server # TODO

Deploying new contract:

  • run $ npx hardhat deploy
  • Copy the address value into the contract address field in the tests

New Prespective

  1. Get rid of signature lists for out-signatures
  2. Get rid of all signatures at the CID payload layer.
  3. ZK transfer of repuation to other identites through signing.
  4. Cut edges on graph can also represent reputation.
  5. We will be using IPLD instead of IPFS
  • both of these we keep a list of the verfication keys (public account numbers) of individuals onchiani
  • by signing the tx of keeping this list associated with the user account-number, we reduce the complexity of web of trust
    • by leveraging the offering of the underlying chain.

Key Idea:

  • A distributed graph built on IPLD that is pinned to smart contract on-chain.

Trade off between 1 & 2 is graph traversal speed for shortest path.

Problem Statement

The lack of reputation clearly associated with entities creating content on social media platforms like Twitter creates an experience for users that requires them to excercise judgement to decide if an interaction is pure or malicious. Add to that foreign interference through coordinated efforts to produce propoganda as described here, and it clearly makes for an unusable experience for social communication and coordination. All of these problems result from a lack of a reliable reputation system.

Solution

The natural aspect of interactions between agents in the metaverse help to determine the reliability of individuals. We leverage this charecteristic as a basis to build an emergent reputation system. This system is meant to emulate traditional key signing parties, in an automated and out-of-the-way fashion for lay users.

Design Specification

Identity payload

The input payload will consist of the verfication address associated with the User we will describe as Uorginal.

After interacting with Uoriginal , an arbtirary user Uadj can sign the verfication key of Uorginal. This will produce a signature that Uorginal can append to their signature list along with their associated public key/verfication key. To incentivise Uadj to conduct due dilligence, they signing will incurr a cost onto Uadj with a possibilty of accruing rewards for the action (TODO?).

TODO(@ckartik): Keep both in-node and out-node per user signatures.

To make the resulting hash (CID) from the payload that contains the web-of-trust associated with the identity, easily accesible, we pin it to the smart-contract that will underpin this trust system.

On Chain Pinning of Data

contract Repuation {
    mapping (address=>string) Trusted;

    function update_trust_relations(string memory CID) public {
        Trusted[msg.sender] = CID;
    }
}

IPLD Data Model

We will encode nodes in CBOR and store on IPLD. The data model will be the following:

// Node with identity 0x004
{
    "trusted_accounts": ["0x001", "0x002", "0x003"...],
    "signature_with_private_key_of_trusted": ["2f23eeef"],
    "accounts_trusting_me": {
            "0x005": "bafy000000", // IPLD CID link to node.
            "0x006": "bafy000001",
            "0x007": "bafy000001"
    }
}


// Node with identity 0x007
{
    "trusted_accounts": ["0x004"],
    "signature_with_private_key_of_trusted": ["2f23efff"],
    "accounts_trusting_me": {}
}

[]

Reputation Metrics

The reputation of an actor in this space is relational to others interacting with the actor. Therefore the reputation-function will take two paramters, the requesting account number Ureq and the account number for which the reputation is being queried for Uquery. The result of this query will be the length of the shortest path between Ureq and Uquery in the graph created via the signatures.

There is a third (implicitly defaulted) paramter assocaited with a terminal max-length, much like chain length in PKI.

Questions

  1. How do we prevent the contract from being ddosed or sybil attacked?
  2. Privacy: How, if even possible, do we want to esnure the web-of-trust will remain private? This seems impossible but need to look into ZK Proofs.
  3. Is a contract the best place to pin the CIDs?
  4. Who would append signatures to the chain associated with an identity?
    • This would impact ability for signers to revoke the signatures.
  5. Could we allow for revocation of signatures?
    • For in-nodes it's possible to keep a revocation list as well.
  6. How do we leverage IPLD to create a distributed graph with cycles.
    • We keep the nodes on IPLD and edges stored on-chain.
    • Recommended to look into IPNS for this? TODO

Possible things that can be built

  1. Web3 Twitter
  2. Web3 Facebook
  3. Web3 Dating App

Cryptonomics

  • People can build their trust lists.
  • Exposing to others can compensate them? In some form of staking - however, their stake can be lost.
  • Drive monetary incentives to build a valuable web-of-trust.
  • That turst infomration has inherent worth.

Known Issues

  • Sometime when attempting to compile hardhat scripts, there can be issues with node versions.
  • Using the command: $ nvm use 16 should resole issues

Emergent Reputation Systems's Projects

core icon core

An Emergent Reputation system built off a decentralized graph interfacing through IPLD & pinned to an Ethereum contract.

docs icon docs

Mina documentation website

documentation icon documentation

This is meant to be publicly accessible store of important design decisions and research

go-ethereum icon go-ethereum

Official Go implementation of the Ethereum protocol

medical-zk-example icon medical-zk-example

Example of a ZK Proof Program for verifying proof of doctors note while not revealing doctor specialization or doctor information.

zkrecrypt icon zkrecrypt

A Zero Knowledge Based Implementation of Re-Encryption

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.