blockchain smart contract best practices

Post on 22-Jan-2018

352 Views

Category:

Engineering

5 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Blockchain Smart Contract Best PracticesDavid Paluy@dpaluy

September 2017

Prepare for Failure

Failure Preparation Checklist

Keep it Simple

Pausable Contract

Manage the amount limit

Define upgrade path

Stay up to date

Keep it Simple

Simple Logic

Clarity over Performance

Modularize code

Pausable Contract

Manage the Amount limit

Can I upgrade the Contract?

NO, but...

Upgrade path

1. Contract is eternal, unless destroyed2. Make a workaround

Centralized?

DELEGATECALL

Read Solidity docs

a contract can dynamically load code from a different address at runtime...

Use latest stable libraries

Lock pragmas to specific compiler version

Explicitly mark visibility

Safe and Secure Coding!@dpaluy

top related