fix: Tweak polymarket stars calculation b/c wash-trading incentives

Do this by adding liquidity requirements, rather than only loking at
volume
This commit is contained in:
NunoSempere 2022-04-05 10:46:46 -04:00
parent 5ccbb7fabc
commit 067832b72f

View File

@ -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 (