One possibility is multiplying them into integers instead but then smart_amount * balance could result in an overflow if the asset or their symbols precision is large enough.
I've added a recent commit to my PR #42 which calculates the percentage of smart tokens being asked for and then spends the reserve balance by that percentage.
At https://github.com/bancorprotocol/contracts_eos/blob/cde5c2d482c956a223c6f514a89da9e1d4949969/contracts/eos/MultiConverter/MultiConverter.cpp#L270 We're going to run into bugs by dividing the variables
smart_amount
balance
current_smart_supply
by their precisions into auint64_t
as it will cut off numbers past the decimal point.One possibility is multiplying them into integers instead but then
smart_amount * balance
could result in an overflow if the asset or their symbols precision is large enough.I've added a recent commit to my PR #42 which calculates the percentage of smart tokens being asked for and then spends the reserve balance by that percentage.