Home Featured Pokemon GO Trading details discovered in a recent code dump

Pokemon GO Trading details discovered in a recent code dump

Pokemon GO Trading details discovered in a recent code dump
Pokemon GO Trading

We are continuing to research the global-metadata.dat we dumped from the 0.37.1 APK yesterday. Previously we reported that there are no Ditto references in the code and today we’re covering everything we found on Trading inside the code dump.

A quick summary in layman terms:

  • You are able to search for “Trading Players”
  • You are able to create, cancel and complete Trade Offers
  • You can currently trade only Pokemon
  • No info on the visibility and range of Trade Search – it’s too early to say if you’ll be able to trade worldwide or not
  • The trading seems resilient to “connection loss” and will retry once the connection is available again
    • It’s inconclusive what type of connection trading will use…
      • … although it does communicate with the server side to load Trade offers and responses

The following paragraphs contain code excerpts, technical discussion and they touch a lot of topics that are common for Pokemon GO reverse engineering. If you’re not comfortable with the terminology, make sure to read more about reverse engineering on /r/pokemogodev.

Code analysis

Surprisingly, the code leverages quite a few ProtoBuf requests that are currently not used in the app’s network traffic:

  • TradingSearchProto
  • TradingOfferProto
    • TradingOfferOutProto
  • PollForTradeResponseProto
    • PollForTradeResponseOutProto
  • TradingResultProto
    • TradingResultOutProto

By the look of it, a Trading player will set up a Trading Offer and the app will start polling for Trade Responses. The unanswered question is if the polling is going to be limited to local area or will it be global.

The code suggest it is not limited to a local area nor there is any mention of Bluetooth or NFC – the app communicates with the server over Protobuf to load trade offers and responses. What will Niantic enable in terms of Search visibility and range, remains to be seen.

A part of extracted code is here, broken and half references are omitted for brevity:

Note that the code mentions only Pokemon in the context of trade – set_ReturnPokemon and get_ReturnPokemon fields respectively. There is no mention of in game items such as PokeBalls and Potions, but the variable naming is generic enough to support any kind of “trade response”.

It’s possible you’ll be able to offer a Pokemon and get various “trade responses”. If you decline all of them or cancel the trade, the Pokemon will return to you. That could include offering 1 Pokemon and getting 5 Pokemons as a Trade Response.

Another interesting piece of code we found shows that search can collect multiple player names at once, hinting that Trade offers are not tied 1 on 1 with a player:


But in all honesty, this doesn’t mean the game will display all of them at once. It yet remains to be seen how many player trades you’ll be able to see.

Data mining methodology

We used HxD hex editor to extract strings and methods from the .dat file. Afterwards, we used Sublime Text editor to reformat the text and break it into new lines. Find option was used to count occurrences of strings.