This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Generic License.
$ npx hardhat clean
$ npx hardhat compile
$ npx hardhat test
$ npx hardhat run scripts/deploy
$ npx hardhat run scripts/server
# TODO
- run
$ npx hardhat deploy
- Copy the address value into the contract address field in the tests
- Get rid of signature lists for out-signatures
- Get rid of all signatures at the CID payload layer.
- ZK transfer of repuation to other identites through signing.
- Cut edges on graph can also represent reputation.
- 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.
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.
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.
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.
contract Repuation {
mapping (address=>string) Trusted;
function update_trust_relations(string memory CID) public {
Trusted[msg.sender] = CID;
}
}
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": {}
}
[]
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.
- How do we prevent the contract from being ddosed or sybil attacked?
- 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.
- Is a contract the best place to pin the CIDs?
- Who would append signatures to the chain associated with an identity?
- This would impact ability for signers to revoke the signatures.
- Could we allow for revocation of signatures?
- For in-nodes it's possible to keep a revocation list as well.
- 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
- Web3 Twitter
- Web3 Facebook
- Web3 Dating App
- 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.
- Sometime when attempting to compile hardhat scripts, there can be issues with node versions.
- Using the command:
$ nvm use 16
should resole issues