blockchain smart contract best practices
Post on 22-Jan-2018
352 Views
Preview:
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
References
Read the Manual
Solidity STD
Smart Contract Best Practices by ConsenSys
Safe and Secure Coding!@dpaluy
top related