From 067832b72f44420049330cbdc07269605e785160 Mon Sep 17 00:00:00 2001 From: NunoSempere Date: Tue, 5 Apr 2022 10:46:46 -0400 Subject: [PATCH] fix: Tweak polymarket stars calculation b/c wash-trading incentives Do this by adding liquidity requirements, rather than only loking at volume --- src/backend/utils/stars.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/backend/utils/stars.ts b/src/backend/utils/stars.ts index 69a57f9..c0a7dae 100644 --- a/src/backend/utils/stars.ts +++ b/src/backend/utils/stars.ts @@ -207,9 +207,16 @@ function calculateStarsOmen(data) { } function calculateStarsPolymarket(data) { - let nuno = (data) => (data.volume > 10000 ? 4 : data.volume > 1000 ? 3 : 2); + // let nuno = (data) => (data.volume > 10000 ? 4 : data.volume > 1000 ? 3 : 2); // let eli = (data) => data.liquidity > 10000 ? 5 : 4 // let misha = (data) => 4 + + let nuno = (data) => + data.liquidity > 1000 && data.volume > 10000 + ? 4 + : data.liquidity > 500 && data.volume > 1000 + ? 3 + : 2; let starsDecimal = average([nuno(data)]); //, eli(data), misha(data)]) // Substract 1 star if probability is above 90% or below 10% if (