Andreas Park PRO
Professor of Finance at UofT
Instructors: Andreas Park and Zissis Poulos
What's special about smart contracts?
features
consequences
Blockchain-based Decentralized Finance in a Nutshell
features
What the focus of this paper?
What is a smart contract/DeFi application?
some features
some examples
Here's the problem...
DeFi Security Risks
Risk is in every layer of the tech stack!
Known Smart Contract Vulnerabilities
https://consensys.github.io/smart-contract-best-practices/attacks/
What can we do to prevent exploit? What are common fault lines?
Three Examples of Exploits
Cream Finance
PBS attack
Balancer Rounding Error
Re-entrancy - The DAO hack
Re-entrancy - The DAO hack
fallback() with "evil" logic
The DAO
withdraw
send
receive() is missing!
It's happened before
Unprivileged Writes - The Parity Wallet hack
...
...
DeFi Exploits
Hacker remotely stole validator private keys
Bridge attack
Hacker minted WETH out of thin air on Solana's contract
Signatures were not verified! Bridge attack....hmmm
Smart Contract Scams
https://rekt.news/leaderboard/
total gain: 230,000%
Token Scams (not just scam tokens)
A word about tokens: What might token investors be concerned about?
Code-Audits?
What is so special about "auditing" smart contracts?
When do you do the review? Circumstances may matter
before launch
bad things have just happened to others
after launch
bad things happen to others
bad things happen to you
What kind of code review?
worry about
decentralized "bounty" program
code audit firm
high repuation (and pricey)
unknown (but cheap)
The cyber-attack \(-\) code-review problem
known
knowns
unknown
knowns
known
unknowns
unknown
unknowns
develop "processes"
get
outside
help
code review space
Some evidence on The Code Review Decision: "Auditing Smart Contracts" by Wayne Landsman, Evgeny Lyandres, Edward Maydew, Daniel Rabetti, Che Zhang (likely to be published in the Journal of Accounting and Economics)
Code Review Decision
Audit Effectiveness
Post-Breach Responses
Research Questions
1. Audit Demand
Main Findings Part 1: Audit Demand
Main Findings Part 2: Audit Effectiveness
Main Findings Part 3: Post Breach Effects
Solutions?
Some options
@financeUTM
andreas.park@rotman.utoronto.ca
slides.com/ap248
sites.google.com/site/parkandreas/
youtube.com/user/andreaspark2812/
By Andreas Park