This is an app for Manifold Markets that calculates a user's credit score based on their account information and activity. It provides fast analysis via a clean interface powered by Deno and Fresh. It can also estimate loan insurance fees. It also generates credit history charts.
- Credit Score Calculation – Instantly fetch and analyze any Manifold user's trading activity to produce a score.
- Loan Insurance Estimator – Simulate and calculate how much insurance would cost to cover a loan to a specific user.
- Built with Fresh and Deno, using the Manifold API.
- Mobile-first responsive layout.
- Credit History - Creates a nice graph with chart.js to view credit history.
- Deno – Secure runtime for JavaScript and TypeScript.
- Deno KV - Deno's key value database.
- Fresh – A web framework for Deno using Preact and islands architecture.
- Preact – Fast 3kB alternative to React with the same modern API.
- Tailwind CSS – Utility-first CSS framework for rapid UI development.
- Manifold API – To fetch user account and market data for analysis.
-
If you haven't already, install Deno:
macOS
brew install denoWindows (PowerShell)
irm https://deno.land/install.ps1 | iexLinux (via Shell)
curl -fsSL https://deno.land/install.sh | sh -
Clone the repo and start the server
git clone https://github.com/crowlsyong/rcrcd rcrdeno task start -
Optional: Add Github OAuth
- Register OAuth app in github here:
https://github.com/settings/applications/new
- Homepage URL In our case, we use https://risk.markets for the Homepage URL
- Authorization callback URL and we use https://risk.markets/auth/oauth2callback (you can use http://localhost:somenumber/auth/oauth2callback)
- Do not enable Device Flow
- Register application
This project can be deployed to Deno Deploy with minimal configuration.
- Push code to a GitHub repo.
- Create a new Deno Deploy project and link it to your repo at https://dash.deno.com
- Click settings tab and add environment variables
- Set the entry point to
main.ts. - (optional) Add auth environment variables in the Deno Dashboard at
https://dash.deno.com/projects/YOUR_PROJECT_NAME/settings
The score is derived from weighted factors including balance, total profit, account age, managram history, and activity level. While this is not a financial score in the traditional sense, it helps visualize the relative risk of lending mana to a user.
You can review the scoring algorithm in
/routes/api/score.ts.
The insurance calculator uses the credit score as a baseline and adds a risk premium. Higher risk scores lead to lower insurance costs. This is experimental and subject to change. More info on fees: https://manifold.markets/news/risk
Contributions are welcome. Please open an issue if you have suggestions, or a PR if you'd like to fix or add a feature. Messaging me on Discord or Manifold is okay too.
MIT License
The is a 3rd party app.