When making a transaction on the DApp, the gas limit and gas price are not set to good values. For example, the
updateStatus function only needs a maximum of ~170,000 gas, I believe, and yet 500,000 is used. The gas price also does not seem set to a good value (default was 1 Gwei even when gas station showed ~7 Gwei should be used).
Using a higher than necessary gas limit is bad for both the transaction and the network as a whole, as the gas limit contributes to the block gas limit, but miners only receive ETH based on actual gas used. This means that transactions with higher than necessary gas limits either go un-mined, or unnecessarily fill up blocks preventing other transactions from being included in the block. The
estimateGas function can be used to find a good value to include when making the transaction (can reach out to me directly if necessary for examples).
The gas price should also be improved, perhaps by making a call to the gas station and setting it when making the transaction, rather than relying on metamask to get a good value.
These gas issues can lead to a state where metamask is essentially unusable. When submitted with bad settings, they often do not even get picked up by etherscan and metamask does not prompt the user to increase the gas price because the transaction is taking too long. Transactions outside the FOAM DApp, whether simple transfers or interacting with another DApp, will fail because the account nonce has increased locally so the new transactions are waiting on previous transaction to confirm (which it never will, seemingly). The only way to fix this issue is to go through the “reset account” flow on metamask which deletes account history (and fixes the nonce issue). The “reset account” flow can be intimidating, and it should not be expected that a user has to modify the gas settings that are populated when the metamask dialog appears.
(the above is a bit of speculation, metamask does get into a bad state and this is my theory of what’s happening, but I haven’t investigated it closely)