# TrustQL?

TrustQL is an on-chain reputation calculation framework built from the ground-up with flexibility in mind. It comes with it's own GraphQL-like interface API where anyone can pass in an address and the interface they want to use for calculating the score. We fetch all the data we can about the user and pass it through our grading algorithm to provide you with an "XP Level" of all the metrics combined.

Overview:

![Sample Query](https://232277752-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYsn1ohNDhP9KjV5uFp0k%2Fuploads%2FyVArqOucyvgZtJ05gzYt%2FScreenshot%202022-05-29%20at%2011.29.00.png?alt=media\&token=007bc723-dfcb-4aa5-8cd5-6db03de4fd5c)

* Even though we have a custom grading system, the main metric (weightage) of each parameter is completelty in control of the user. We use our algorithm only to provide "levels" (like experience level in games) for each parameter based on the user's activity. This is to easily support comparing apples to oranges without having the user think much about it.
* The whole data fetching is built in a way that it does the least possible calls and fetches the max possible data. However, we agree there is work left in optimising for addresses which have millions of transactions. Our suggested solution is a chain indexer.
* The code in the repository explains a few interesting ways one can query data. We have tried to demonstrate it as a "protocol"-like interface where it is incredibly easy to add to / remove / tweak parameters and include it in the query language
* From the user end, this is as easy as it could be - a single API route, with < 10 lines of query, and they will be returned by a plain text result with the overall score of trhe particular address.
* It is of course open source and the team would still continute to build upon the app after the hackathon.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ayshptk.gitbook.io/pied-piper-docs/trustql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
