- Apr 9, 2016
- 2
- 5
For the past several weeks, we've had complaints from customers about Coinbase payouts not being sold. This stumped us for a while until we discovered an exception message that was recorded to our database periodically - "incorrect amount."
It turns out that Bitcoin Unlimited requires that while our system tracks balances to 24 decimal places, input to the "sendmany" API function must be truncated to 8 decimal places. For example, we may instruct Bitcoin Unlimited to send 0.004342387789045237582390 bitcoins to an address, but it will only accept an amount of 0.00434238. Otherwise, it fails and does not send the money by returning "incorrect amount."
This is not the behavior of Bitcoin Core and other coins forked from bitcoin that use its JSON RPC API specification. Those coins will accept an unlimited number of decimal places and truncate automatically. Due to this problem, we reverted to the Core until a fix is available.
Neither of these behaviors is "correct," but since the Core and the other coins accept any length of decimal places, it seems that Bitcoin Unlimited should conform to the traditional specification to avoid compatibility issues.
I don't have the time to write and test the fix, so hopefully this report will reach one of the developers of Bitcoin Unlimited, who can make the software execute the same behavior used by the other coins.
It turns out that Bitcoin Unlimited requires that while our system tracks balances to 24 decimal places, input to the "sendmany" API function must be truncated to 8 decimal places. For example, we may instruct Bitcoin Unlimited to send 0.004342387789045237582390 bitcoins to an address, but it will only accept an amount of 0.00434238. Otherwise, it fails and does not send the money by returning "incorrect amount."
This is not the behavior of Bitcoin Core and other coins forked from bitcoin that use its JSON RPC API specification. Those coins will accept an unlimited number of decimal places and truncate automatically. Due to this problem, we reverted to the Core until a fix is available.
Neither of these behaviors is "correct," but since the Core and the other coins accept any length of decimal places, it seems that Bitcoin Unlimited should conform to the traditional specification to avoid compatibility issues.
I don't have the time to write and test the fix, so hopefully this report will reach one of the developers of Bitcoin Unlimited, who can make the software execute the same behavior used by the other coins.