How Consensus Emerges in PoW Blockchains

(This article is a deep-dive into the the mechanics and incentives that make Ethereum work. There’s no code, but the logic is fairly thorough – blockchains are complicated!) Consensus mechanisms are tricky, with a lot of moving parts. How does proof-of-work “secure the network” in PoW blockchains? How is it that miners expending energy to …

How Libraries Work in Solidity

Libraries are special contracts in Solidity, which are repositories of reusable code available to other contracts. Libraries themselves are stateless – they do not have storage, as they’re designed to plug in to other contracts. We’ll use the fantastic standard contracts and libraries from OpenZeppelin to illustrate how libraries work. Use of Libraries in dApps DApp …

DeciMath – Efficient-Gas Fixed-Point Mathematics on Ethereum

Trustless computation on Ethereum is set to revolutionize multiple industries. Smart contracts written in Solidity open the doors to decentralized finance, immutable storage and programmable money – it’s an exciting time to build on ETH. However… challenges abound. Smart contract programming languages must balance expressiveness with security. Ethereum’s smart contract language, Solidity, deliberately omits certain …

How to Debug Your Code And Enjoy the Process

( This post is inspired by two fantastic books: “Think like a Computer Programmer” (Spraul), and “Debugging” (Agans). They’ve absolutely made me a better developer – I highly recommend them. ) For new developers, the most frustrating aspect of development is often when your application doesn’t do what you want it to do, and you don’t …

The What and Why of Ethereum

What is Ethereum, and why is it useful?   There are many technical explanations out there, but let’s do something novel and explain Ethereum simply. Ethereum is a distributed ledger and a distributed computer. It’s a record of ‘who owns what’, and a system of data storage and computation. Practically, Ethereum is a network protocol: …