Pablo, a fórmula por enquanto é esta:
// Inspired by:
// https://medium.com/hacking-and-gonzo/how-hacker-news-ranking-algorithm-works-1d9b0cf2c08d
// https://medium.com/hacking-and-gonzo/how-reddit-ranking-algorithms-work-ef111e33d0d9
function getContentScore(contentObject) {
const tabcoins = contentObject.tabcoins;
const secondsSinceEpoch = Math.floor(new Date() / 1000);
const publishedAtInSeconds = Math.floor(new Date(contentObject.published_at) / 1000);
const ageInSeconds = secondsSinceEpoch - publishedAtInSeconds;
const ageBase = 60 * 60 * 1; // 1 hour
const boostPeriodInSeconds = 60 * 10; // 10 minutes
const initialBoost = ageInSeconds < boostPeriodInSeconds ? 10 : 1;
const tabcoinsAntiGravity = 1.5;
const tabcoinsWithAntiGravity = Math.pow(Math.abs(tabcoins), tabcoinsAntiGravity);
const tabcoinsWithCorrectSign = tabcoins > 0 ? tabcoinsWithAntiGravity : tabcoinsWithAntiGravity * -1;
const gravity = 1.8;
const scoreDecimals = (tabcoinsWithCorrectSign + initialBoost) / Math.pow(ageInSeconds + ageBase, gravity);
const finalScore = scoreDecimals * 10000;
return finalScore;
}
De forma grosseira: Quantidade de TabCoins divido pela Idade.