EthereumCommonwealth / Cold-staking

BSD 4-Clause "Original" or "Old" License
21 stars 19 forks source link

Unknown transaction resets staking period #15

Open workvint opened 5 years ago

workvint commented 5 years ago

About 29 days ago I did deposit to staking contract 17130 CLO (after that, there are about 122000 coins in the contract). Staking period must be ended 5 january 2019. During process was error about gas required exceeds.

31 december 2018 (5 days before staking period must end) I send to my wallet 13980 CLO from HitBtc. After that, there are about 19000 coins in the wallet.

After a couple of minutes, a transaction appeared that sent exactly 17130 CLO to the staking contract. It looks as if this transaction was created at the beginning of the period (that is, 22 days ago) and was expecting the necessary amount on the wallet to be executed.

So, this transaction which I did not send has reset staking period and reward.


I would not want this to happen again. Not only because I lost about 15,000 coins as a reward for the second round, but even so such "dormant transactions" are not credible.

RideSolo commented 5 years ago

Hello @workvint , From what I see there is two transactions with the same amount that have two different nonces (first one is 8 and second one is 9) with enough of gas to cover the transaction:

Any transaction generation is done through your wallet and the CS contract doesn't have any relation when it comes to such issues.

The first transactions with nonce 8 was mined 22 days ago, which means that the transactions with nonce 9 if it was generated before the nonce 8 transactions should have been mined right after. (to understand, nonce number represent the transaction order and it is signed with your private key)

Meaning of this is that the second transaction was created using your walled after the successful mining of the first one.

Which wallet do you use ?

workvint commented 5 years ago

@RideSolo I used https://wallet.callisto.network/ for staking

Perhaps I did not explain well. I have no complaints about the smart contract.

I do not understand where the second transaction came from with the same amount of coins that was executed when there were enough funds on the wallet. It is very strange.

I waited for the period to end (4 days left) to add coins and start a new period. And then after refill of the wallet occurs this transaction.

Perhaps, two transactions could be created in the wallet (nonce 8 and 9), one was executed immediately 29 days ago, and the second was waiting for funds. Is it possible?

workvint commented 5 years ago

@RideSolo It is possible to find out the date of the creation of the transaction (pending), not the date when it was mining and recorded in the block, but the date when the transaction was sent to the network (created)?

RideSolo commented 5 years ago

@workvint I do understand you but it has to be clear for everyone, if a transaction is made and propagated to the network and if there was not enough of fund to cover it, the transaction will fail.

It is not possible to get the date of creation.

did you close the wallet ? after sending the first transaction. I mean ur browser in general

workvint commented 5 years ago

@RideSolo firefox was in incognito mode, PC was shutdown. It was 29 days ago, so yeah.

That's why I didn’t want to open this issue, since from the outside everything looks as if I had sent a second transaction.

RideSolo commented 5 years ago

@workvint yeah it is a really weird issue, and I do trust you I will check with the team about wallet.callisto.network but I'm more than sure that the wallet runs in ur browser only and nothing is saved on the server side.

workvint commented 5 years ago

@RideSolo I managed to reproduce this bug on another wallet:

RideSolo commented 5 years ago

@workvint it can be the RPC node that check if u have sufficient fund for transfer, maybe ur transaction stayed pending on that node and did not propagate, I have asked the team already. we will check everything and let you know.

workvint commented 5 years ago

I have asked the team already. we will check everything and let you know.

Any news from the dev team?

workvint commented 5 years ago

I have asked the team already. we will check everything and let you know.

Any news from the dev team?

@RideSolo @yograterol @Dexaran Does the team have any updates?

RideSolo commented 5 years ago

@workvint I'm not in charge of the RPC nodes, I have asked the team to answer you back on January maybe they forgot to write the answer.