Add comments on BSQ trade fee calculation

This commit is contained in:
sqrrm 2019-06-05 14:57:37 +02:00
parent fb71c3245f
commit 0217c3d63f
No known key found for this signature in database
GPG key ID: 45235F9EF87089EC
2 changed files with 3 additions and 0 deletions

View file

@ -61,6 +61,8 @@ public enum Param {
// Might need adjustment if BSQ/BTC rate changes.
DEFAULT_MAKER_FEE_BSQ("0.50", ParamType.BSQ, 5, 5), // ~ 0.01% of trade amount
DEFAULT_TAKER_FEE_BSQ("1.5", ParamType.BSQ, 5, 5),
// Min fee is the smallest fee allowed for a trade. If the default fee would be less than min fee the
// min fee is used instead.
// 0.03 BSQ (3 satoshi) for a 1 BTC trade. 0.05 USD if 1 BSQ = 1 USD, 10 % of the BTC fee
MIN_MAKER_FEE_BSQ("0.03", ParamType.BSQ, 5, 5), // 0.0003%.
MIN_TAKER_FEE_BSQ("0.03", ParamType.BSQ, 5, 5),

View file

@ -23,6 +23,7 @@ import org.bitcoinj.core.Coin;
public class CoinUtil {
// Get the fee per amount
public static Coin getFeePerBtc(Coin feePerBtc, Coin amount) {
double feePerBtcAsDouble = feePerBtc != null ? (double) feePerBtc.value : 0;
double amountAsDouble = amount != null ? (double) amount.value : 0;