Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reputation score mechanism #2

Closed
irenegia opened this issue May 17, 2022 · 19 comments
Closed

Reputation score mechanism #2

irenegia opened this issue May 17, 2022 · 19 comments

Comments

@irenegia
Copy link
Collaborator

irenegia commented May 17, 2022

We want to design a reputation score mechanism for the providers that we can use during testnet in order to

  1. incentivize early adoption of the protocol;
  2. de-risk users to lose money.

cc @lucaniz, @nicola

@irenegia irenegia self-assigned this May 17, 2022
@irenegia irenegia moved this to Inbox in retriev.org May 18, 2022
@irenegia irenegia moved this from Inbox to Backlog in retriev.org May 18, 2022
@irenegia irenegia moved this from Backlog to Breakdown in retriev.org May 19, 2022
@irenegia
Copy link
Collaborator Author

18th May: started to brainstorm some possible features with @danlessa

  1. it would be good if the score goes up over time;
  2. proportional to the deal duration: a deal valid for a months counts more (gives higher score) than a deal valid for 1 day;
  3. no dependency on the payment variable (?);

@0xjona 0xjona removed the research label May 23, 2022
@irenegia
Copy link
Collaborator Author

irenegia commented May 23, 2022

Update:
@lucaniz and I started to brainstorm some ideas today.

Idea 1

  • All providers starts from 100 points, and every time they are slashed we take 1 point;
  • Problem: unfair. If a providers accepts many deals and fails just few, it will have a total score lower than a provider accepting very few deals;
  • If we try to solve this saying that we give point to providers based on how many deals they have (and maybe the quality of the deals), then we have a new problem (self-deals): providers can do sibyls (create identities as clients) and do fake deal with themself.

Idea 2

  • Clients have a budget of points that can give to providers. For example, a deal proposal specifies that x points are given to a provider accepting the deal, if no slash happens.
  • Problem: self deals again. A provider doing a self deal does not gain points in total (client + provider total points stay the same) but can fake high reputation (high score for the providers only)

@lucaniz
Copy link
Collaborator

lucaniz commented May 23, 2022

After further brainstorm with @irenegia, a possible mitigation for Idea2 could be to allow only "old" clients (for instance, clients on FIlecoin/Etheruem for 1+ years) to distribute points to providers.

This will prevent the creation of new siblings inflating malicious providers' reputation.

Nevertheless, the "old" siblings can influence reputation mechanism.

@nicola
Copy link

nicola commented May 23, 2022

I see two strategies, maybe they are similar to what you have in mind:

  1. Go FIL+ style: there are some nodes that give out points to users and users spend these points with providers
  2. No tokens at all: a miner wants to build a track record of successful deals, no tokens involved (premium price is 0)

@irenegia
Copy link
Collaborator Author

irenegia commented May 24, 2022

Yes, strategy number 1 is the one we are discussing more.
A first attempt to build that is :

  • Each client can request a fixed budget of points if it meets some criteria that can prove the client identity is authentic. For example, the client was created at least 1 year ago;

    • To be decided here: who checks the credential? Who release the coin? Smart contract or centralised?

  • Each time a client does a proposal, there is a function that from the proposal parameters (eg, duration, payment, collateral) compute the point value of the proposal (ie, an amount of points attached with the proposal);


  • The provider that accepts this proposal and does not get slashed will get this points (which are also removed from the client budget);

    • To be decided here: we require that the provider is not slashed or that no appeal is made?!

@nicola
Copy link

nicola commented May 30, 2022

cc: @anorth @Kubuxu

@irenegia
Copy link
Collaborator Author

irenegia commented May 31, 2022

@turinglabsorg 's proposal:

  • no reputation points, leave the protocol as it is (deposit, collateral, etc) and just create an ad-hoc token ERC-20 ("wrapped FIL"). Collateral, deposit, fees and slashing will be done with this token.

    • Pros: no extra line of code in the contract, also we test the actual protocol.
    • Cons: it works an economic incentive only if we can "promise" now some future conversion in FIL

    @nicola what do you think about this?

@0xjona 0xjona mentioned this issue Jun 1, 2022
13 tasks
@irenegia
Copy link
Collaborator Author

irenegia commented Jun 1, 2022

Update:

we can merge the two proposals above in one in the following way:

  • do the ERC-20 token, launch with it (no reputation points)
  • have in the official website a ranking of providers based on how much tokens they are accumulating (this is their reputation!)

Open questions:

  1. in any case, we need a faucet. How do we prevent providers to abuse the faucet? Eg, creating identities as clients and collect tokens/points there ?

    • check credentials how? which ones? TBD
  2. reputation works as testenet incentive for providers. What about client? How do we incentivise their participation?

  3. what about referees? How do we approach/incentivize parties to become referees?

    • note: after testnet, we can say that provider with high score/reputation can become referees.

cc @lucaniz @danlessa @nicola @0xjona

@0xjona
Copy link
Collaborator

0xjona commented Jun 6, 2022

Working with ERC-20 tokens will nonetheless require us sometime (estimates @turinglabsorg ?) to work on the smartcontract, which is now coded to work with ETH!
We need to turn the open questions as a checklist to be defined by a due date

@turinglabsorg
Copy link
Collaborator

i think it will take 5-6 working days to fix everything and make tests, but we need to be 100% sure, because it requires the same time if we need to re-invent a token system..

@0xjona
Copy link
Collaborator

0xjona commented Jun 6, 2022

So it’s 5-6 working days to implement the ERC-20 (or same time to design something like a custom tailored score system).

  • What if we use ERC-20 but just as a form of payment/premium from client to provider?
    It means freezing all the other variables
  • otherwise, where does the provider gets the token from? And how much?

We can make the tokens not transferable apart from faucet —> client —> smartcontract (vaulted in deals) —> provider (that can’t do anything with them) ; so that at the end we just count the tokens and release a ranking!

@irenegia
Copy link
Collaborator Author

irenegia commented Jun 7, 2022

idea from @turinglabsorg:

  • use NFTs as reputations scores
  • collateral and payment are in the native token

Note: this requires

  • that provider's NFTs are not transferable when a deal is close
  • a formula that translates NFT is reputation score (likely, it will depend on deal duration, collateral, payment etc)

@0xjona
Copy link
Collaborator

0xjona commented Jun 7, 2022

We are defining the usage and improvements of NFT deals in #10!

Getting reputation via data retrievability protocol, means getting the same in Protocol Labs/FileCoin so we must consider a public leaderboard, where we officially track the alpha testnet results!

ERC-20 is no more a suitable solutions since we don’t envision an ICO or anything related to that, NFTs are good turnaround.

@irenegia
Copy link
Collaborator Author

Update

We agreed on:

  • we NOT going to create any ERC 20 token, payment and collateral are going to be in the native token of the blockchain used
  • the reputation score is going to be an independent mechanism (independent of the smart contract code)
  • the reputation mechanism is going to be a mechanism that looks at the events on chain, collect all the data about deals for a provider and then transform the data in a score (number in a scale)
    • @danlessa and I started to brainstorm the formula to transform deal data in a score here

@0xjona
Copy link
Collaborator

0xjona commented Jun 10, 2022

This is great!
We need to start breaking down this issue and turn the concept work into an upgrade of how we expect our website to work (if this “leaderboad/query toolkit” is going to be available there)

@0xjona 0xjona moved this from Breakdown | EPIC to Implementation in retriev.org Jun 14, 2022
@irenegia
Copy link
Collaborator Author

I forgot to update this last week, my bad.
Anyway, we discussed about the formula, notes are here https://hackmd.io/8CSLDfKNSAyyl-OfEzOdDQ#14jun22

@irenegia
Copy link
Collaborator Author

irenegia commented Jun 22, 2022

This is great!
We need to start breaking down this issue and turn the concept work into an upgrade of how we expect our website to work (if this “leaderboad/query toolkit” is going to be available there)

Yep I agrree we need more planning for this
So far I see this work tasks (this is not a complete break down, but i think it can help)

  1. [research] finalise the score formula (@irenegia and @danlessa)
  2. [research] countermeasure for self deals ?? (@irenegia and @danlessa, @lucaniz ?)
    • we brainstormed something yesterday, I 'll write notes asap
  3. [devs] design how we query the blockchain to get the data (@turinglabsorg ?)
  4. [website] design how we show the scores/leaderboard (@0xjona ?)

@turinglabsorg
Copy link
Collaborator

[devs] design how we query the blockchain to get the data (@turinglabsorg ?)

Queries are done by the API so we can cache them and fast-readable, once we agree on the mechanism i will add it on the api!

@0xjona 0xjona moved this from Implementation to Validation in retriev.org Jul 5, 2022
@0xjona
Copy link
Collaborator

0xjona commented Aug 8, 2022

work will happen in #58

@0xjona 0xjona closed this as completed Aug 8, 2022
@0xjona 0xjona moved this from Validation to Done in retriev.org Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants
@nicola @turinglabsorg @irenegia @lucaniz @0xjona and others