diff --git a/api/resolvers/item.js b/api/resolvers/item.js index 506f3405..d95f9deb 100644 --- a/api/resolvers/item.js +++ b/api/resolvers/item.js @@ -857,7 +857,7 @@ export const SELECT = function newTimedOrderByWeightedSats (num) { return ` ORDER BY (POWER("Item"."weightedVotes", 1.2)/POWER(EXTRACT(EPOCH FROM ($${num} - "Item".created_at))/3600+2, 1.3) + - GREATEST("Item".boost-1000+5, 0)/POWER(EXTRACT(EPOCH FROM ($${num} - "Item".created_at))/3600+2, 4)) DESC NULLS LAST, "Item".id DESC` + ("Item".boost/${BOOST_MIN}::float)/POWER(EXTRACT(EPOCH FROM ($${num} - "Item".created_at))/3600+2, 2.6)) DESC NULLS LAST, "Item".id DESC` } const TOP_ORDER_BY_SATS = 'ORDER BY "Item"."weightedVotes" DESC NULLS LAST, "Item".id DESC' diff --git a/components/adv-post-form.js b/components/adv-post-form.js index 10bb272b..f2c91568 100644 --- a/components/adv-post-form.js +++ b/components/adv-post-form.js @@ -4,6 +4,7 @@ import { Input } from './form' import { InputGroup } from 'react-bootstrap' import { BOOST_MIN } from '../lib/constants' import { NAME_QUERY } from '../fragments/users' +import Info from './info' export function AdvPostSchema (client) { return { @@ -34,7 +35,27 @@ export default function AdvPostForm () { body={ <> boost} + label={ +
boost + +
    +
  1. Boost ranks posts higher temporarily based on the amount
  2. +
  3. The minimum boost is {BOOST_MIN} sats
  4. +
  5. Each {BOOST_MIN} sats of boost is equivalent to one trusted upvote +
      +
    • e.g. {BOOST_MIN * 2} sats is like 2 votes
    • +
    +
  6. +
  7. The decay of boost "votes" increases at 2x the rate of organic votes +
      +
    • i.e. boost votes fall out of ranking faster
    • +
    +
  8. +
  9. 100% of sats from boost are given back to top users as rewards
  10. +
+
+
+ } name='boost' hint={ranks posts higher temporarily based on the amount} append={sats} diff --git a/lib/constants.js b/lib/constants.js index 1e2f1816..a45ff6cb 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -1,5 +1,5 @@ -export const NOFOLLOW_LIMIT = 100 -export const BOOST_MIN = 1000 +export const NOFOLLOW_LIMIT = 1000 +export const BOOST_MIN = 5000 export const UPLOAD_SIZE_MAX = 2 * 1024 * 1024 export const IMAGE_PIXELS_MAX = 35000000 export const UPLOAD_TYPES_ALLOW = [