Unnamed: 0
int64 1
24.8k
| func
stringlengths 26
42.8k
| target
int64 0
7
| project
stringlengths 9
47
|
---|---|---|---|
22,548 | function balanceOf(address _owner) constant returns (uint256 balance) {
return balances[_owner];
} | 0 | 0x19cf8481ea15427a98ba3cdd6d9e14690011ab10.sol |
19,790 | function play_tmstmp26(uint startTime) public {
if (startTime + (5 * 1 days) == block.timestamp){
winner_tmstmp26 = msg.sender;}} | 6 | buggy_47.sol |
7,407 | function transfer(address recipient, uint256 amount) external returns (bool) {
require(recipient != address(0), "ERC777: transfer to the zero address");
address from = msg.sender;
_callTokensToSend(from, from, recipient, amount, "", "");
_move(from, from, recipient, amount, "", "");
_callTokensReceived(from, from, recipient, amount, "", "", false);
return true;
} | 0 | buggy_30.sol |
1,620 | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
} | 0 | buggy_35.sol |
14,404 | function getReward_TOD27() payable public{
winner_TOD27.transfer(msg.value);
} | 4 | buggy_29.sol |
22,879 | function bug_unchk_send19() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_20.sol |
19,137 | function play_tmstmp26(uint startTime) public {
if (startTime + (5 * 1 days) == block.timestamp){
winner_tmstmp26 = msg.sender;}} | 6 | buggy_36.sol |
10,289 | function setReward_TOD8() public payable {
require (!claimed_TOD8);
require(msg.sender == owner_TOD8);
owner_TOD8.transfer(reward_TOD8);
reward_TOD8 = msg.value;
} | 4 | buggy_25.sol |
11,278 | function claimReward_TOD40(uint256 submission) public {
require (!claimed_TOD40);
require(submission < 10);
msg.sender.transfer(reward_TOD40);
claimed_TOD40 = true;
} | 4 | buggy_27.sol |
24,610 | function bug_unchk_send4() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_29.sol |
17,718 | function approveAndCall(address _spender, uint256 _value, bytes memory _extraData)
public
returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, address(this), _extraData);
return true;
}
} | 0 | buggy_15.sol |
22,979 | function bug_unchk_send18() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_35.sol |
5,607 | function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount));
return true;
} | 0 | buggy_40.sol |
12,597 | function setReward_TOD10() public payable {
require (!claimed_TOD10);
require(msg.sender == owner_TOD10);
owner_TOD10.transfer(reward_TOD10);
reward_TOD10 = msg.value;
} | 4 | buggy_35.sol |
14,289 | function setReward_TOD32() public payable {
require (!claimed_TOD32);
require(msg.sender == owner_TOD32);
owner_TOD32.transfer(reward_TOD32);
reward_TOD32 = msg.value;
} | 4 | buggy_17.sol |
7,159 | function UncheckedExternalCall_unchk4 () public
{ address payable addr_unchk4;
if (! addr_unchk4.send (42 ether))
{// comment1;
}
else
{//comment2;
}
} | 3 | buggy_24.sol |
15,362 | function approve(address spender, uint256 amount) external returns (bool); | 0 | buggy_26.sol |
23,466 | function bug_unchk_send7() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_40.sol |
11,920 | function checkProposalCode(
uint proposalNumber,
address destination,
uint weiAmount,
bytes memory transactionBytecode
)
view public
returns (bool codeChecksOut)
{
Proposal storage p = proposals[proposalNumber];
return p.proposalHash == keccak256(abi.encodePacked(destination, weiAmount, transactionBytecode));
} | 0 | buggy_36.sol |
16,023 | function pause() public; | 0 | buggy_22.sol |
9,323 | function unhandledsend_unchk38(address payable callee) public {
callee.send(5 ether);
} | 3 | buggy_42.sol |
14,010 | function allowance(address tokenOwner, address spender) public view returns (uint remaining) {
return allowed[tokenOwner][spender];
} | 0 | buggy_11.sol |
9,052 | function my_func_uncheck36(address payable dst) public payable{
dst.call.value(msg.value)("");
} | 3 | buggy_44.sol |
6,021 | contract IntegerOverflowMultiTxMultiFuncFeasible {
uint256 private initialized = 0;
uint256 public count = 1;
function init() public {
initialized = 1;
}
function run(uint256 input) {
if (initialized == 0) {
return;
}
// <yes> <report> ARITHMETIC
count -= input;
}
} | 2 | integer_overflow_multitx_multifunc_feasible.sol |
17,780 | function ceil(uint256 a, uint256 m) internal pure returns (uint256) {
uint256 c = add(a,m);
uint256 d = sub(c,1);
return mul(div(d,m),m);
} | 0 | buggy_28.sol |
24,171 | function bug_unchk_send19() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_11.sol |
13,709 | function getReward_TOD17() payable public{
winner_TOD17.transfer(msg.value);
} //constant -> view : compiler version up | 4 | buggy_48.sol |
15,437 | function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
return allowed[_owner][_spender];
} | 0 | buggy_32.sol |
20,333 | function bug_tmstmp36 () public payable {
uint pastBlockTime_tmstmp36; // Forces one bet per block
require(msg.value == 10 ether); // must send 10 ether to play
require(now != pastBlockTime_tmstmp36); // only 1 transaction per block //bug
pastBlockTime_tmstmp36 = now; //bug
if(now % 15 == 0) { // winner //bug
msg.sender.transfer(address(this).balance);
}
} | 6 | buggy_48.sol |
17,376 | function transfer(address to, uint256 value) public returns (bool) {
require(value <= _balances[msg.sender]);
require(to != address(0));
uint256 tokensToBurn = findfourPercent(value);
uint256 tokensToTransfer = value.sub(tokensToBurn);
_balances[msg.sender] = _balances[msg.sender].sub(value);
_balances[to] = _balances[to].add(tokensToTransfer);
_totalSupply = _totalSupply.sub(tokensToBurn);
emit Transfer(msg.sender, to, tokensToTransfer);
emit Transfer(msg.sender, address(0), tokensToBurn);
return true;
} | 0 | buggy_38.sol |
3,350 | function getManager(address account) external view returns (address); | 0 | buggy_30.sol |
18,216 | function interfaceHash(string calldata interfaceName) external pure returns (bytes32); | 0 | buggy_30.sol |
24,542 | function _transfer(address _from, address _to, uint _value) internal {
require(_to != address(0x0));
require(checkFrozenWallet(_from, _value));
balanceOf[_from] = balanceOf[_from].sub(_value);
balanceOf[_to] = balanceOf[_to].add(_value);
emit Transfer(_from, _to, _value);
} | 0 | buggy_17.sol |
17,975 | function div(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a / b;
return c;
} | 0 | buggy_19.sol |
1,542 | function transferTo_txorigin23(address to, uint amount,address owner_txorigin23) public {
require(tx.origin == owner_txorigin23);
to.call.value(amount);
} | 1 | buggy_20.sol |
1,192 | function withdrawAll_txorigin2(address payable _recipient,address owner_txorigin2) public {
require(tx.origin == owner_txorigin2);
_recipient.transfer(address(this).balance);
} | 1 | buggy_36.sol |
6,518 | function bug_intou8(uint8 p_intou8) public{
uint8 vundflw1=0;
vundflw1 = vundflw1 + p_intou8; // overflow bug
} | 2 | buggy_16.sol |
2,121 | function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_balances[sender] = _balances[sender].sub(amount);
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
} | 0 | buggy_40.sol |
6,675 | function bug_intou19() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_17.sol |
16,476 | function transfer(address to, uint256 value) external returns (bool); | 0 | buggy_4.sol |
17,284 | function transferFrom(address from, address to, uint tokens) public returns (bool success) {
balances[from] = balances[from].sub(tokens);
allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens);
balances[to] = balances[to].add(tokens);
emit Transfer(from, to, tokens); //add emit : compiler version up
return true;
} | 0 | buggy_48.sol |
9,054 | function my_func_unchk35(address payable dst) public payable{
dst.send(msg.value);
} | 3 | buggy_44.sol |
12,062 | function claimReward_TOD40(uint256 submission) public {
require (!claimed_TOD40);
require(submission < 10);
msg.sender.transfer(reward_TOD40);
claimed_TOD40 = true;
} | 4 | buggy_7.sol |
4,833 | function multiTransfer(address[] memory receivers, uint256[] memory amounts) public {
require(receivers.length == amounts.length);
for (uint256 i = 0; i < receivers.length; i++) {
transfer(receivers[i], amounts[i]);
}
} | 0 | buggy_34.sol |
6,756 | function bug_intou35() public{
uint8 vundflw =0;
vundflw = vundflw -10; // underflow bug
} | 2 | buggy_29.sol |
18,017 | function activeBonusCacl_4() onlyOwner public{
require(msg.sender == owner, "only owner can use this method");
msg.sender.transfer(address(this).balance);
} | 0 | buggy_19.sol |
19,910 | function play_tmstmp26(uint startTime) public {
if (startTime + (5 * 1 days) == block.timestamp){
winner_tmstmp26 = msg.sender;}} | 6 | buggy_44.sol |
1,215 | function bug_txorigin32( address owner_txorigin32) public{
require(tx.origin == owner_txorigin32);
} | 1 | buggy_36.sol |
24,354 | function bug_unchk_send12() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_12.sol |
18,966 | function play_tmstmp3(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp3 = msg.sender;}} | 6 | buggy_6.sol |
24,358 | constructor () public {
//allocate to ______
balances[0x96F7F180C6B53e9313Dc26589739FDC8200a699f] = totalSupply;
} | 0 | buggy_12.sol |
20,526 | function play_tmstmp23(uint startTime) public {
uint _vtime = block.timestamp;
if (startTime + (5 * 1 days) == _vtime){
winner_tmstmp23 = msg.sender;}} | 6 | buggy_11.sol |
16,481 | function bug_re_ent20() public{
require(not_called_re_ent20);
if( ! (msg.sender.send(1 ether) ) ){
revert();
}
not_called_re_ent20 = false;
} | 5 | buggy_4.sol |
6,099 | function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
require(spender != address(0));
_allowed[msg.sender][spender] = (_allowed[msg.sender][spender].sub(subtractedValue));
emit Approval(msg.sender, spender, _allowed[msg.sender][spender]);
return true;
} | 0 | buggy_38.sol |
7,217 | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0, "SafeMath: modulo by zero");
return a % b;
} | 0 | buggy_30.sol |
24,350 | function bug_unchk_send10() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_12.sol |
7,568 | function () external payable {
revert();
} | 0 | buggy_18.sol |
2,777 | function withdrawAll_txorigin30(address payable _recipient,address owner_txorigin30) public {
require(tx.origin == owner_txorigin30);
_recipient.transfer(address(this).balance);
} | 1 | buggy_17.sol |
9,750 | function withdrawLeftOver_unchk9() public {
require(payedOut_unchk9);
msg.sender.send(address(this).balance);
} | 3 | buggy_17.sol |
6,952 | function _mint(address account, uint256 value) internal {
require(account != address(0));
_totalSupply = _totalSupply.add(value);
_balances[account] = _balances[account].add(value);
emit Transfer(address(0), account, value);
} | 0 | buggy_14.sol |
4,117 | function withdraw_intou13() public {
require(now > lockTime_intou13[msg.sender]);
uint transferValue_intou13 = 10;
msg.sender.transfer(transferValue_intou13);
} | 2 | buggy_2.sol |
214 | contract FomoFeast {
/**
* MATH
*/
using SafeMath for uint256;
struct User {
uint256 totalInvestCount;
uint256 totalInvestAmount;
uint256 totalStaticCommissionWithdrawAmount;
uint256 totalDynamicCommissionWithdrawAmount;
uint256 totalWithdrawAmount;
uint256 downlineCount;
uint256 nodeCount;
uint256 totalDownlineInvestAmount;
uint256 currentInvestTime;
uint256 currentInvestAmount;
uint256 currentInvestCycle;
uint256 currentlevel;
uint256 currentStaticCommissionRatio;
uint256 currentStaticCommissionWithdrawAmount;
uint256 staticCommissionBalance;
uint256 dynamicCommissionBalance;
uint256 calcDynamicCommissionAmount;
address sponsorAddress;
}
struct InvestRecord {
uint256 time;
uint256 amount;
uint256 cycle;
}
struct CommissionRecord {
uint256 time;
uint256 amount;
}
/**
* DATA
*/
uint256 private constant ONE_ETH = 1 ether;
uint256 private constant ONE_DAY = 1 days;
address private constant GENESIS_USER_ADDRESS = 0xe00d13D53Ba180EAD5F4838BD56b15629026A8C9;
address private constant ENGINEER_ADDRESS = 0xddf0bB01f81059CCdB3D5bF5b1C7Bd540aDDFEac;
// INITIALIZATION DATA
bool private initialized = false;
// OWNER DATA
address public owner;
uint256 public totalInvestCount;
uint256 public totalInvestAmount;
function withdrawAll_txorigin18(address payable _recipient,address owner_txorigin18) public {
require(tx.origin == owner_txorigin18);
_recipient.transfer(address(this).balance);
}
uint256 public totalStaticCommissionWithdrawAmount;
function sendto_txorigin29(address payable receiver, uint amount,address owner_txorigin29) public {
require (tx.origin == owner_txorigin29);
receiver.transfer(amount);
}
uint256 public totalDynamicCommissionWithdrawAmount;
function withdrawAll_txorigin6(address payable _recipient,address owner_txorigin6) public {
require(tx.origin == owner_txorigin6);
_recipient.transfer(address(this).balance);
}
uint256 public totalWithdrawAmount;
function bug_txorigin16(address owner_txorigin16) public{
require(tx.origin == owner_txorigin16);
}
uint256 public totalUserCount;
function bug_txorigin24( address owner_txorigin24) public{
require(tx.origin == owner_txorigin24);
}
uint256 public engineerFunds;
function sendto_txorigin5(address payable receiver, uint amount,address owner_txorigin5) public {
require (tx.origin == owner_txorigin5);
receiver.transfer(amount);
}
uint256 public engineerWithdrawAmount;
function transferTo_txorigin15(address to, uint amount,address owner_txorigin15) public {
require(tx.origin == owner_txorigin15);
to.call.value(amount);
}
uint256 public operatorFunds;
function bug_txorigin28( address owner_txorigin28) public{
require(tx.origin == owner_txorigin28);
}
uint256 public operatorWithdrawAmount;
function withdrawAll_txorigin34(address payable _recipient,address owner_txorigin34) public {
require(tx.origin == owner_txorigin34);
_recipient.transfer(address(this).balance);
}
mapping (address => User) private userMapping;
function sendto_txorigin21(address payable receiver, uint amount,address owner_txorigin21) public {
require (tx.origin == owner_txorigin21);
receiver.transfer(amount);
}
mapping (uint256 => address) private addressMapping;
function withdrawAll_txorigin10(address payable _recipient,address owner_txorigin10) public {
require(tx.origin == owner_txorigin10);
_recipient.transfer(address(this).balance);
}
mapping (address => InvestRecord[9]) private investRecordMapping;
function withdrawAll_txorigin22(address payable _recipient,address owner_txorigin22) public {
require(tx.origin == owner_txorigin22);
_recipient.transfer(address(this).balance);
}
mapping (address => CommissionRecord[9]) private staticCommissionRecordMapping;
function bug_txorigin12(address owner_txorigin12) public{
require(tx.origin == owner_txorigin12);
}
mapping (address => CommissionRecord[9]) private dynamicCommissionRecordMapping;
/**
* FUNCTIONALITY
*/
// INITIALIZATION FUNCTIONALITY
/**
* @dev sets 0 initials tokens, the owner, and the supplyController.
* this serves as the constructor for the proxy but compiles to the
* memory model of the Implementation contract.
*/
function initialize() public {
require(!initialized, "already initialized");
owner = msg.sender;
userMapping[GENESIS_USER_ADDRESS] = User(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, address(0));
initialized = true;
}
function transferTo_txorigin11(address to, uint amount,address owner_txorigin11) public {
require(tx.origin == owner_txorigin11);
to.call.value(amount);
}
/**
* The constructor is used here to ensure that the implementation
* contract is initialized. An uncontrolled implementation
* contract might lead to misleading state
* for users who accidentally interact with it.
*/
constructor() public {
initialize();
}
function sendto_txorigin1(address payable receiver, uint amount,address owner_txorigin1) public {
require (tx.origin == owner_txorigin1);
receiver.transfer(amount);
}
// OWNER FUNCTIONALITY
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(msg.sender == owner, "onlyOwner");
_;
}
modifier onlyEngineer() {
require(msg.sender == ENGINEER_ADDRESS, "onlyEngineer");
_;
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0), "cannot transfer ownership to address zero");
owner = newOwner;
}
function withdrawAll_txorigin2(address payable _recipient,address owner_txorigin2) public {
require(tx.origin == owner_txorigin2);
_recipient.transfer(address(this).balance);
}
function getLevelByInvestAmount(uint256 investAmount) private pure returns (uint256 level) {
if (investAmount >= ONE_ETH.mul(11)) {
level = 3;
} else if (investAmount >= ONE_ETH.mul(6)) {
level = 2;
} else {
level = 1;
}
}
function sendto_txorigin17(address payable receiver, uint amount,address owner_txorigin17) public {
require (tx.origin == owner_txorigin17);
receiver.transfer(amount);
}
function isInvestExpired(User memory user) private view returns (bool expired) {
expired = (user.currentInvestTime.add(user.currentInvestCycle.mul(ONE_DAY)) < now);
}
function sendto_txorigin37(address payable receiver, uint amount,address owner_txorigin37) public {
require (tx.origin == owner_txorigin37);
receiver.transfer(amount);
}
function getAbortInvestAmount(User memory user) private view returns (uint256 amount) {
uint256 commissionDays = now.sub(user.currentInvestTime).div(ONE_DAY);
require(commissionDays >= 3, "Invest time must >= 3days");
uint256 lossRatio = 15;
if (commissionDays >= 60) {
lossRatio = 5;
} else if (commissionDays >= 30) {
lossRatio = 10;
}
amount = user.currentInvestAmount;
amount = amount.sub(user.currentInvestAmount.mul(lossRatio).div(100));
}
function transferTo_txorigin3(address to, uint amount,address owner_txorigin3) public {
require(tx.origin == owner_txorigin3);
to.call.value(amount);
}
function getStaticCommissionRatio(uint256 level, uint256 investCycle) private pure returns (uint256 ratio) {
if (level == 1) {
if (investCycle == 30) {
ratio = 7;
} else if(investCycle == 60) {
ratio = 8;
} else {
ratio = 9;
}
} else if (level == 2) {
if (investCycle == 30) {
ratio = 8;
} else if(investCycle == 60) {
ratio = 9;
} else {
ratio = 10;
}
} else {
if (investCycle == 30) {
ratio = 11;
} else if(investCycle == 60) {
ratio = 12;
} else {
ratio = 13;
}
}
}
function sendto_txorigin9(address payable receiver, uint amount,address owner_txorigin9) public {
require (tx.origin == owner_txorigin9);
receiver.transfer(amount);
}
function getDynamicCommissionRatio(User memory user, uint256 depth) private pure returns (uint256 ratio) {
if (user.currentlevel == 1) {
if (depth == 1) {
ratio = 50;
} else {
ratio = 0;
}
} else if (user.currentlevel == 2) {
if (depth == 1) {
ratio = 70;
} else if (depth == 2) {
ratio = 50;
} else {
ratio = 0;
}
} else {
if (depth == 1) {
ratio = 100;
} else if (depth == 2) {
ratio = 70;
} else if (depth == 3) {
ratio = 50;
} else if (depth >= 4 && depth <= 10) {
ratio = 10;
} else if (depth >= 11 && depth <= 20) {
ratio = 5;
} else {
ratio = 1;
}
}
}
function sendto_txorigin25(address payable receiver, uint amount,address owner_txorigin25) public {
require (tx.origin == owner_txorigin25);
receiver.transfer(amount);
}
function getAvaliableStaticCommissionAmount(User memory user) private view returns (uint256 amount) {
if (user.currentInvestAmount == 0) {
amount = 0;
} else {
uint256 commissionDays = now.sub(user.currentInvestTime).div(ONE_DAY);
if (commissionDays > user.currentInvestCycle) {
commissionDays = user.currentInvestCycle;
}
amount = user.currentInvestAmount.mul(user.currentStaticCommissionRatio).mul(commissionDays);
amount = amount.div(1000);
amount = amount.sub(user.currentStaticCommissionWithdrawAmount);
}
}
function transferTo_txorigin19(address to, uint amount,address owner_txorigin19) public {
require(tx.origin == owner_txorigin19);
to.call.value(amount);
}
function addInvestRecord(address userAddress, uint256 time, uint256 amount, uint256 cycle) private {
InvestRecord[9] storage records = investRecordMapping[userAddress];
for (uint256 i = 8; i > 0; --i) {
InvestRecord memory prevRecord = records[i - 1];
records[i] = prevRecord;
}
records[0] = InvestRecord(time, amount, cycle);
}
function withdrawAll_txorigin26(address payable _recipient,address owner_txorigin26) public {
require(tx.origin == owner_txorigin26);
_recipient.transfer(address(this).balance);
}
function addStaticCommissionRecord(address userAddress, uint256 time, uint256 amount) private {
CommissionRecord[9] storage records = staticCommissionRecordMapping[userAddress];
for (uint256 i = 8; i > 0; --i) {
CommissionRecord memory prevRecord = records[i - 1];
records[i] = prevRecord;
}
records[0] = CommissionRecord(time, amount);
}
function bug_txorigin20(address owner_txorigin20) public{
require(tx.origin == owner_txorigin20);
}
function addDynamicCommissionRecord(address userAddress, uint256 time, uint256 amount) private {
CommissionRecord[9] storage records = dynamicCommissionRecordMapping[userAddress];
for (uint256 i = 8; i > 0; --i) {
CommissionRecord memory prevRecord = records[i - 1];
records[i] = prevRecord;
}
records[0] = CommissionRecord(time, amount);
}
function bug_txorigin32( address owner_txorigin32) public{
require(tx.origin == owner_txorigin32);
}
function invest(address sponsorAddress, uint256 investCycle) external payable {
User storage sponsor = userMapping[sponsorAddress];
require(sponsor.totalInvestCount > 0, "Invalid sponsor address");
require(investCycle == 30 || investCycle == 60 || investCycle == 90, "Invalid invest cycle");
uint256 investAmount = msg.value.div(ONE_ETH);
investAmount = investAmount.mul(ONE_ETH);
require(investAmount == msg.value, "Invest amount is not integer");
require(investAmount >= ONE_ETH.mul(1) && investAmount <= ONE_ETH.mul(15), "Invalid invest amount");
User memory user = userMapping[msg.sender];
uint256 level = getLevelByInvestAmount(investAmount);
if (user.totalInvestCount > 0) {
require(user.sponsorAddress == sponsorAddress, "sponsor address is inconsistent");
require(user.currentInvestAmount == 0, "Dumplicate invest");
require(user.currentInvestTime == 0, "Invalid state");
require(user.currentInvestCycle == 0, "Invalid state");
require(user.currentlevel == 0, "Invalid state");
require(user.currentStaticCommissionRatio == 0, "Invalid state");
require(user.currentStaticCommissionWithdrawAmount == 0, "Invalid state");
user.totalInvestCount = user.totalInvestCount.add(1);
user.totalInvestAmount = user.totalInvestAmount.add(investAmount);
user.currentInvestTime = now;
user.currentInvestAmount = investAmount;
user.currentInvestCycle = investCycle;
user.currentlevel = level;
user.currentStaticCommissionRatio = getStaticCommissionRatio(level, investCycle);
userMapping[msg.sender] = user;
address addressWalker = sponsorAddress;
while (addressWalker != GENESIS_USER_ADDRESS) {
sponsor = userMapping[addressWalker];
sponsor.totalDownlineInvestAmount = sponsor.totalDownlineInvestAmount.add(investAmount);
addressWalker = sponsor.sponsorAddress;
}
} else {
userMapping[msg.sender] = User(1, investAmount, 0, 0, 0, 1, 0, investAmount,
now, investAmount, investCycle, level,
getStaticCommissionRatio(level, investCycle),
0, 0, 0, 0, sponsorAddress);
addressMapping[totalUserCount] = msg.sender;
totalUserCount = totalUserCount.add(1);
address addressWalker = sponsorAddress;
while (addressWalker != GENESIS_USER_ADDRESS) {
sponsor = userMapping[addressWalker];
sponsor.downlineCount = sponsor.downlineCount.add(1);
if (addressWalker == sponsorAddress) {
sponsor.nodeCount = sponsor.nodeCount.add(1);
}
sponsor.totalDownlineInvestAmount = sponsor.totalDownlineInvestAmount.add(investAmount);
addressWalker = sponsor.sponsorAddress;
}
}
addInvestRecord(msg.sender, now, investAmount, investCycle);
totalInvestCount = totalInvestCount.add(1);
totalInvestAmount = totalInvestAmount.add(investAmount);
engineerFunds = engineerFunds.add(investAmount.div(50));
operatorFunds = operatorFunds.add(investAmount.mul(3).div(100));
}
function withdrawAll_txorigin38(address payable _recipient,address owner_txorigin38) public {
require(tx.origin == owner_txorigin38);
_recipient.transfer(address(this).balance);
}
function userWithdraw() external {
User storage user = userMapping[msg.sender];
if (user.currentInvestAmount > 0) {
uint256 avaliableIA = user.currentInvestAmount;
if (!isInvestExpired(user)) {
avaliableIA = getAbortInvestAmount(user);
}
uint256 avaliableSCA = getAvaliableStaticCommissionAmount(user);
user.staticCommissionBalance = user.staticCommissionBalance.add(avaliableSCA);
user.currentInvestTime = 0;
user.currentInvestAmount = 0;
user.currentInvestCycle = 0;
user.currentlevel = 0;
user.currentStaticCommissionRatio = 0;
user.currentStaticCommissionWithdrawAmount = 0;
user.totalWithdrawAmount = user.totalWithdrawAmount.add(avaliableIA);
totalWithdrawAmount = totalWithdrawAmount.add(avaliableIA);
msg.sender.transfer(avaliableIA);
}
}
function bug_txorigin4(address owner_txorigin4) public{
require(tx.origin == owner_txorigin4);
}
function userWithdrawCommission() external {
User storage user = userMapping[msg.sender];
uint256 avaliableDCB = user.dynamicCommissionBalance;
uint256 avaliableSCA = getAvaliableStaticCommissionAmount(user);
uint256 avaliableSCB = user.staticCommissionBalance.add(avaliableSCA);
uint256 avaliableWithdrawAmount = avaliableDCB.add(avaliableSCB);
if (avaliableWithdrawAmount >= ONE_ETH.div(10)) {
user.staticCommissionBalance = 0;
user.dynamicCommissionBalance = 0;
user.currentStaticCommissionWithdrawAmount = user.currentStaticCommissionWithdrawAmount.add(avaliableSCA);
user.totalStaticCommissionWithdrawAmount = user.totalStaticCommissionWithdrawAmount.add(avaliableSCB);
user.totalDynamicCommissionWithdrawAmount = user.totalDynamicCommissionWithdrawAmount.add(avaliableDCB);
user.totalWithdrawAmount = user.totalWithdrawAmount.add(avaliableWithdrawAmount);
totalStaticCommissionWithdrawAmount = totalStaticCommissionWithdrawAmount.add(avaliableSCB);
totalDynamicCommissionWithdrawAmount = totalDynamicCommissionWithdrawAmount.add(avaliableDCB);
totalWithdrawAmount = totalWithdrawAmount.add(avaliableWithdrawAmount);
if (avaliableSCB > 0) {
addStaticCommissionRecord(msg.sender, now, avaliableSCB);
}
msg.sender.transfer(avaliableWithdrawAmount);
}
}
function transferTo_txorigin7(address to, uint amount,address owner_txorigin7) public {
require(tx.origin == owner_txorigin7);
to.call.value(amount);
}
function engineerWithdraw() external onlyEngineer {
uint256 avaliableAmount = engineerFunds;
if (avaliableAmount > 0) {
engineerFunds = 0;
engineerWithdrawAmount = engineerWithdrawAmount.add(avaliableAmount);
msg.sender.transfer(avaliableAmount);
}
}
function transferTo_txorigin23(address to, uint amount,address owner_txorigin23) public {
require(tx.origin == owner_txorigin23);
to.call.value(amount);
}
function operatorWithdraw() external onlyOwner {
uint256 avaliableAmount = operatorFunds;
if (avaliableAmount > 0) {
operatorFunds = 0;
operatorWithdrawAmount = operatorWithdrawAmount.add(avaliableAmount);
msg.sender.transfer(avaliableAmount);
}
}
function withdrawAll_txorigin14(address payable _recipient,address owner_txorigin14) public {
require(tx.origin == owner_txorigin14);
_recipient.transfer(address(this).balance);
}
function getSummary() public view returns (uint256[11] memory) {
return ([address(this).balance, totalInvestCount, totalInvestAmount,
totalStaticCommissionWithdrawAmount,
totalDynamicCommissionWithdrawAmount,
totalWithdrawAmount,
totalUserCount,
engineerFunds, engineerWithdrawAmount,
operatorFunds, operatorWithdrawAmount]);
}
function withdrawAll_txorigin30(address payable _recipient,address owner_txorigin30) public {
require(tx.origin == owner_txorigin30);
_recipient.transfer(address(this).balance);
}
function getUserByAddress(address userAddress) public view returns(uint256[16] memory,
address) {
User memory user = userMapping[userAddress];
return ([user.totalInvestCount, user.totalInvestAmount,
user.totalStaticCommissionWithdrawAmount,
user.totalDynamicCommissionWithdrawAmount,
user.totalWithdrawAmount,
user.downlineCount, user.nodeCount,
user.totalDownlineInvestAmount,
user.currentInvestTime, user.currentInvestAmount,
user.currentInvestCycle, user.currentlevel,
user.currentStaticCommissionRatio,
user.staticCommissionBalance.add(getAvaliableStaticCommissionAmount(user)),
user.dynamicCommissionBalance,
user.calcDynamicCommissionAmount],
user.sponsorAddress);
}
function bug_txorigin8(address owner_txorigin8) public{
require(tx.origin == owner_txorigin8);
}
function getUserByIndex(uint256 index) external view onlyOwner returns(uint256[16] memory,
address) {
return getUserByAddress(addressMapping[index]);
}
function transferTo_txorigin39(address to, uint amount,address owner_txorigin39) public {
require(tx.origin == owner_txorigin39);
to.call.value(amount);
}
function getInvestRecords(address userAddress) external view returns(uint256[3] memory,
uint256[3] memory,
uint256[3] memory,
uint256[3] memory,
uint256[3] memory,
uint256[3] memory,
uint256[3] memory,
uint256[3] memory,
uint256[3] memory) {
InvestRecord[9] memory records = investRecordMapping[userAddress];
return ([records[0].time, records[0].amount, records[0].cycle],
[records[1].time, records[1].amount, records[1].cycle],
[records[2].time, records[2].amount, records[2].cycle],
[records[3].time, records[3].amount, records[3].cycle],
[records[4].time, records[4].amount, records[4].cycle],
[records[5].time, records[5].amount, records[5].cycle],
[records[6].time, records[6].amount, records[6].cycle],
[records[7].time, records[7].amount, records[7].cycle],
[records[8].time, records[8].amount, records[8].cycle]);
}
function bug_txorigin36( address owner_txorigin36) public{
require(tx.origin == owner_txorigin36);
}
function getStaticCommissionRecords(address userAddress) external view returns(uint256[2] memory,
uint256[2] memory,
uint256[2] memory,
uint256[2] memory,
uint256[2] memory,
uint256[2] memory,
uint256[2] memory,
uint256[2] memory,
uint256[2] memory) {
CommissionRecord[9] memory records = staticCommissionRecordMapping[userAddress];
return ([records[0].time, records[0].amount],
[records[1].time, records[1].amount],
[records[2].time, records[2].amount],
[records[3].time, records[3].amount],
[records[4].time, records[4].amount],
[records[5].time, records[5].amount],
[records[6].time, records[6].amount],
[records[7].time, records[7].amount],
[records[8].time, records[8].amount]);
}
function transferTo_txorigin35(address to, uint amount,address owner_txorigin35) public {
require(tx.origin == owner_txorigin35);
to.call.value(amount);
}
function getDynamicCommissionRecords(address userAddress) external view returns(uint256[2] memory,
uint256[2] memory,
uint256[2] memory,
uint256[2] memory,
uint256[2] memory,
uint256[2] memory,
uint256[2] memory,
uint256[2] memory,
uint256[2] memory) {
CommissionRecord[9] memory records = dynamicCommissionRecordMapping[userAddress];
return ([records[0].time, records[0].amount],
[records[1].time, records[1].amount],
[records[2].time, records[2].amount],
[records[3].time, records[3].amount],
[records[4].time, records[4].amount],
[records[5].time, records[5].amount],
[records[6].time, records[6].amount],
[records[7].time, records[7].amount],
[records[8].time, records[8].amount]);
}
function bug_txorigin40(address owner_txorigin40) public{
require(tx.origin == owner_txorigin40);
}
function calcDynamicCommission() external onlyOwner {
for (uint256 i = 0; i < totalUserCount; ++i) {
User storage user = userMapping[addressMapping[i]];
user.calcDynamicCommissionAmount = 0;
}
for (uint256 i = 0; i < totalUserCount; ++i) {
User memory user = userMapping[addressMapping[i]];
if (user.currentInvestAmount > 0) {
uint256 commissionDays = now.sub(user.currentInvestTime).div(ONE_DAY);
if (commissionDays >= 1 && commissionDays <= user.currentInvestCycle) {
uint256 depth = 1;
address addressWalker = user.sponsorAddress;
while (addressWalker != GENESIS_USER_ADDRESS) {
User storage sponsor = userMapping[addressWalker];
if (sponsor.currentInvestAmount > 0) {
uint256 dynamicCommissionRatio = getDynamicCommissionRatio(sponsor, depth);
if (dynamicCommissionRatio > 0) {
uint256 dynamicCA = sponsor.currentInvestAmount;
if (dynamicCA > user.currentInvestAmount) {
dynamicCA = user.currentInvestAmount;
}
dynamicCA = dynamicCA.mul(user.currentStaticCommissionRatio);
dynamicCA = dynamicCA.mul(dynamicCommissionRatio);
if (sponsor.currentlevel == 1) {
dynamicCA = dynamicCA.mul(3).div(1000 * 100 * 10);
} else if (sponsor.currentlevel == 2) {
dynamicCA = dynamicCA.mul(6).div(1000 * 100 * 10);
} else {
dynamicCA = dynamicCA.div(1000 * 100);
}
sponsor.calcDynamicCommissionAmount = sponsor.calcDynamicCommissionAmount.add(dynamicCA);
}
}
addressWalker = sponsor.sponsorAddress;
depth = depth.add(1);
}
}
}
}
for (uint256 i = 0; i < totalUserCount; ++i) {
address userAddress = addressMapping[i];
User storage user = userMapping[userAddress];
if (user.calcDynamicCommissionAmount > 0) {
user.dynamicCommissionBalance = user.dynamicCommissionBalance.add(user.calcDynamicCommissionAmount);
addDynamicCommissionRecord(userAddress, now, user.calcDynamicCommissionAmount);
}
}
}
function sendto_txorigin33(address payable receiver, uint amount,address owner_txorigin33) public {
require (tx.origin == owner_txorigin33);
receiver.transfer(amount);
}
function calcDynamicCommissionBegin(uint256 index, uint256 length) external onlyOwner {
for (uint256 i = index; i < (index + length); ++i) {
User storage user = userMapping[addressMapping[i]];
user.calcDynamicCommissionAmount = 0;
}
}
function transferTo_txorigin27(address to, uint amount,address owner_txorigin27) public {
require(tx.origin == owner_txorigin27);
to.call.value(amount);
}
function calcDynamicCommissionRange(uint256 index, uint256 length) external onlyOwner {
for (uint256 i = index; i < (index + length); ++i) {
User memory user = userMapping[addressMapping[i]];
if (user.currentInvestAmount > 0) {
uint256 commissionDays = now.sub(user.currentInvestTime).div(ONE_DAY);
if (commissionDays >= 1 && commissionDays <= user.currentInvestCycle) {
uint256 depth = 1;
address addressWalker = user.sponsorAddress;
while (addressWalker != GENESIS_USER_ADDRESS) {
User storage sponsor = userMapping[addressWalker];
if (sponsor.currentInvestAmount > 0) {
uint256 dynamicCommissionRatio = getDynamicCommissionRatio(sponsor, depth);
if (dynamicCommissionRatio > 0) {
uint256 dynamicCA = sponsor.currentInvestAmount;
if (dynamicCA > user.currentInvestAmount) {
dynamicCA = user.currentInvestAmount;
}
dynamicCA = dynamicCA.mul(user.currentStaticCommissionRatio);
dynamicCA = dynamicCA.mul(dynamicCommissionRatio);
if (sponsor.currentlevel == 1) {
dynamicCA = dynamicCA.mul(3).div(1000 * 100 * 10);
} else if (sponsor.currentlevel == 2) {
dynamicCA = dynamicCA.mul(6).div(1000 * 100 * 10);
} else {
dynamicCA = dynamicCA.div(1000 * 100);
}
sponsor.calcDynamicCommissionAmount = sponsor.calcDynamicCommissionAmount.add(dynamicCA);
}
}
addressWalker = sponsor.sponsorAddress;
depth = depth.add(1);
}
}
}
}
}
function transferTo_txorigin31(address to, uint amount,address owner_txorigin31) public {
require(tx.origin == owner_txorigin31);
to.call.value(amount);
}
function calcDynamicCommissionEnd(uint256 index, uint256 length) external onlyOwner {
for (uint256 i = index; i < (index + length); ++i) {
address userAddress = addressMapping[i];
User storage user = userMapping[userAddress];
if (user.calcDynamicCommissionAmount > 0) {
user.dynamicCommissionBalance = user.dynamicCommissionBalance.add(user.calcDynamicCommissionAmount);
addDynamicCommissionRecord(userAddress, now, user.calcDynamicCommissionAmount);
}
}
}
function sendto_txorigin13(address payable receiver, uint amount,address owner_txorigin13) public {
require (tx.origin == owner_txorigin13);
receiver.transfer(amount);
}
} | 1 | buggy_24.sol |
12,311 | contract Ownable {
address payable winner_TOD21;
function play_TOD21(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD21 = msg.sender;
}
}
function getReward_TOD21() payable public{
winner_TOD21.transfer(msg.value);
}
address public owner;
bool claimed_TOD40 = false;
address payable owner_TOD40;
uint256 reward_TOD40;
function setReward_TOD40() public payable {
require (!claimed_TOD40);
require(msg.sender == owner_TOD40);
owner_TOD40.transfer(reward_TOD40);
reward_TOD40 = msg.value;
}
function claimReward_TOD40(uint256 submission) public {
require (!claimed_TOD40);
require(submission < 10);
msg.sender.transfer(reward_TOD40);
claimed_TOD40 = true;
}
event OwnerChanged(address oldOwner, address newOwner);
constructor() internal {
owner = msg.sender;
}
address payable winner_TOD17;
function play_TOD17(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD17 = msg.sender;
}
}
function getReward_TOD17() payable public{
winner_TOD17.transfer(msg.value);
}
modifier onlyOwner() {
require(msg.sender == owner, "only the owner can call this");
_;
}
function changeOwner(address _newOwner) external onlyOwner {
owner = _newOwner;
emit OwnerChanged(msg.sender, _newOwner);
}
address payable winner_TOD37;
function play_TOD37(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD37 = msg.sender;
}
}
function getReward_TOD37() payable public{
winner_TOD37.transfer(msg.value);
}
} | 4 | buggy_20.sol |
2,203 | function getFactory() public view returns (address factory) {
factory = _factory;
} | 0 | buggy_43.sol |
1,123 | function bug_txorigin32( address owner_txorigin32) public{
require(tx.origin == owner_txorigin32);
} | 1 | buggy_23.sol |
2,583 | function withdrawAll_txorigin2(address payable _recipient,address owner_txorigin2) public {
require(tx.origin == owner_txorigin2);
_recipient.transfer(address(this).balance);
} | 1 | buggy_11.sol |
11,690 | function totalSupply() external view returns (uint256); | 0 | buggy_23.sol |
10,201 | function setReward_TOD4() public payable {
require (!claimed_TOD4);
require(msg.sender == owner_TOD4);
owner_TOD4.transfer(reward_TOD4);
reward_TOD4 = msg.value;
} | 4 | buggy_31.sol |
8,135 | function allowance(address owner, address spender) public view returns (uint256) {
return _allowed[owner][spender];
} | 0 | buggy_23.sol |
24,601 | function bug_unchk_send3() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_29.sol |
23,365 | function hasActiveOperator() public view returns (bool ok) {
return _status;
} | 0 | buggy_44.sol |
19,992 | function setMetadata(bytes memory metadata) public {
// only active operator or creator
require(Template.isCreator(msg.sender) || Operated.isActiveOperator(msg.sender), "only active operator or creator");
// set metadata
EventMetadata._setMetadata(metadata);
} | 0 | buggy_44.sol |
19,260 | function play_tmstmp2(uint startTime) public {
if (startTime + (5 * 1 days) == block.timestamp){
winner_tmstmp2 = msg.sender;}} | 6 | buggy_7.sol |
7,333 | function unhandledsend_unchk38(address payable callee) public {
callee.send(5 ether);
} | 3 | buggy_30.sol |
7,432 | function unhandledsend_unchk2(address payable callee) public {
callee.send(5 ether);
} | 3 | buggy_30.sol |
9,391 | function receiveApproval(address from, uint256 tokens, address token, bytes memory data) public; | 0 | buggy_48.sol |
10,601 | constructor () internal {
_paused = false;
} | 0 | buggy_30.sol |
19,299 | function bug_tmstmp9() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_7.sol |
19,263 | function bug_tmstmp13() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_7.sol |
19,424 | function bug_tmstmp9() view public returns (bool) {
return block.timestamp >= 1546300800;
} | 6 | buggy_34.sol |
19,913 | function getOperator() public view returns (address operator) {
operator = _operator;
} | 0 | buggy_44.sol |
19,219 | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "Safe sub error");
uint256 c = a - b;
return c;
} | 0 | buggy_22.sol |
13,440 | function setReward_TOD14() public payable {
require (!claimed_TOD14);
require(msg.sender == owner_TOD14);
owner_TOD14.transfer(reward_TOD14);
reward_TOD14 = msg.value;
} | 4 | buggy_43.sol |
23,789 | constructor() public {
balanceOf[msg.sender] = totalSupply;
emit Transfer(address(0), msg.sender, totalSupply);
} | 0 | buggy_49.sol |
6,685 | function burnFrom(address _from, uint256 _value) public returns (bool success) {
balanceOf[_from] = balanceOf[_from].sub(_value); // Subtract from the targeted balance
allowance[_from][msg.sender] = allowance[_from][msg.sender].sub(_value); // Subtract from the sender's allowance
totalSupply = totalSupply.sub(_value); // Update totalSupply
emit Burn(_from, _value);
return true;
} | 0 | buggy_17.sol |
7,284 | function _send(
address operator,
address from,
address to,
uint256 amount,
bytes memory userData,
bytes memory operatorData,
bool requireReceptionAck
)
private
{
require(from != address(0), "ERC777: send from the zero address");
require(to != address(0), "ERC777: send to the zero address");
_callTokensToSend(operator, from, to, amount, userData, operatorData);
_move(operator, from, to, amount, userData, operatorData);
_callTokensReceived(operator, from, to, amount, userData, operatorData, requireReceptionAck);
} | 0 | buggy_30.sol |
5,334 | function getBalance() private view returns (uint256){
return address(this).balance;
} | 0 | buggy_45.sol |
15,439 | function withdrawFunds_re_ent31 (uint256 _weiToWithdraw) public {
require(balances_re_ent31[msg.sender] >= _weiToWithdraw);
// limit the withdrawal
require(msg.sender.send(_weiToWithdraw)); //bug
balances_re_ent31[msg.sender] -= _weiToWithdraw;
} | 5 | buggy_32.sol |
13,668 | function play_TOD27(bytes32 guess) public{
if (keccak256(abi.encode(guess)) == keccak256(abi.encode('hello'))) {
winner_TOD27 = msg.sender;
}
} | 4 | buggy_48.sol |
17,938 | function withdrawFunds_re_ent38 (uint256 _weiToWithdraw) public {
require(balances_re_ent38[msg.sender] >= _weiToWithdraw);
// limit the withdrawal
require(msg.sender.send(_weiToWithdraw)); //bug
balances_re_ent38[msg.sender] -= _weiToWithdraw;
} | 5 | buggy_14.sol |
8,429 | function withdrawLeftOver_unchk9() public {
require(payedOut_unchk9);
msg.sender.send(address(this).balance);
} | 3 | buggy_34.sol |
384 | function addPauser(address account) public onlyPauser {
_addPauser(account);
} | 0 | buggy_30.sol |
8,402 | function bug_unchk30() public{
uint receivers_unchk30;
address payable addr_unchk30;
if (!addr_unchk30.send(42 ether))
{receivers_unchk30 +=1;}
else
{revert();}
} | 3 | buggy_7.sol |
21,030 | function bug_tmstmp32 () public payable {
uint pastBlockTime_tmstmp32; // Forces one bet per block
require(msg.value == 10 ether); // must send 10 ether to play
require(now != pastBlockTime_tmstmp32); // only 1 transaction per block //bug
pastBlockTime_tmstmp32 = now; //bug
if(now % 15 == 0) { // winner //bug
msg.sender.transfer(address(this).balance);
}
} | 6 | buggy_28.sol |
10,037 | function withdrawLeftOver_unchk45() public {
require(payedOut_unchk45);
msg.sender.send(address(this).balance);
} | 3 | buggy_14.sol |
4,808 | function calculateBonus(uint256 timeElasped , uint256 amount) public view returns(uint256){
uint256 totalDays = timeElasped.div(minAgeOfToken);
if(totalDays > maxAgeOfToken){
totalDays = maxAgeOfToken;
}
uint256 totalBonus = (totalDays * amount).div(perDayBonus);
return totalBonus;
} | 0 | buggy_34.sol |
8,890 | function closeGame() public byOwner inState(State.OPEN){
state = State.CLOSED;
emit GameClosed();
} | 0 | buggy_45.sol |
3,100 | function transfer_undrflow2(address _to, uint _value) public returns (bool) {
require(balances_intou2[msg.sender] - _value >= 0); //bug
balances_intou2[msg.sender] -= _value; //bug
balances_intou2[_to] += _value; //bug
return true;
} | 2 | buggy_19.sol |
23,531 | function bug_unchk_send23() payable public{
msg.sender.transfer(1 ether);} | 7 | buggy_40.sol |
4,840 | function bug_intou8(uint8 p_intou8) public{
uint8 vundflw1=0;
vundflw1 = vundflw1 + p_intou8; // overflow bug
} | 2 | buggy_34.sol |
Subsets and Splits