Basic security aspects on ESCB exchange platform

Photo by Markus Spiske on Unsplash

As described in the previous article on the technical details of the implementation of a decentralized exchange based on the ESCB9 protocol, the web interface itself and the server part will only be a wrapper for the Ethereum network based blockchain architecture.

Due to this technological solution, it is necessary to minimize the data collected from the user and not to store sensitive information on the servers of the exchange. In order to accumulate statistics, to store information about completed transactions and quickly interact with the Trust System, based on the HWM solution, the user must have a profile in the exchange database based on the ESCB9 protocol.

Regular applications use registration by email address or phone number. Registration by phone number may immediately discredit the user. Registration by email reserves the risk of phishing attacks. Registration with OAuth technology reveals even more information about the user.

We decided to abandon all these methods and implement the registration based on the signature from the Ethereum wallet. Thus, even if a stock exchange based on the ESCB9 protocol is hacked, no personal data, passwords, etc. will be known to attackers. To implement the authorization mechanism for signing a crypto wallet, we added the ability to use Metamask, Hardware-wallet, create a new Ethereum wallet, unlock a UTC / JSON-based wallet with a password in the user’s browser.

We want to achieve a balance in which the maximum amount of data that will be stored in the ESCB9 database is data available on the blockchain, or data that will not lead to a compromise due to a leak. In this case, the user will be provided with the necessary information quickly and in sufficient quantities.

When authorizing only by signing the wallet, a natural question arises about how to notify the user about actions on the exchange, how to implement security when accessing data stored on the exchange.

  1. Event notifications can be configured to receive on the device on which the entry is made to the exchange. For example, when using a personal mobile phone push-notification of actions on the exchange will be received via a secure channel.
  2. The user can add his personal email to receive notifications. We recommend using Protonmail or other protected platforms for this purpose.
  3. Also, the notification can be configured to receive messages from the bot in the Telegram messenger.

We hope that these three methods of receiving notifications will be enough for our users.

To check the legality of access to data stored on the ESCB9, the standard two-factor authentication mechanism OTP is used.

Also, the user can configure IP login verification. This option will be available only if he/she specifies an email address as a means of receiving notifications. The exchange stores the IP addresses of users in a database in an encrypted form using the sha256 algorithm. Each time user logs into an account from a new IP address, the hash of the IP address in the database will be compared with the hash of the user’s IP address. If the hashes do not match, the pin-code will be sent to the email address specified by the user to validate the input from an unknown IP address.

We also do not plan to use third-party services for analytics and statistics collection, such as google analytics. Since such services collect statistics on the real IP address of the user.

For the dispute resolution system, file uploading is required. For this function, we use the distributed decentralized file storage system ipfs.