How to find edge cases with echidna

© Jarrod Calati/Shutterstock
© Jarrod Calati/Shutterstock
Oh, hi!

Coding Smart Contracts is not for the faint of heart.

Very recently, I participated in making the Yield Protocol go live. For those that haven’t heard of it, it is a fixed-rate borrowing and lending platform in Ethereum. It also implements mathematical formulas that are at the edge of what it is possible for a smart contract.

The Yield Protocol is also a deploy-and-forget platform. Once we went public we had no way of stopping users interacting with our software, and no way to fix any bugs in the core contracts.

We could go up like a rocket, and then explode. …

Unlocking Ethereum for the masses

Image for post
Image for post

Everyone talks about “gas-less” Ethereum transactions because no one likes paying for gas. But the Ethereum network runs precisely because transactions are paid for. Then, how can you have “gas-less” anything? What is this sorcery?

In this article, I’m going to show how to use the patterns behind “gas-less” transactions. You will discover that although there is no such thing as a free lunch in Ethereum, you can shift gas costs in interesting ways.

By applying the knowledge from this article, your users will save on gas, will enjoy a better UX, and even build novel delegation patterns into your smart contracts. …

How to make your smart contracts cooperate safely

Image for post
Image for post
Ready to deploy

All but the simplest of Ethereum applications are composed of several smart contracts. This is because of a hard limit of 24KB in any deployed contract, and because your sanity will slip away as the complexity of a smart contract grows.

Once you break down your code into manageable contracts you will certainly find that one contract has a function that should only be called by another contract.

For example, in Uniswap v2, only the contract factory is supposed to initialize a Uniswap Pair.

Image for post
Image for post
The simplest possible orchestration, they say so.

The Uniswap team solved their problem with a simple check, but wherever I look I find more examples of orchestration solutions being coded from scratch for each project. …


Alberto Cuesta Cañada

Blockchain Architect | Distributed and High Performance Computing Expert | Chaotic and Complex Systems Fanboy

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