Being great developer has nothing to do with passing interview, because most interviews are about weird questions, like what are your weaknesses and question about the legacy feature of a language which nobody hasn’t used in 10 years. Nevertheless, we have to play the game by the rules.

#0 Tricky Function Call

What is the output in the console?

The answer is 30.25. The trick is, if you put parentheses with arguments immediately after function declaration, that will be considered a function call.

#1 Fat Arrow + Declaration Overlap

What is the output in the console?

The answer is 1. The trick is that due to duplicate declaration…


Azure Application Insights is a great tool for monitoring and analyzing your website. And quite easy to install. Just add client and server-side integrations and you are set. Right?

by Aleksey Shmatov

Wrong!

There are many things App Insights does right, but one thing it does wrong out of the box is page views tracking. By default App Insights use page title as page view name. Most websites have page names, like: “AppName PageName SomeId”, which would result in having multiple versions of the same page in your stats. Example:

  • BestApp Order 3242
  • BestApp Order 234
  • BestApp Order 874
    …

Which could literally…


Alien Codex is Ethernaut level number 20 designed by Nicole Zhu. This paper presents my solution to the level.

Spoiler alert. Do not read below if you want to solve it on your own. The text below contains a full solution.

The goal of the level is to claim ownership of the contract. AlienCodex is inherited from Ownable so in order to do that we want to override _owner variable in the contract's storage with our address.
The entire solution can be split into two parts. …


After recent news of SEC taking on EtherDelta, one might expect IDEX would be next in the list. We have to ask ourselves — how truly decentralized and safe IDEX is?

Credits to Aleksey Shmatov

IDEX smart contract is present on Etherscan. Let’s dive into it.

The entire smart contract is only 184 lines. Why so small one might ask?

The reason behind this is that IDEX is not full capacity exchange on the blockchain. It doesn’t store its order book on the blockchain, neither it uses smart contract for order matching. That all is delegated to their private servers.

Then their code has to be open-source in case something happens to them, right?

Nope. Their source code is private. In other words, if their website is taken down by hacker/regulators, the entire exchange would…


After recent news of SEC taking on EtherDelta and probably other decentralized exchanges, we have to ask ourselves — how truly decentralized, are they?

Decentralization is a wide term and ranges from true decentralization, where smart contact on Ethereum neither can’t be changed neither can’t be stopped to some joke decentralization, like USDC, where owners of contract can pause, blacklist and swap entire contract with anything they want.

We are going to analyze EtherDelta Ethereum source code to give the precise picture of how truly decentralized EtherDelta and what options SEC and other law enforcement agencies have to control or shut down EtherDelta.

EtherDelta smart contract is present on EtherScan and only 312 lines of code. Moreover, it has classes like SafeMath, Token, StandardToken…


by Aleksey Shmatov

Coinbase adds its first stablecoin tied to the US Dollar. We have entered a new era of legitimate stablecoins. USDC issued by Circle, which is backed by Goldman Sachs. Making it as official and legal as it can be compared to shady Tether.

Contrary to Tether, which is implemented on Bitcoin’s Omni layer, USDC implements on Ethereum as an ERC-20 Token.

Written by centre.io USDC source code available on GitHub and has a decent documentation. The source code is verified on etherscan. Let’s take a look.

Proxy Contract

Original address points to the proxy contract, written by OpenZeppelin. Essentially it enables admin…


Update

On November 2nd MetaMask and other dapp browsers will stop exposing user accounts by default. This will make some code from this paper to break. I will publish updated version with web3 1.0 and new MetaMask interface.

Metamask is the de facto standard for dApps on the web. It injects a Web3 instance into a window object making it available for JavaScript code.

We are going to use Web3 0.20 version, not Web3 1.0. The code for Web3 1.0 would be different.

Every dApp has its mission, but the way they interact with Metamask is similar. …


You think your AWS or Digital Ocean bill for your website is killing you?

Hang on tight and you will be surprised.

Typical dApp

There is no such thing as typical dApp. dApps vary from games to decentralized exchanges. We are going to focus on such stats as monthly unique users and transactions per user per months. They are important to estimate costs to run dApp.

Only about 20 dApps have more than 1000 unique users per months. Let’s say your dApp is going to be one of successful and it is going to have 1000 users per month. On average active user makes 6 transactions per day. Let’s say for the sake of mental experiment…


Ethereum has ERC-20 token and EOS has EOSIO.Token. They serve the same purpose, but are they the same?

ERC-20 token is a de facto standard in Ethereum world. It is supported by all wallets, exchanges and applications. Yet, ERC-20 token is a standard, and there are a few different implementations with their own nuances.
EOSIO.Token is a standard for a token and concrete implementation at EOS blockchain. EOS token itself is a prime example of EOSIO.Token contract.

ERC-20 token standard defines the following interface:

name – Returns the name of the token - e.g. "MyToken". symbol – Returns the symbol of the token. E.g. "HIX". decimals – Returns the number of decimals the token uses - e.g. 8…


We are going to figure out what is EOS token and how you can create and deploy one yourself.

Photo by Aleksey Shmatov

What is EOS Token?

EOS contrary to Ethereum comes with the token smart contract out of the box. As Ethereum has ERC20 smart contract, EOS has eosio.token smart contract. Eosio.token smart contract allows you to create your own token by providing maximum supply and token’s literal, issue tokens to an account and transfer tokens between accounts. EOS tokens on EOS blockchain are issued using the same contract.

The `url` parameter specifies to witch node you connect. You can checkout more API endpoints on the official website.

Install Cleos

Cleos is a command line tool that interfaces with the REST API exposed by nodeos. We need…

Igor Yalovoy 🧙

Full Stack Blockchain Developer at Zeppelin | ylv.io

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