smartbugs-curated/dataset/unchecked_low_level_calls
gsalzer ce3152215c
Update 0xec329ffc97d75fe03428ae155fc7793431487f63.sol
Fixing specification of admissible solc versions
2023-02-08 12:05:51 +00:00
..
0x0cbe050f75bc8f8c2d6c0d249fea125fd6e1acc9.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x3a0e9acd953ffc0dd18d63603488846a6b8b2b01.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x3e013fc32a54c4c5b6991ba539dcd0ec4355c859.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x3f2ef511aa6e75231e4deafc7a3d2ecab3741de2.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x4a66ad0bca2d700f11e1f2fc2c106f7d3264504c.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x4b71ad9c1a84b9b643aa54fdd66e2dec96e8b152.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x5aa88d2901c68fda244f1d0584400368d2c8e739.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x7a4349a749e59a5736efb7826ee3496a2dfd5489.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x7d09edb07d23acb532a82be3da5c17d9d85806b4.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x07f7ecb66d788ab01dc93b9b71a88401de7d0f2e.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x8fd1e427396ddb511533cf9abdbebd0a7e08da35.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x9d06cbafa865037a01d322d3f4222fa3e04e5488.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x19cf8481ea15427a98ba3cdd6d9e14690011ab10.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x39cfd754c85023648bf003bea2dd498c5612abfa.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x52d2e0f9b01101a59b38a3d05c80b7618aeed984.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x70f9eddb3931491aab1aeafbc1e7f1ca2a012db4.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x78c2a1e91b52bca4130b6ed9edd9fbcfd4671c37.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x84d9ec85c9c568eb332b7226a8f826d897e0a4a8.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x89c1b3807d4c67df034fffb62f3509561218d30b.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x627fa62ccbb1c1b04ffaecd72a53e37fc0e17839.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x663e4229142a27f00bafb5d087e1e730648314c3.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x806a6bd219f162442d992bdc4ee6eba1f2c5a707.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x958a8f594101d2c0485a52319f29b2647f2ebc06.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x2972d548497286d18e92b5fa1f8f9139e5653fd2.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x524960d55174d912768678d8c606b4d50b79d7b1.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x4051334adc52057aca763453820cb0e045076ef3.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0x610495793564aed0f9c7fc48dc4c7c9151d34fd6.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0xa1fceeff3acc57d257b917e30c4df661401d6431.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0xa46edd6a9a93feec36576ee5048146870ea2c3ae.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0xb7c5c5aa4d42967efe906e1b66cb8df9cebf04f7.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0xb11b2fed6c9354f7aa2f658d3b4d7b31d8a13b77.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0xb37f18af15bafb869a065b61fc83cfc44ed9cc27.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0xb0510d68f210b7db66e8c7c814f22680f2b8d1d6.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0xb620cee6b52f96f3c6b253e6eea556aa2d214a99.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0xbaa3de6504690efb064420d89e871c27065cdd52.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0xbebbfe5b549f5db6e6c78ca97cac19d1fb03082c.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0xd2018bfaa266a9ec0a1a84b061640faa009def76.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0xd5967fed03e85d1cce44cab284695b41bc675b5c.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0xdb1c55f6926e7d847ddf8678905ad871a68199d2.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0xe4eabdca81e31d9acbc4af76b30f532b6ed7f3bf.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0xe09b1ab8111c2729a76f16de96bc86a7af837928.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0xe82f0742a71a02b9e9ffc142fdcb6eb1ed06fb87.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0xe894d54dca59cb53fe9cbc5155093605c7068220.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0xec329ffc97d75fe03428ae155fc7793431487f63.sol Update 0xec329ffc97d75fe03428ae155fc7793431487f63.sol 2023-02-08 12:05:51 +00:00
0xf29ebe930a539a60279ace72c707cba851a57707.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0xf70d589d76eebdd7c12cc5eec99f8f6fa4233b9e.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
0xf2570186500a46986f3139f65afedc2afe4f445d.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
README.md Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
etherpot_lotto.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
king_of_the_ether_throne.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
lotto.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
mishandled.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00
unchecked_return_value.sol Add SB Curated (copied from the smartbugs repository). 2022-11-23 09:07:09 +00:00

README.md

Unchecked Low Level Calls

Also known as or related to silent failing sends, unchecked-send.

One of the deeper features of Solidity are the low level functions call(), callcode(), delegatecall() and send(). Their behavior in accounting for errors is quite different from other Solidity functions, as they will not propagate (or bubble up) and will not lead to a total reversion of the current execution. Instead, they will return a boolean value set to false, and the code will continue to run. This can surprise developers and, if the return value of such low-level calls are not checked, can lead to fail-opens and other unwanted outcomes. Remember, send can fail!

Examples

The following code is an example of what can go wrong when one forgets to check the return value of send(). If the call is used to send ether to a smart contract that does not accept them (e.g. because it does not have a payable fallback function), the EVM will replace its return value with false. Since the return value is not checked in our example, the function's changes to the contract state will not be reverted, and the etherLeft variable will end up tracking an incorrect value:

function withdraw(uint256 _amount) public {
	require(balances[msg.sender] >= _amount);
	balances[msg.sender] -= _amount;
	etherLeft -= _amount;
	msg.sender.send(_amount);
}

References

Taken from DASP TOP10