Bitcoin Forum
November 05, 2024, 03:35:27 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: 我看了下 EBTC 和 ELTC 的代码,发现是个骗局  (Read 796 times)
liatedgnay (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile WWW
October 07, 2017, 01:04:27 PM
Last edit: October 07, 2017, 05:51:03 PM by liatedgnay
 #1

ebtc 和 etlc 的智能合约,作者故意在空投里面留下了下溢的漏洞,owner 在接近于0的时候会发生下溢,很无奈,在这个圈子里骗子比实事的人多。

Code:
     function distributeELTC(address[] addresses) onlyOwner {
         for (uint i = 0; i < addresses.length; i++) {
             balances[owner] -= 1000000000000;
             balances[addresses[i]] += 1000000000000;
             Transfer(owner, addresses[i], 1000000000000);
         }
     }

跟看不懂代码的解释下  balances[owner] -= 1000000000000; 这个按照数学上会一直减到负数,在以太坊上你可以简单的认为下溢负数会成为最大 2**256-1

在睡觉前跟大家说下,简单的说就是作者的币用不完。
wilhb81
Full Member
***
Offline Offline

Activity: 224
Merit: 100


Any store can buy, sell, and accept Crypto


View Profile
October 07, 2017, 01:14:57 PM
 #2

这也没办法的,开发者都是以自身的利益出发,他们不可能完完全全地无私奉献全部电币给其他用户。。。


________Any Store Can Buy, Sell and Accept Cryptocurrency________
█████████ ██ ███ ██      PUNDI X      ██ ███ ██ █████████
Whitepaper      Twitter      Facebook      Telegram      Medium      Youtube
FA wings
Full Member
***
Offline Offline

Activity: 228
Merit: 250



View Profile
October 07, 2017, 01:42:19 PM
 #3

看不懂,大意是总量不止2100万对吗 Huh
xiaobei
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile
October 07, 2017, 01:47:06 PM
 #4

看来还是不是很靠谱的,没有什么条件要求的,来就送,想想也不是那么简单的事,开发不会白打工的。最后全部收割你们!

         ▄███████████████▄
       ▄██▀             ▀██▄
    ▄▄██▀                 ▀██▄▄
█████▀▀       ▄▀▀▀▀▀▀▀▄▄    ▀▀█████
██          ▄▀ ▄▄▄▀▀▀▀▄▀█▄▄      ██
▐█▌       ▄▀ ▄▀ ▄▄▄▀▀▀▄▀▀▀███   ▐█▌
 ██      ▄▀▄▀▄▀▀▄▄▄▀▀▀▀▀█ ▄█▀   ██
 ▐█▌    █▄▀▄▀▄█▀▀▀ ▀█▀ ▄▀▄▀█   ▐█▌
  ██    █▄▀▄▀▄▄█▀ ▄▀ ▄▀▄▀▄▀█   ██
  ▐█▌ ▀▄█████▀▄▄▀▀▄▄▀▄▀▄▀▄▀█  ▐█▌
   ██▌▀████▀██▄▄▀▀▄▄▀▄▀▄▀▄█▀ ▐██
    ██▌▀█▀▀█▄▀▀▄▀▀▄▄▀▄█▄▄█▀ ▐██
     ██▌ ▀  ▀███▄▄▄█████▀  ▐██
      ██▄      ▀▀▀▀▀      ▄██
       ▀██▄             ▄██▀
         ▀██▄         ▄██▀
           ▀██▄     ▄██▀
             ▀███▄███▀
               ▀███▀
DeepOnion 
★ ★ ★ ★ ★   ❱❱❱ JOIN AIRDROP NOW!
TOR INTEGRATED & SECURED
★  Your Anonymity Guaranteed
★  Your Assets Secured by TOR
★  Guard Your Privacy!
|Bitcointalk
Reddit
Telegram
|                        ▄▄▀▄▄▀▄▄▀▄▀▀
                    ▄▄██▀█▀▄▀▀▀
                  ▄██▄█▄██▀
                ▄██████▀
              ▄██████▀
  ▄█▄▄▄▄▄▄▄▄▄██████▀
██████▀▀▀▀▀██████▀
 ▀█████  ▄███████
  ████████████▀██
  ██▀███████▀  ██
  ██ ▀████▀    ██
  ██   ▀▀      ██
  ▀█████████████▀
yaojing2017
Full Member
***
Offline Offline

Activity: 210
Merit: 100


View Profile
October 07, 2017, 04:09:20 PM
 #5

就是说,ebtc总量以后可以改,对吗?
taidulvseh78044
Sr. Member
****
Offline Offline

Activity: 438
Merit: 250


View Profile
October 07, 2017, 04:47:32 PM
 #6

我也看不太明白,楼主可以科普下吗 Huh
TK14
Full Member
***
Offline Offline

Activity: 294
Merit: 100


View Profile
October 07, 2017, 10:26:35 PM
 #7

币圈越来越乱套 Embarrassed
lzdy
Newbie
*
Offline Offline

Activity: 27
Merit: 0


View Profile
October 07, 2017, 11:58:45 PM
 #8

如果是真的,就非常不靠谱了,有归零的危险。
cylboy007
Newbie
*
Offline Offline

Activity: 29
Merit: 0


View Profile
October 08, 2017, 03:08:35 AM
 #9

昨天大喜,鲁了一天啊,结果没几个靠谱的。
果然有问题,还是老老实实回来找些比较靠谱的coin吧。
xiaocong
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250



View Profile
October 08, 2017, 03:58:31 AM
 #10

撸的手都快废了 Grin
zaisha
Sr. Member
****
Offline Offline

Activity: 350
Merit: 250



View Profile
October 08, 2017, 04:08:57 AM
 #11

昨天大喜,鲁了一天啊,结果没几个靠谱的。
果然有问题,还是老老实实回来找些比较靠谱的coin吧。

都是这样的,别人的团队又不是傻子,估计是故意留了一手,就是为了收割韭菜的,币圈就是不缺少韭菜,免费发放然后又暴力拉伸,很容易让人感性趣的,广告也打好了,等到大家都兴奋的时候,出过了,反正大家注意点别接盘就好了,真的无线曾发那就有意思了,所以不要被暴力拉升蒙蔽了双眼。
hanxinvwang
Full Member
***
Offline Offline

Activity: 350
Merit: 100



View Profile
October 08, 2017, 04:13:47 AM
 #12

ebtc还是比较靠谱的,其他就不好说了。

▬▬▬▬▬▬▬▬▬▬  ▬▬▬▬▬▬  ▬▬▬▬▬▬  ▬▬▬▬  ▬▬▬▬ |  𝗘𝘁𝗵𝗲𝗿𝗲𝘂𝗺 𝗖𝗹𝗮𝘀𝘀𝗶𝗰 𝗩𝗶𝘀𝗶𝗼𝗻    ▬▬  ▬▬  ▬  ▬  ▬  ▬  ▬  ▬  ▬  ▬  ▬  ▬
▬▬ ▬▬ ▬▬ Hard fork Ethereum  ▬▬▬ ▬▬▬ ▬▬▬▬ ▬▬▬▬▬▬  11.1.19  ▬▬▬▬▬▬  ▬▬▬▬▬▬  ▬▬▬▬  ANN  ▬▬▬▬ ▬▬▬▬▬▬
▬▬▬▬ All Ethereum holders will receive 3 ETCV ▬▬▬▬▬▬▬▬  ▬▬▬▬▬▬  Telegram  ▬▬▬▬▬  Twitter  ▬▬▬▬  White Paper  ▬▬▬ ▬▬
PenStand
Full Member
***
Offline Offline

Activity: 210
Merit: 100



View Profile
October 08, 2017, 10:36:11 AM
 #13

eBTC这一手玩得有点过分了,本来好好的搞好eBTC就可以了,价格这么高,足够开发者大赚一笔了,居然还留个后门还想多重收割韭菜。。。

a6ledn218
Full Member
***
Offline Offline

Activity: 182
Merit: 100



View Profile
October 08, 2017, 10:42:27 AM
 #14

代码不是很懂,不过如果真的是有可以更改的代码,那么这个币就没搞头了,把别人当傻子的基本上自己就是最大的傻子!
zhuiyi
Sr. Member
****
Offline Offline

Activity: 378
Merit: 250



View Profile
October 08, 2017, 10:56:31 AM
 #15

哈哈哈,老哥不要太认真,毕竟是空头所得来的币,就看团队维护开发用不用心了,就像postaken和洋葱还是不错的,虽然没有暴力的拉升,但是他很稳啊,团队又在做事,现在的e系列的币被彻底玩坏了。
zz0233
Sr. Member
****
Offline Offline

Activity: 392
Merit: 251



View Profile
October 08, 2017, 11:43:45 AM
 #16

空投ebtc没有赶上,好气哦几千块钱呢,现在什么都被人给玩坏了,ico被国人玩坏了,e系列的空头也被玩坏了,不知道这个论坛会不会被国人玩坏,就怕以后论坛不让国人参与了,拭目以待吧。
sundylee
Full Member
***
Offline Offline

Activity: 238
Merit: 100


View Profile
October 08, 2017, 12:18:59 PM
 #17

有的赚就行,别太较真,毕竟空投来的。国人喜欢一窝蜂,的确把很多东西都搞变味了,迟点真的可能什么都把国人拒之门外了。
Orangemtyony
Member
**
Offline Offline

Activity: 74
Merit: 10


View Profile
October 08, 2017, 04:27:14 PM
 #18

能给个完整的合约地址吗?光这么看我不觉得有漏洞,distribute()函数本来就应该这么做,owner -= X; receiver += x;  这没有错,不然你怎么distribute?关键有没有下溢的问题在于看owner的initial_number是多少。 PS我也是软件工程师
因为balance是int256,可以为负,所以owner变为0之后可以继续减。

修改后
Code:
     function distributeEBTC(address[] addresses) onlyOwner returns (bool a)  {
         for (uint i = 0; i < addresses.length; i++) {
             if (balances[owner] > 0) {
                 balances[owner]-= 245719916000;
                 balances[addresses[i]] += 245719916000;
                 Transfer(owner, addresses[i], 245719916000);
                 return true;
             }else{
                 return false;
             }
        }
     }
修改前
Code:
     function distributeEBTC(address[] addresses) onlyOwner {
         for (uint i = 0; i < addresses.length; i++) {
             balances[owner] -= 245719916000;
             balances[addresses[i]] += 245719916000;
             Transfer(owner, addresses[i], 245719916000);
         }
     }
完整合约
Code:
pragma solidity ^0.4.16;

    contract ERC20 {
     function totalSupply() constant returns (uint256 totalSupply);
     function balanceOf(address _owner) constant returns (uint256 balance);
     function transfer(address _to, uint256 _value) returns (bool success);
     function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
     function approve(address _spender, uint256 _value) returns (bool success);
     function allowance(address _owner, address _spender) constant returns (uint256 remaining);
     event Transfer(address indexed _from, address indexed _to, uint256 _value);
     event Approval(address indexed _owner, address indexed _spender, uint256 _value);
 }
 
  contract EBTC is ERC20 {
     string public constant symbol = "EBTC";
     string public constant name = "eBTC";
     uint8 public constant decimals = 8;
     uint256 _totalSupply = 21000000 * 10**8;
     

     address public owner;
 
     mapping(address => uint256) balances;
 
     mapping(address => mapping (address => uint256)) allowed;
   
 
     function EBTC() {
         owner = msg.sender;
         balances[owner] = 21000000 * 10**8;
     }
     
     modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }
     
     
     function distributeEBTC(address[] addresses) onlyOwner {
         for (uint i = 0; i < addresses.length; i++) {
             balances[owner] -= 245719916000;
             balances[addresses[i]] += 245719916000;
             Transfer(owner, addresses[i], 245719916000);
         }
     }
     
 
     function totalSupply() constant returns (uint256 totalSupply) {
         totalSupply = _totalSupply;
     }
 

     function balanceOf(address _owner) constant returns (uint256 balance) {
        return balances[_owner];
     }
 
     function transfer(address _to, uint256 _amount) returns (bool success) {
         if (balances[msg.sender] >= _amount
            && _amount > 0
             && balances[_to] + _amount > balances[_to]) {
             balances[msg.sender] -= _amount;
             balances[_to] += _amount;
             Transfer(msg.sender, _to, _amount);
            return true;
         } else {
             return false;
         }
     }
     
     
     function transferFrom(
         address _from,
         address _to,
         uint256 _amount
     ) returns (bool success) {
         if (balances[_from] >= _amount
             && allowed[_from][msg.sender] >= _amount
             && _amount > 0
             && balances[_to] + _amount > balances[_to]) {
             balances[_from] -= _amount;
             allowed[_from][msg.sender] -= _amount;
             balances[_to] += _amount;
             Transfer(_from, _to, _amount);
             return true;
         } else {
            return false;
         }
     }
 
     function approve(address _spender, uint256 _amount) returns (bool success) {
         allowed[msg.sender][_spender] = _amount;
        Approval(msg.sender, _spender, _amount);
         return true;
     }
 
     function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
         return allowed[_owner][_spender];
    }
}
tom_zheng
Full Member
***
Offline Offline

Activity: 289
Merit: 100


View Profile
October 09, 2017, 02:16:58 AM
 #19

只要拉升韭菜们就喜欢啊

DeepOnion    ▬▬  Anonymous and Untraceable  ▬▬    ENJOY YOUR PRIVACY  •  JOIN DEEPONION
▐▐▐▐▐▐▐▐   ANN  Whitepaper  Facebook  Twitter  Telegram  Discord    ▌▌▌▌▌▌▌▌
Get $ONION  (✔Cryptopia  ✔KuCoin)  |  VoteCentral  Register NOW!  |  Download DeepOnion
chenh0109
Sr. Member
****
Offline Offline

Activity: 280
Merit: 250


View Profile
October 09, 2017, 02:27:59 AM
 #20

e系列的币都撸死了,有些根本就没发,有些预留漏洞,总之,不靠谱。
Pages: [1] 2 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!