So it turns out there are some honest people in crypto after all.

An Ethereum miner who received a multi-million-dollar transaction fee by accident has returned the funds, despite being under no obligation to do so.

According to DeFi platform DeversiFi, on Monday a user who tried to deposit $100,000 in Tether from a Ledger hardware wallet ended up paying a whopping 7,676 Ethereum (US$23 million) in gas.

Blockchain records showed the miner was automatically sending their mined Ethereum to an account with Binance, and the crypto giant agreed to pass along DeversiFi’s email address to their customer.

“Early in the evening the miner established contact via email, and after a few emails back and forth quickly agreed to return the funds involved to their origin address!” DeversiFi wrote.

The team told the miner to keep 50 Ethereum (US$145,500) as a return fee, DiversiFi wrote.

Ethereum lets users pay extra in gas fees to have their transactions handled expeditiously. But there was an issue with an Ethereum library called Ethereumjs, which doesn’t support decimal values.

“This in itself won’t be a surprise to most Ethereum developers, however rather than throwing an error, decimal values are mangled silently into something potentially dangerous,” DiversiFi wrote.

For most users, such a transaction would simply silently fail, but in this case, the customer was apparently a “whale” with a huge stack of Ether.

Compounding the issue was that in some cases Ledger hardware wallets displays very large fees as hex values, rather than in a human-readable form, the team wrote.

DiversiFi said that despite the happy ending, the near-miss was a wake-up call for the industry.

“The ultimate aim of DeFi and the crypto space is mass adoption, but until we are able to provide a safe and accessible environment for everyone (without a seven paragraph introduction explaining how something works when it goes wrong) we are not going to reach that goal.”

The incident was first reported by Coindesk.