Sunday, March 27, 2016

Lost in the Ethereum blockchain

There is difficult to find what was happened with your money in Ethereum, in my example I've definitely have some bug in my contract :

contract regaMember is poolMember {
    uint public score;
    function regaMember(uint _score, address _owner) {
        score = _score;
        owner = _owner;
    }
    function invest(uint _amount) public {
        if(this.balance < _amount) throw;
        uint amount_1 = _amount * 61 / 100;
        uint amount_2 = _amount * 9 / 100; 
        uint amount_3 = _amount * 15 / 100;
        address[] memory path = new address[](3);
        getPath(path);
        posting(an._11_cash, an._01_reserve, amount_1);
        posting(an._11_cash, an._02_contribution, amount_2);
        posting(an._11_cash, an._03_commission, amount_3);
        posting(an._11_cash, an._04_super_pool, amount_3);
        path[0].send(2*amount_3);
        path[1].send(amount_1+amount_2);
    }
}

But how to find where is my money after I've called "invest" method? There is only one successful transaction in blockchain that has moved funds from my primary account to the regaMember contract but I did not manage to find where are they after all. The problem with getPath() function that did not return path[] as expected but now I am lost in blockchain...

No comments:

Post a Comment