1. This forum section contains Blog style threads from the Developers, and/or threads with details about what they have been working on, previews of upcoming content, and sometimes backstory associated with the content. Players are permitted to reply to these threads if the developer has indicated it is permissible by leaving the thread unlocked. Please note that TOS applies, and any abuse or trolling will be moderated.
    Dismiss Notice

Public Stats API

Discussion in 'Developer Work and Blog posts' started by Undone, May 9, 2017.

Thread Status:
Not open for further replies.
  1. Forstle Sigmatus

    Forstle Sigmatus Avatar

    Messages:
    1
    Likes Received:
    1
    Trophy Points:
    3
    i don't understand how detailed vendor buy/sale data would harm the economy here. can someone explain it to me?

    games like eve online that have all of the data available through their api, with lots of 3rd party tools for using that data, i don't see it harming their economy. why would that be different here?
     
    Rowell likes this.
  2. Diab Blackbow

    Diab Blackbow Avatar

    Messages:
    824
    Likes Received:
    1,080
    Trophy Points:
    93
    Maybe they think their high prices will be exposed.... hurting their own pockets. Other then that, I am not sure. A lot of games have that information available.
     
    Titania Xylia and Rowell like this.
  3. ZODROT

    ZODROT Avatar

    Messages:
    43
    Likes Received:
    47
    Trophy Points:
    8
    Eve has a verry big map. and it takes a lot of time to move from 1 place to another .
    in Sota it takes much less time
     
  4. Umuri

    Umuri Avatar

    Messages:
    527
    Likes Received:
    1,828
    Trophy Points:
    63

    So the short answer is, it won't hurt the economy, IF the right data is exposed, with the right time delay.
    However getting those correct is difficult. A lot of data that looks alright is actually exploitable in the right hands.
    Which is something i've been campaigning for, and will fight tooth and nail whenever the API Data starts to be released to ensure it isn't exploitable by those people "in the know".

    Here are a few examples off the top of my head on how this could go wrong:

    Right now, commission free vendors are 0-sum. You can buy and sell your own items with no loss. So anyone can create "fake" data to artificially give a perception of supply/demand being out of whack. For the record, people -already- do this to screw with Atos's numbers, to try to influence certain design decisions, and they don't even have any feedback or proof that their manipulation is working. For that reason, you have to include some identifier as to what vendor originated the sale, or the person who bought the item, so you can filter these to obtain realistic numbers.

    Now, if we have these identifiers, if you still record the exact time of purchase (no time delay) then we can tie each identifier to the actual vendor through analysis of the data, almost as easily as if we had it's x/y/z/scene coordinate. So any anonymization you do of data such as giving them fake identifiers or offsetting won't actually be that helpful.
    I've already made a lot of posts earlier in this thread on how the current system does -not- have a time delay and can be easily reconstructed down to 5 second accuracy or more if a person is so inclined, and why I intentionally introduce a time delay into SotaSTATS.

    Because we can tell exactly what vendor belongs to what ID, anytime someone lists any item with an erroneous price, someone who has coded one of these systems can instantly get themselves an alert and go buy them out. If this is hooked up to one of the (many) bots in sota, you could end up with a situation where a lot of players lose items due to mistyping a price or two and the bots scooping them up as "free" profit. Whereas currently you have to wait for someone to find the vendor and notice the price is wrong.

    If the time delay is small(1 hour or so), it's effectively worthless, as now you allow a form of large scale price manipulation known as price pushing, of which I know there is one bot that does a form of it already. Basically, someone loses money by buying up anything priced under their floor, and re-selling it on their own vendor. If they are efficient about it, they can wipe out any stock under that price in the "public" eye, and slowly raise the price, netting a profit on everything they've sold - the tiny bit they spent buying and reselling on a slight lost. gCOTOs already have been through a couple waves of this, as they are the easiest commodity to spot, but with this API, that could be extended to the others. Higher prices for everyone.

    So, lets say we introduce a time delay of 24 hours. But we still include pricing data. We can still identify most vendors through this data alone, so we still don't have anonymized data. We can still do some price fixing, but it's more likely that people get a chance to see the lower priced items before they're snatched up, which helps counteract it. Any item listen mistakenly has 24 hours to be fixed before it's guaranteed gone to bots.

    Now, some of these concerns can be mitigated by including only "Sold" vendor listings, however without the time delay alerts can still be setup to trigger vendor runs on underpriced vendors by a resource cartel. I keep pointing out this, because the amount of wealth required to perform a "run" on a given resource is very small in SOTA, the equivalent of $100-200 for most of the common resources (ore, cotos, wood, cotton, etc).


    However, and here's the kicker:
    There is not and will not be a time delay on the API anytime soon. When it launched i worked with undone a ton to try to mitigate the advantage the programmers had over average people, and thats why i put up sotastats so everyone could have access. There is one or two theoretical ways it could be added, but they're a lot of work that Undone doesn't have time for and is not a priority. This isn't a blame on him, there is just more important things to be done. So until such a thing exists, it is better that we do NOT have player vendor API data.


    This is not an exhaustive list of exploits, just what I could come up with in the top of my head for this post. I know there are more. I hope it answers some of your question on how the data could be bad.
     
    Alioth, Varinka, Ben_Hroth and 3 others like this.
  5. Emso Boydon

    Emso Boydon Legend of the Hearth

    Messages:
    101
    Likes Received:
    179
    Trophy Points:
    30
    Location:
    CET
    Wow, Umuri. Wall of text. Did review your comment until the first unresolved context issue, which is litterally in the first paragraph - sry! And here it is: "exploitable in the right hands".

    I think this statement requires a usage scenorio wrt to "exploit" that finds consensus. Could you illustrate one for the community, please?

    I consider "For the record, people -already- do this to screw with Atos's numbers, to try to influence certain design decisions, and they don't even have any feedback or proof that their manipulation is working" an assumption, not a fact. Could you provide a basis for this assumption, please?

    It is both difficult and easy to "hide" in big numbers, I think. I am curious about the approach you have in mind.

    Also, there is a subject highlighted that poses a threat - "the right hands". Again, I am at a loss here. Could you elaborate on the subject(s) you associate with that distinct group? (Intent, Ressource, Target Group, etc.)
     
    Last edited: Jan 13, 2018
  6. Rowell

    Rowell Avatar

    Messages:
    612
    Likes Received:
    1,281
    Trophy Points:
    105
    Gender:
    Female
    Location:
    Brittany Fields
    I can see where some issues can arise. My main mode of thought was to: a) provide NPC merchant pricing (how much an NPC merchant sells stuff for, and how much they buy stuff from players), and b) collect prices on items sold on player vendors, and offer a broad range of prices (the lowest, the highest, the average, the median). By providing the range of prices, people can see what's going on in the market, and notice any outlying prices and know to plan accordingly. I mean, if a stick usually sells for between 1000-2000g, with an average of 1400 (more people sell in the low-mid price range), and someone comes along and posts a Stick for sale at 100g, you'll see the attempted market manipulation reflected in the lowest price, the average price and the median price. If we want to get into tracking market manipulation, one could keep a running history that others can see. But that means some real intense data scraping, upkeep and storage. The main point of my particular site was to provide costing data, so players could look up a recipe, see how much the materials would cost if they bought them (so they would know how much they would have to spend if they had to buy materials), and then they could use those costs to calculate the price/value of their item.
     
  7. Lained

    Lained Avatar

    Messages:
    2,786
    Likes Received:
    4,772
    Trophy Points:
    165
    Location:
    Yeovil, England
    [​IMG]
     
    Umuri likes this.
  8. Emso Boydon

    Emso Boydon Legend of the Hearth

    Messages:
    101
    Likes Received:
    179
    Trophy Points:
    30
    Location:
    CET
    Statistically, it is not that hard to provide a baseline or deviation from mean standard. But this is not magic. Either you create an org that does exactly that, runs the sheets, for free, altrusticly, or... be like the real world that implements measures for price intransparancy to enanke exactly your economic "exploit". Creating an artificial measure that composes a god's eyes view will reduce the incentive to provide a bargain amongst non-bargains, not only reduce "ripp-offs". And I would rather place my trust in atos|sota than in artificial transparency. This is a subjectiv opinion.
     
  9. Umuri

    Umuri Avatar

    Messages:
    527
    Likes Received:
    1,828
    Trophy Points:
    63
    Yes, is that a bad thing? I like to cover a topic fully and explain in-depth.

    I'll answer this anyway, but i'll point out this is substantive deflection because I already gave several concrete examples of how this system could be exploited in the above "wall of text". :p

    As for "exploitable in the right hands", that just means there needs to be 1 or more person who notices the above situation is profitable, and has the programming knowledge to create a system to alert them when it happens. Which is a very low barrier of entry. Considering we have multiple economic focused bots already working in sota and more have been banned in the past, it is a given that this will happen.

    If you are looking for specific examples, you will not find them on here and will have to please pm me, as due to @Berek 's rules I am not allowed to name other players in the forum in anything that could be viewed as neutral or negative about them.

    As noted above, it is against @Berek's rules to discuss individuals or their past transgressions in forums. All I can say is that it's been commented before during telethons more than once when atos has had to provide data on things, so you don't have to take my word for it, it's come from him.

    That is a tautology yes. The approach I particularly use is a holdover from a pair of economy daemons i made years ago that kept watch over the economic balance of an old shard I used to admin. Each one has very different approaches to filtering numbers, and they must both "agree" before a datapoint is considered invalid, but i can run analysis based on the opinion of either of them as well. Between those four views (Unfiltered, A, B, A+B) you can pretty easily isolate when atypical data is being presented.
    However if those prove ineffective i'll be happy to implement as an optional filter any approach anyone wants, for all to see and use.

    If these vendor data goes in, I'll be providing all four viewpoints on SotaSTATS, so no one has to "take my word for it", but can pick and choose which analysis they prefer. In addition sotaSTATS exposes all data from the API in a reviewable and searchable format, so no one has to take my word on anything but can manually run the calcuations themselves as well as pulling from the API directly.

    Again, you know we can't name names, that breaks the rules.
    The Intent is simple, economic gain. "The right hands" just refers to anyone who stands to economically profit, and has the resources to do basic programming, which honestly can be picked up in a good 8 week bootcamp or a simple programming 101 course, so honestly, anyone. But if you need specific examples, the best i can give you is to please go to the buying and selling forum and look for any of the 4 main traders that make part of their living off sota economics. At least two of them have the expertise to code such a bot, and one of the others them would gladly pay someone else to do it(they've outsourced work in the past) since the percieved profit would net them more than they'd spend. And that's just the "main" guys. Any programmer who plays could take advantage of these styles of alerts.

    EDIT upon further thinking: Actually, I can do one better. There is one specific example of economic manipulation I can give that doesn't break the rules. If you go check my coto news thread, you'll find several posts detailing the work of a small subset of players trying to artificially drive coto prices up multiple times over the past years. One of the things that prevents them from doing this efficiently is having to find and buy out every coto vendor below their new target price, which takes them days initially and hours each day re-checking vendors. With this information it could be done in hours if the time delay isn't there to prevent them from scooping up new listings.



    Actually, it is when the "mean standard" is the one being manipulated. Because you need some "guaranteed good" data to prove a deviation from, and that's hard to get and prove, which is why so many statistical analysis fail basic rigor checks. It's not impossible, but it's harder than you'd think when we only have partial data.

    Which is why I put my time and effort into creating SotaSTATS, so that even non-programmers could look at the API data and the percieved advantage programmers had was shared equally with everyone, negating most of it. I -hate- when one group gets an advantage, and when the API came out, the programmers who could interface with it had one for a tiny bit. If you need a concrete example of this, go look at SotaSTATS and look specifically at the lottery page, when it was annoucned anyone who used the API could tell how many lottery tickets were sold, a number that beforehand wasn't publicly shared. Because of that, people could tell whether it was "profitable" to buy another lottery ticket. I built that page to reduce this advantage, so that everyone had access to that data.



    I believe this one is currently in the API, and you can do some basic modelling on it. It's already in the planned economic update package coming hopefully in februrary, just most of my time has been taken up by SotaHUD's new quest package.

    I feel this is a wonderful usage and an example of how the above proposal for limiting doesn't affect real world usage. Notice that for this you don't care when the data gets there (so a 24 hour delay wouldn't affect it much) and you only really need sold items (because an item listed for 1,000,000 but never sells wouldn't be useful data).
    As for the storage/upkeep/scraping, that's what SotaSTATS is for, and why I plan (long term) to try to release more interfaces for cutting into it besides just the oversimplified codex, so people can run these kinds of calculations for themselves and not have to trust anyone else's.
     
  10. Tiina Onir

    Tiina Onir Avatar

    Messages:
    1,103
    Likes Received:
    1,900
    Trophy Points:
    125
    Location:
    Bramble, South Paladis
    *I snipped most of these, because I have nothing to contribute to it*

    Honestly, tracking this is exactly what I want to use the API for (any tracking I do, I plan to make public). I haven't done anything other then idle playing with it, because the rest of the data isn't anything I'm personally interested in.

    Once it's in the API, there really isn't any scraping to be done. The API is designed to be relatively easy to extract data from. As to storage, putting it into a DB would probibly not take up as much room as you might expect, especally if you aren't tracking back farther then a year or two. (that said, I'm not interested in looking for signs of manipulation, myself.)

    I completely agree, and would LOVE to to have delayed sales information, possibly even without a vendor identifier. I'd be happy to know "24hrs ago, somewhere in the world, 100 iron ore sold for 4700."

    I do want to emphasize that at least some of what Umuri considers "market manipulation," while that is a fair assessment, I would also consider "valid gameplay" as long as it's not done with a bot (although maybe you only meant to consider is manipulation when done with a bot, if so please ignore this).
     
    that_shawn_guy likes this.
  11. Rowell

    Rowell Avatar

    Messages:
    612
    Likes Received:
    1,281
    Trophy Points:
    105
    Gender:
    Female
    Location:
    Brittany Fields
    At the moment, sotatraders.com is making a call to the API to get items purchased by players from NPC merchants, and items players sell to NPC merchants. The hardest part dealing with that API data is translating the ArcheType (which could be something like "Equipable_Archetypes/Armor/ArchetypeArmor_Cloth_001_Feet" or "Equipable_Archetypes/Armor/ArchetypeArmor_Cloth_004_Feet") into the actual item in our database. Seeing that MANY items from the API have a cryptic archetype, it's not easy to say "Archetype X maps to my Item Y".

    Aside from that, the up-to-the-minute-pricing and the timing of the pricing is no biggie. I don't mind if there's a latency. I don't need to know which vendor is selling which item(s) for what prices. I'm just looking for the raw prices that items are selling for. My hourly query has a set size, since I don't want to over-burden or take advantage of the API. So I'm not getting a complete picture anyway. (One thing i need to do is ask the Portalarium devs what a fair query limit should be for a query that hits them once an hour).

    Think i'm rambling now. Too early in the morning. Will be back after more awakeness happens.
     
  12. oxisto

    oxisto Avatar

    Messages:
    3
    Likes Received:
    11
    Trophy Points:
    3
    Is there currently an issue with the Elastic endpoint? I can't seem to access it using the usual ways (kibana, python-elasticsearch, etc.)
     
  13. Rowell

    Rowell Avatar

    Messages:
    612
    Likes Received:
    1,281
    Trophy Points:
    105
    Gender:
    Female
    Location:
    Brittany Fields
    I think the SOTA API server is offline. I tried last night and was getting Error 503: Server Unavailable.
    As soon as Undone checks his forum Inbox, he'll see my message letting him know the server is down.
     
  14. Undone

    Undone Trap Master Moderator SOTA Developer

    Messages:
    346
    Likes Received:
    848
    Trophy Points:
    43
    Looks like some disk space issues have cropped up again. Opened a jira to get this taken care of; may be a day or two to get this all sorted and hopefully prevent it from happening in the future.
     
    Rentier, Tiina Onir and oxisto like this.
  15. Rowell

    Rowell Avatar

    Messages:
    612
    Likes Received:
    1,281
    Trophy Points:
    105
    Gender:
    Female
    Location:
    Brittany Fields
    Many thanks!
     
  16. Tiina Onir

    Tiina Onir Avatar

    Messages:
    1,103
    Likes Received:
    1,900
    Trophy Points:
    125
    Location:
    Bramble, South Paladis
    Indeed, thanks for you hard work, Undone.
     
  17. Rowell

    Rowell Avatar

    Messages:
    612
    Likes Received:
    1,281
    Trophy Points:
    105
    Gender:
    Female
    Location:
    Brittany Fields
    Just a quick ping about this problem. The server is still offline. Many Thanks!!!
     
  18. Undone

    Undone Trap Master Moderator SOTA Developer

    Messages:
    346
    Likes Received:
    848
    Trophy Points:
    43
    Unfortunately there were some complications with the server that will not be addressed until after lockdown.
     
  19. Rowell

    Rowell Avatar

    Messages:
    612
    Likes Received:
    1,281
    Trophy Points:
    105
    Gender:
    Female
    Location:
    Brittany Fields
    Ah, most unfortunate. Good luck in defeating those server beasts!
     
  20. Undone

    Undone Trap Master Moderator SOTA Developer

    Messages:
    346
    Likes Received:
    848
    Trophy Points:
    43
    Happy to report that the PublicAPI is back up and running!

    [​IMG]
     
    Last edited: Feb 16, 2018
    Rentier, Barugon and Echondas like this.
Thread Status:
Not open for further replies.