Image for post
Image for post

Techtalk: Differences between public and private trades

Basically they are the same but different.

Image for post
Image for post

After our Update 7.0 the private trade was temporarily broken while public trades still functioned as intended. So some of our community wondered how this was possible. In this techtalk, we will not only explain the differences but also what caused the error in detail.

Generally speaking private and public trades work in the same way but for private trades, we do not write all required data in the blockchain. To explain the process better, let’s go through it step by step:

If someone wants to trade an asset privately, the trade out is written in the blockchain as a transaction, exactly like a public trade. That means it also requires a transaction fee. Now the second transaction which is needed when trading publicly, is not required in a private trade because the trade offer is not engraved in the blockchain. Consequently, no one knows its details. This makes it impossible for a stranger to finalize the trade.

The trade offer is only encoded as a Base 64 string and contains hardly any information other than the price and how the price must be combined with the trading token which was signed by the seller. The rest is gibberish.

Base 64 strings are anything but a secure encoding. Every client and even some online services can decode it. However, it is not supposed to be secure, it is there to make the sending and receiving of data more convenient.

When the information is viewed by a potential buyer and is decrypted he knows what the trade-in will look like. Now he is able to combine the signed trading token with the correct amount of coins to create a transaction with a valid signature.

The price information is created and stored locally which is why it is not only possible to set a new price after the trade out is created but gamers are also able to create multiple different offers for the same asset.

This is possible because the signature — which is part of the Base 64 string — describes what a valid transaction must look like, in other words, how the coins and the trading token should be combined. Consequently, there is an infinite number of possible signatures but all signatures for the same price are the same.

When a private trade is created, no miner fee is needed, and hence no fee rate is added. But we had to set a fixed fee in update 6.1 because the automatic fee was insufficient to create public trades. We classified the problem with the public trades as fatal because we wanted to release an update as fast as possible. So, we reduced the testing phase to an absolute minimum. Unfortunately, the edge case was not found before the release.

Who we are

LiteBringer is the first true blockchain game, giving you full control over your assets and enables you to earn real money through trading. It is developed by CipSoft an independent developer and operator of online games for various platforms. We are the maker of the MMORPG Tibia which ranks among Europe’s most successful online games since 1997.

Chat with us at Discord

Get the latest news on Twitter

Get the most valuable content with our Newsletter

Image for post
Image for post

Written by

LiteBringer is the first true Litecoin game. Join us on Discord or Twitter to read all articles for free.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store