0

We are developing an Ethereum based exchange. In our project, customers put their orders to send ETH or ERC20 tokens to others, and we currently do these transactions via our Ethereum account on their behalf. On issue that we faced with was pending transactions. In our first tests, we created some transactions after just some seconds, and found out while the previous transactions are processing (pending), other transactions will be kept pending too due to the previous transaction status and the nonce the previous one had. The message I receive in Etherscan:

There is a Pending txn with a lower account nonce. This txn can only be executed after confirmation of the earlier Txn Hash

Please help me to know is this result true in your mind and practices too? And if so, what is the solution to avoid this problem? Do we need to use multiple accounts or is there any other solution?

4
  • This sounds like decentralized exchange, yes? Commented Jul 15, 2020 at 11:51
  • Yes, it is an exchange as I mentioned in the first section. Commented Jul 15, 2020 at 11:55
  • Exchange can be decentralized and centralized, in the centralized one trades between traders are just database edits ( blockchain action is happening when trader withdraw his amount ) while in the decentralized exchange trades requires blockchain action ( transaction signing ). So yes, your exchange sounds like decentralized one if you worry for transactions during trades. I just wanted to make sure. Commented Jul 15, 2020 at 12:03
  • In our platform, each user has his own Ethereum account and can receive ETH or ERC20 tokens on it. When they want to send something to others out of our platform, we send the required amount with our account on their behalf. We are worry about when we have many users that put transactions in a time period and those transactions are kept in a queue because of the previous pending transactions. Commented Jul 15, 2020 at 12:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.