XF 2.0 Question regarding the cost_amount column in the xf_purchase_request table

DragonByte Tech

Well-known member
To start with, I want to say I know why decimal(10,2) was used, no-one likes to deal with floating point rounding errors. My question is, would this not adversely affect cryptocurrency payments?

I don't know much about cryptocurrency, but I do know that fractions in at least Bitcoin needs more than 2 decimal points of precision. For instance, at the time of writing, US $20 is 0.00245 Bitcoin. If a site has microtransactions (for whatever reason, hi EA!), US $0.99 turns into 0.00012 Bitcoin which needs another decimal point of precision.

Even if cryptocurrency isn't going to overtake fiat currency in terms of transaction volume, I do know that the people who want to support crypto are also the sort of people who would make their voices heard if they found XF to not fully support their currency of choice.

I'd love to hear your thoughts on the matter, and if I'm misreading or misunderstanding the way the database would deal with this (I've not tested it) then I do apologise.