Spotting issues in DeFi with dimensional analysis
Using dimensional analysis, you can categorically rule out a whole category of logic and arithmetic bugs that plague DeFi formulas. No code changes required, just better reasoning!
One of the first lessons in physics is learning to think in terms of dimensions. Physicists can often spot a flawed formula in seconds just by checking whether the dimen...
The article can be seen as a call to action for developers working with Solidity to adopt better practices for dimensional annotation. The authors argue that these practices would improve the safety and security of smart contracts, making them easier to review, audit, and modify.
However, the article does not address potential obstacles to widespread adoption of these practices, such as resistance from developers who may be used to less structured coding styles or concerns about the complexity o...
