Skip to content

Instantly share code, notes, and snippets.

@lastcanal
Last active April 7, 2017 20:02
Show Gist options
  • Save lastcanal/d96c279d4de0481469bd28ba302ee884 to your computer and use it in GitHub Desktop.
Save lastcanal/d96c279d4de0481469bd28ba302ee884 to your computer and use it in GitHub Desktop.
local margin = 1.04
local base_price = CAD
my_price = base_price * margin
cancoin_fee = my_price * 0.0075
local incoming_network_fee = (565 * network_fee) / 100000000
local outgoing_network_fee = (565 * network_fee) / 100000000
local network_fees = outgoing_network_fee + incoming_network_fee
return ceil(my_price + cancoin_fee + network_fees)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment