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

🔍 Trust Score Calculator #52

Closed
4 tasks
sirkitree opened this issue Oct 27, 2024 · 7 comments
Closed
4 tasks

🔍 Trust Score Calculator #52

sirkitree opened this issue Oct 27, 2024 · 7 comments
Assignees
Labels
Milestone

Comments

@sirkitree
Copy link
Collaborator

sirkitree commented Oct 27, 2024

🔄 Trust Score Development: Creating a trust score based on trade outcomes will be essential for building credibility within the marketplace. It will allow users to make informed decisions based on past performance.

Develop a trust score calculation system based on trade outcomes and user recommendations.

Requirements

  • Define trust score metrics
  • Implement calculation algorithm
  • Create history tracking for score changes
  • Add user recommendation integration

Acceptance Criteria

  • Trust scores are calculated accurately
  • Historical data is tracked and accessible
  • User recommendations affect trust scores
  • Score changes are properly logged
@sirkitree sirkitree changed the title Trust Score Calculator 🔍 Trust Score Calculator Oct 27, 2024
@sirkitree sirkitree added this to Eliza Oct 28, 2024
@TresFlames
Copy link
Contributor

TresFlames commented Oct 28, 2024

@sirkitree Do we have an algo or calculation methodology to base this deeper on to reference?

Or would we just create to our own ideology then review if done appropriately?

@sirkitree
Copy link
Collaborator Author

sirkitree commented Oct 28, 2024

Adapting trust scoring mechanisms for a cryptocurrency recommendation bot:

Trust Score Components

The system should evaluate trust across three key dimensions[2]:

  • Familiarity - Historical presence and recognition in the crypto market
  • Personal Interactions - Direct trading history and performance
  • Public Perception - Community feedback and market reputation

Implementation Architecture

Here's how the trust scoring system could be structured:

class CryptoRecommendationSystem:
    def __init__(self):
        self.data_sources = []
        self.trust_scores = {}
        self.recommendations = []

    def calculate_trust_scores(self):
        for source in self.data_sources:
            familiarity_score = self.evaluate_familiarity(source)
            interaction_score = self.evaluate_interactions(source) 
            public_score = self.evaluate_public_perception(source)
            
            # Weighted combination of scores
            final_score = (0.3 * familiarity_score + 
                         0.4 * interaction_score +
                         0.3 * public_score)
            
            self.trust_scores[source] = final_score

Key Scoring Metrics

Transaction Analysis[1]:

  • Volume and frequency of trades
  • Average transaction size
  • Historical volatility
  • Compliance with regulations
  • Association with known malicious actors

Risk Assessment[3]:

  • SIM swap detection
  • Account takeover patterns
  • Behavioral anomalies
  • Device reputation
  • Phone number verification

Security Measures

The system should incorporate several security features[1][3]:

  • Blacklist maintenance of known malicious actors
  • Real-time behavioral monitoring
  • Multi-factor authentication integration
  • Blockchain-based verification of transactions
  • Regular model retraining based on new data

Performance Metrics

The system's effectiveness should be measured by[2]:

  • Accuracy of trust predictions
  • Speed of score calculation (<1 second latency)
  • False positive/negative rates
  • User satisfaction metrics
  • Return on investment from recommendations

This architecture provides a robust foundation for evaluating cryptocurrency recommendations while maintaining security and trust in the ecosystem. The system can continuously learn and adapt based on new market data and user feedback.

Citations:
[1] https://scholar.smu.edu/cgi/viewcontent.cgi?article=1031&context=datasciencereview
[2] https://www.nature.com/articles/s41598-023-38078-w
[3] https://www.prove.com/blog/securing-crypto-business-using-trust-score
[4] https://pmc.ncbi.nlm.nih.gov/articles/PMC6072048/


The above is an excerpt from https://www.perplexity.ai/search/research-trust-scoring-algorit-8orA5auKT.2POOJ_jbvwFg meant to give us some ideas.

@lalalune
Copy link
Member

So we are focusing on the trust marketplace. This is basically putting orders into an orderbook, and then seeing how those orders would have done in an ideal sell or hold scenario. You can't blame someone for the bot making a stupidly timed sell if they gave you excellent alpha.

The first part is just to collect trades in the orderbook. Then we can analyze the data and come up with a weighting strategy.

The second part is calculating trust. I think that we care about a weighting of two things -- 30% how much skin they have in the game and 70% how much they've made in the virtual orderbook.

These memecoins are such that you'll pick 10 losers and still 10x your money on the 1 winner, finding the winners and maximizing likelihood of win is critical. One parabolic recommendation can give a user a lot of trust.

Users will copytrust each other, so there needs to be value in being the first to shill a ticker. We want to weight this against users just shilling every ticker first to try to game the system with a few 100xes.

For the actual execution of trade, we can run this on a loop with a randomized tick. 90% of the time, Marc should not execute a trade, but should wake up and analyze the market. When to trade, what and why are the most complicated parts, but this is more of a quality issue than a possibility issue-- quite easy to make the trade happen at all, but hard to get the right details.

The plan is just to get it there, to where its making decent consensus trades, and then we can let the quant guys go nuts on our codebase.

@glucrypto
Copy link

To build on the CryptoRecommendationSystem, you could add a network/graph aspect where trust flows between users and affects each other's scores.

Eigentrust algo does this, OpenRank has done some work w.r.t Farcaster on this. Basically, If A trusts B and B trusts C, A gains some trust in C.

Basically, algo does a random walk and tries to

  • Finds the most trustworthy users
  • Weigh direct and indirect trust
  • Resist manipulation
  • Provide globally meaningful scores

https://nlp.stanford.edu/pubs/eigentrust.pdf

@docherty
Copy link

Some thoughts;

  • can there be some kind of "% of the time the trade could make money" component? So if the token spikes and then goes below the acquisition price for eternity it's not as valuable as one that constantly lives in the green.
  • a massive multiplier for someone that suggests both an entry and exit recommendation. e.g. day0 "buy X" -> price goes up, day3 "sell X" -> price goes down. This suggests some level of intimate knowledge of the token in question.
  • a weighting for recommendations that go against common consensus. So if everyone is saying buy zig, there's an incentive to find and suggest zag.
  • the simulated trades should happen in a "gym" or (Simulated Order Book...SOB) and the person graduates to the actual order book where the trades happen. Having 2 things called order books is confusing.

@0xBiggy
Copy link

0xBiggy commented Oct 30, 2024

Not sure if this comment is more appropriate for orderbook issue but leaving here for now...

During the paper trading phase could it make sense to do something like betting with a virtual balance of ai16z?

So the user makes a recommendation (a trade) and confidence score which is a percent of their total $ai16z holdings.

This would solve for spam as every user would only be able to bet up to their balance of $ai16z

So as @lalalune said

"The first part is just to collect trades in the orderbook. Then we can analyze the data and come up with a weighting strategy.

The second part is calculating trust. I think that we care about a weighting of two things -- 30% how much skin they have in the game and 70% how much they've made in the virtual orderbook."

What we could do is get the users $ai16z balance (from collabland linked wallet).

Then let them place their trade (entry price) their balance of $ai16z determines becomes a multiplier for the standard trade size (lets say 10 sol - only problem with this is you lose the data about the proposed dao position sizing sentiment - you only capture the users position sizing sentiment (but maybe those are the same thing?)).

Sidenote: Ive got a pretty awesome backend / api for backtesting trading strategies that we could use if needed?

@lalalune
Copy link
Member

lalalune commented Nov 1, 2024

@MarcoMandar has been working on this. The order book and trust system are unified, so I am assigning tickets which we can deem duplicate and close as necessary.

@lalalune lalalune added this to the Milestone 1 milestone Nov 1, 2024
@github-project-automation github-project-automation bot moved this from In progress to Done in Eliza Nov 20, 2024
madjin pushed a commit that referenced this issue Jan 4, 2025
* feat: add support for agentic plugin documentation

