vegaprotocol / community

Work related to Vega's community function
0 stars 19 forks source link

FTR: Gather requirements for a Vega leaderboard #22

Closed tamlyn10 closed 3 years ago

tamlyn10 commented 3 years ago

A leaderboard that displays trader and liquidity provider rankings. So much we could do, so let's collect requirements and spin up a developer bounty for it!

ecdsafu commented 3 years ago

I've spoken with my friend who made https://getwoke.me/ and he's open to help with making it work for Vega. This would just be for linking a leaderboard to twitter accounts.

cdm commented 3 years ago

Great to see us rebooting leaderboards. We built a simple one a while ago, it'd be great to collect a list on the ticket of the data points we'd like to display in the Leaderboard

That'd help me prep/advise on the query or any extra work needed to make this bounty possible. I've got a simple polling API service that we used last time to provide 'realtime' quote updates for values on the settlement asset value in USD etc.

cdm commented 3 years ago

I'd love to get some traction with this, will set up some time to discuss with the community core group. If the team has examples of other projects leaderboards or CEX leaderboards that could work well for us please link them in this thread 📣

@zachit thank you the more collaborative the better 💪

daunjuan commented 3 years ago

I think looking at Bitmax can give an idea of something people are used to, however it is a bit boring. To keep it lively I would suggest daily winners and overall. https://www.bitmex.com/app/leaderboard To keep activity up perhaps something that makes them trade daily requirement as well?

daunjuan commented 3 years ago

Would be nice to have similar what e.g. google does when you search for premier league table, where you can see the past few games/trades red, green etc As well as fifa with ranking going up or down, but might get messy. However, a rank name I really thing is interesting, like grand master etc, make it more game like, like starcraft and they do. @cdm

Screenshot 2021-02-25 at 20 55 42 Screenshot 2021-02-25 at 20 53 23 Screenshot 2021-02-25 at 20 52 47
ecdsafu commented 3 years ago

The BitMex leaderboards are fun. Top by notional and ROE. Being able to add a handle to recognise your wallet on the leaderboard would be great functionality.

Integrating twitter would be great of course, but fine with just names to begin with. My friend with the twitter project is way too overloaded at the moment unfortunately. Axelar are trying to get their testnet out. The twitter integration we could do pretty simply with just a signed tx from their wallet, posted to twitter?

You could include an orders per block or per day. This could be fun for bot builders, and be a sly incentive for trying to break Vega with lots of orders.

ecdsafu commented 3 years ago

Should expose volume too, of course. FTX has maker volume, maker/total volume ratio would be interesting too, but not sure if something for a leaderboard.

campbellssource commented 3 years ago

I think competitions could be: Profit based:

Competitions could also be event or activity based: e.g.

In the sprit of agile iteration I'm tempted to suggest: First: a board where you select an asset and then see how people rank by comparing amount given/deposited Vs current. (perhaps with sub grouping for "available", "deployed", in "liquidity bond" and not including "to withdraw")

Each competition will need its own Asset (and consequently market). (unless we add a time range to the comparison 🤯 ( I don't suggest we do that)

Second: a single market leader board is also relatively easy but I haven't figured out how you make it fair when assets can be Fauceted

Now we can introduce a mode to the board, market mode you select the market asset mode you select the asset.

Third: a leader board that can simply sort parties by a single field or thing you can point at in the block explorer

then more when we get there

campbellssource commented 3 years ago

Or more generally we could have a service that takes a set of data and a formula that ranks the users. Forgive the pseudo code.

combatants = arrayofVegaKeysFromRegistrants
competitionStart
competitionEnd
//What the leaderboard needs to fetch
competitionData = (
  startBal = sumOfAllDeposits since competitionStart, 
  endBal = availableBalance.tBTC OR availableBalance.tBTC at competitionEnd
)
//How it ranks people
competitionRank = (
    startBal / (endBal - startBal)
)
Foreach($combatant in $combatants){
  fetch combatant.competitionData 
}
Sort combatants by competitionRank
campbellssource commented 3 years ago

just seen https://github.com/vegaprotocol/priceproxy So perhaps the portfolio methods would be doable if all assets in the competitions exist elsewhere in the world

cdm commented 3 years ago

We're nearly completing some exciting work in this area internally, thank you all for your feedback and input - it's been invaluable 🥳