Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed broken link #1189

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion 08smart-contracts-vyper.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ vyper -f json ~/hello_world.v.py

((("compiling","protecting against overflow errors at the compiler level")))((("overflow","protecting against")))((("Vyper","overflow protection")))Overflow errors in software can be catastrophic when dealing with real value. For example, one http://bit.ly/2yHfvoF[transaction from mid-April 2018] shows the pass:[<span class="keep-together">malicious transfer of over 57,896,044,618,658,100,000,000,000,000,000,000,000,000,&thinsp;</span>]000,000,000,000,000,000 BEC tokens. This transaction was the result of an integer overflow issue in BeautyChain's ERC20 token contract (_BecToken.sol_). Solidity developers do have access to libraries like http://bit.ly/2ABhb4l[+SafeMath+] as well as Ethereum smart contract security analysis tools like http://bit.ly/2CQRoGU[Mythril OSS]. However, developers are not forced to use the safety tools. Put simply, if safety is not enforced by the language, developers can write unsafe code that will successfully compile and later on "successfully" execute.

Vyper has built-in overflow protection, implemented in a two-pronged approach. Firstly, Vyper provides http://bit.ly/2PuDfpB[a +SafeMath+ equivalent] that includes the necessary exception cases for integer arithmetic. Secondly, Vyper uses clamps whenever a literal constant is loaded, a value is passed to a function, or a variable is assigned. Clamps are implemented via custom functions in the Low-level Lisp-like Language (LLL) compiler, and cannot be disabled. (The Vyper compiler outputs LLL rather than EVM bytecode; this simplifies the development of Vyper itself.)
Vyper has built-in overflow protection, implemented in a two-pronged approach. Firstly, Vyper provides http://bit.ly/45tpbAj[a +SafeMath+ equivalent] that includes the necessary exception cases for integer arithmetic. Secondly, Vyper uses clamps whenever a literal constant is loaded, a value is passed to a function, or a variable is assigned. Clamps are implemented via custom functions in the Low-level Lisp-like Language (LLL) compiler, and cannot be disabled. (The Vyper compiler outputs LLL rather than EVM bytecode; this simplifies the development of Vyper itself.)


[[reading_and_writing_data_sec]]
Expand Down