* feat: add support for agentic plugin documentation (#5)

* feat: add support for agentic plugin documentation

* Feature/full plugin docs (#7)

* feat: add support for agentic plugin documentation

* feat: add support for agentic plugin documentation

* feat: add support for agentic plugin documentation

* feat: add support for agentic plugin documentation

* feat: add support for agentic plugin documentation

* feat: add support for agentic plugin documentation

* feat: add support for agentic plugin documentation

* feat: add support for agentic plugin documentation
madjin added a commit that referenced this issue Jan 4, 2025
* chore: remove .env

* git ignore has .cursorrules

* Revert "lint: fix EmbeddingProvider already defined error (via claude)"

This reverts commit bbbf325.

* fix(client-twitter): tighten engagement criteria and raise quality thresholds

* Update README.md

* Update README_CN - Model Configuration

The original model configuration guide is misleading, it tells readers to configure model provider by change the `XAI_MODEL` parameters.

But this is for the XAI configurations, i update the description completely with the right configuration steps.

* Added Polish Readme file

* Fixed polish's readme typo's

* Rename Readme_PL.md to README_PL.md

* feat: fix chat client to autoscroll

* chore: update changelog

* feat: improve messages

Improve message so criteria is displayed

* fix number prefixed username, add X brand in messaging

* refactor: reorganize imports in video service

* fix: improve clarity and grammar in pull request template

* fix tg markdown issue.

* fix: update jsdoc automation workflow

* fix: update jsdoc automation workflow

* docs: Add JSDoc documentation to constants.ts

* docs: Add JSDoc documentation to createRuntime.ts

* docs: Add JSDoc documentation to testSetup.ts

* docs: Add JSDoc documentation to types.ts

* docs: Add JSDoc documentation to constants.ts

* docs: Add JSDoc documentation to createRuntime.ts

* docs: Add JSDoc documentation to testSetup.ts

* docs: Add JSDoc documentation to types.ts

* feat: Twitter spaces integration

* Adding pnpm-lock.yaml

* add character file script to make system prompt and templates easier to add to existing character files or generate a new one

* feat: add theme toggle functionality with dark and light mode support

- Imported ThemeToggle component in AppSidebar
- Added ThemeToggle to SidebarFooter in AppSidebar
- Initialized theme based on localStorage and system preferences in main.tsx to support dark and light modes

* docs: Add "What Did You Get Done This Week? 7" notes

* Adding back comments and documentation

* add TEE plugin-env support

* fix

* fix

* fix: init 768 dimension in database for gaianet

* chore: parse files through prettier

* Update README.md

* Add files via upload

* feat: add optional TRANSCRIPTION_PROVIDER setting with fallback logic, moving twitter spaces plugins to Eliza repo

* Updates for web search and timeout

* Cleanup on packages/client-twitter/src/plugins/SttTtsPlugin.ts

* Update agents.md

Minor update to correct "should"

* add an client-direct endpoint to get memories by agentid and roomid

* docs: fix Contributing Guide

* feat: add docs for image generation plugin

* fix: fix the image redirection

* update volcengine model

* feat: Add Spanish Translation for Documentation README

* added README files to all plugins

* use tavily sdk

* file updates

* tweak of evm transfer template

* refactor(plugin-conflux): output detailed invalid content

* add experimental telemetry model option

* chore: console -> elizaLogger

* chore: pnpm lock file

* chore: fix conflicts

* chore: add readme

* fix: set publishedDate to optional as stated by the docs.

* chore: move tavily package to the core

* chore: pnpm lock file

* feat: add error handling for TAVILY_API_KEY key

* chore: remove conflicting files

* chore: README files

* chore: Update local-development.md

* fix continue double responses

* fix google api key

* feat: include priority to plugin-tee build

* chore: remove build cache with clean command

* chore: changes to settings

* fix: add @tavily/core to external libs (almost took my life)

* chore: remove logs

* chore: console -> elizaLogger

* add plugins to the key components section of the faq

during a recent discussion on discord it was not clear to some folks the conceptual difference between clients and plugins. this just adds a bit more high level info up top on the FAQ for future creators.

* re-build fx

* Fix double spaced tweets in Post.ts

Currently, despite the prompting stating to use "\\n\\n (double spaces" between statements the tweets always output new statements with just a single newline, making tweets look blocky. 

For example, tweets previous would look like (despite the prompt): 
"Dobby is so excited to start this new year, full of possibilities and chances to make a difference!
Dobby has big plans to help his dear friends and make the wizarding world an even brighter place."

This ensures the double spaces requested in prompting is applied to the tweets with the tweets now looking like: 
"Dobby must remind all friends to be cautious of dark magic lurking in the shadows.

Dobby's heart aches at the thought of anyone falling prey to its deceitful powers."

This allows agents to tweet better-formatted posts that ease visilibty.

* add TranscriptionProvider

* select transcription provider based on character setting

* clean code

* fix evm deps

* fix bad merge

* remove claude changes

* corrected path for image upload

* Add README_AR.md

Add Arabic language for readme.

* chore: update viem dependency version in plugin-evm and plugin-goat

* Update README.md

add Arabic language reference

* Update package.json

* Update package.json

* fix: remove unwanted gitignore

* chore: add enable web search variable

* chore: pnpm lock file

* fix: import web search plugin only on when enabled

* fix: lockfile

* testing

* update

* Added Hungarian README

* update clean.sh to include deleting lock file to really reset the repo

* update integreation test

* run on pull request not pull request target

* update to use pnpm command

* trigger re-run of workflows

* fix

* revert

* actually need to revert

* Fix bug in plugin-bootstrap/src/evaluators/facts.ts

{{user1}} should be {{user2}} :

-------
in factEvaluator, in the examples template,

{{user1}} should be {{user2}} instead

                {
                    user: "{{user1}}",
                    content: { text: "Which city?" },
                },
                {
                    user: "{{user2}}",
                    content: { text: "Oakland" },
                },
                {
                    user: "{{user1}}",
                    content: {
                        text: "Oh, I've never been there, but I know it's in California",
                    },
                }

* standardize viem dependency so project builds now

* missing depdencies

* revert to target due to https://github.com/ai16z/eliza/pull/993/files#r1883351009

* remove submodule

* Solve Issue 1643, imageDescriptionService not working with other providers than OpenAI

* Update schema.sql

There is an extra semicolon that causes a syntax error when trying to upload the schema to supabase.

* Solve Issue 1643, imageDescriptionService not working with other providers than OpenAI

* Seperated imageModelProvider and imageVisionModelProvider for ImageDescriptionService

* modelVisionProvider Added to IagentRuntime interface type.ts

* Feature/full plugin docs (#52)

* feat: add support for agentic plugin documentation

* feat: add support for agentic plugin documentation (#5)

* feat: add support for agentic plugin documentation

* Feature/full plugin docs (#7)

* feat: add support for agentic plugin documentation

* feat: add support for agentic plugin documentation

* feat: add support for agentic plugin documentation

* feat: add support for agentic plugin documentation

* feat: add support for agentic plugin documentation

* feat: add support for agentic plugin documentation

* feat: add support for agentic plugin documentation

* feat: add support for agentic plugin documentation

---------

Co-authored-by: J. Brandon Johnson <[email protected]>
Co-authored-by: E.FU <[email protected]>
Co-authored-by: odilitime <[email protected]>
Co-authored-by: SK1989sL <[email protected]>
Co-authored-by: JOMOKING <[email protected]>
Co-authored-by: Judasz <[email protected]>
Co-authored-by: yanushevitz <[email protected]>
Co-authored-by: Monil Patel <[email protected]>
Co-authored-by: Matt Gunnin <[email protected]>
Co-authored-by: azep-ninja <[email protected]>
Co-authored-by: jin <[email protected]>
Co-authored-by: Shakker Nerd <[email protected]>
Co-authored-by: slkzgm <[email protected]>
Co-authored-by: HashWarlock <[email protected]>
Co-authored-by: zkfriendly <[email protected]>
Co-authored-by: Phlo <[email protected]>
Co-authored-by: Shakker Nerd <[email protected]>
Co-authored-by: Sam <[email protected]>
Co-authored-by: csh <[email protected]>
Co-authored-by: tomguluson92 <[email protected]>
Co-authored-by: Chanddeep Madaan <[email protected]>
Co-authored-by: Yorke E. Rhodes III <[email protected]>
Co-authored-by: treppers <[email protected]>
Co-authored-by: twilwa <[email protected]>
Co-authored-by: 0xFloyd <[email protected]>
Co-authored-by: chandiniv1 <[email protected]>
Co-authored-by: Sebastián Salazar Solano <[email protected]>
Co-authored-by: zhourunlai <[email protected]>
Co-authored-by: CheddarQueso <[email protected]>
Co-authored-by: zkvm <[email protected]>
Co-authored-by: bendanzhentan <[email protected]>
Co-authored-by: Ninja Dev (QI) <[email protected]>
Co-authored-by: Cole Gillespie <[email protected]>
Co-authored-by: Suicidal Goofy <[email protected]>
Co-authored-by: Ting Chien Meng <[email protected]>
Co-authored-by: Shaw <[email protected]>
Co-authored-by: ShreyGanatra <[email protected]>
Co-authored-by: Mariem Mohamed <[email protected]>
Co-authored-by: Arthera Node <[email protected]>
Co-authored-by: mdominikd <[email protected]>
Co-authored-by: metakai1 <[email protected]>
Co-authored-by: nusk0 <[email protected]>
Co-authored-by: 0xRider <[email protected]>
Co-authored-by: Your Name <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

7 participants