All Posts Uncategorised

Proxy Libraries for Ethereum Smart Contracts

This article describes a proxy library approach. It allows for updateable Solidity (ethereum) smart contracts.

Usually smart contracts in blockchains are not updateable. This can be a problem, if the business logic needs to be updated. However with externaly called libraries this disadvantage can be fixed. The dowonside however is, that a smart contract can be altered after the deployment which creates a vulnerability to malpractice.

The design introduced by Zeppelin utilizes a main contract, a dispatcher contract, a dispatcher storage contract and the library contracts.

The main contract sends data via a delegate call to the dispatcher contract which forwards the request to the applicable library. The library takes the request and replies to the dispatcher by delegate call. The dispatcher fowards the answer to the main contract.