mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 23:06:39 +01:00
Adjust security deposits
According to https://github.com/bisq-network/proposals/issues/155 For buyer: Default: 15% Min. 15% for Altcoin, 15% for Fiat Max. 50% for Altcoin, 50% for Fiat Absolute min. deposit in BTC: 0.006 BTC (currently 40 USD) For Seller: Fixed: 15% Absolute min. deposit in BTC: 0.006 BTC (currently 40 USD)
This commit is contained in:
parent
8c62d000e1
commit
223441bb7d
1 changed files with 7 additions and 17 deletions
|
@ -19,7 +19,6 @@ package bisq.core.btc.wallet;
|
|||
|
||||
import bisq.core.app.BisqEnvironment;
|
||||
import bisq.core.payment.PaymentAccount;
|
||||
import bisq.core.payment.PaymentAccountUtil;
|
||||
|
||||
import org.bitcoinj.core.Coin;
|
||||
|
||||
|
@ -50,47 +49,38 @@ public class Restrictions {
|
|||
|
||||
public static Coin getMinTradeAmount() {
|
||||
if (MIN_TRADE_AMOUNT == null)
|
||||
MIN_TRADE_AMOUNT = Coin.valueOf(10_000); // 0,4 USD @ 4000 USD/BTC
|
||||
MIN_TRADE_AMOUNT = Coin.valueOf(10_000); // 0,7 USD @ 7000 USD/BTC
|
||||
return MIN_TRADE_AMOUNT;
|
||||
}
|
||||
|
||||
public static double getDefaultBuyerSecurityDepositAsPercent(@Nullable PaymentAccount paymentAccount) {
|
||||
if (PaymentAccountUtil.isCryptoCurrencyAccount(paymentAccount))
|
||||
return 0.02; // 2% of trade amount.
|
||||
else
|
||||
return 0.1; // 10% of trade amount.
|
||||
return 0.15; // 15% of trade amount.
|
||||
}
|
||||
|
||||
public static double getMinBuyerSecurityDepositAsPercent(@Nullable PaymentAccount paymentAccount) {
|
||||
if (PaymentAccountUtil.isCryptoCurrencyAccount(paymentAccount))
|
||||
return 0.005; // 0.5% of trade amount.
|
||||
else
|
||||
return 0.05; // 5% of trade amount.
|
||||
return 0.15; // 15% of trade amount.
|
||||
}
|
||||
|
||||
public static double getMaxBuyerSecurityDepositAsPercent(@Nullable PaymentAccount paymentAccount) {
|
||||
if (PaymentAccountUtil.isCryptoCurrencyAccount(paymentAccount))
|
||||
return 0.2; // 20% of trade amount. For a 1 BTC trade it is about 800 USD @ 4000 USD/BTC
|
||||
else
|
||||
return 0.5; // 50% of trade amount. For a 1 BTC trade it is about 2000 USD @ 4000 USD/BTC
|
||||
return 0.5; // 50% of trade amount. For a 1 BTC trade it is about 3500 USD @ 7000 USD/BTC
|
||||
}
|
||||
|
||||
// We use MIN_BUYER_SECURITY_DEPOSIT as well as lower bound in case of small trade amounts.
|
||||
// So 0.0005 BTC is the min. buyer security deposit even with amount of 0.0001 BTC and 0.05% percentage value.
|
||||
public static Coin getMinBuyerSecurityDepositAsCoin() {
|
||||
if (MIN_BUYER_SECURITY_DEPOSIT == null)
|
||||
MIN_BUYER_SECURITY_DEPOSIT = Coin.parseCoin("0.001"); // 0.001 BTC about 4 USD @ 4000 USD/BTC
|
||||
MIN_BUYER_SECURITY_DEPOSIT = Coin.parseCoin("0.006"); // 0.006 BTC about 42 USD @ 7000 USD/BTC
|
||||
return MIN_BUYER_SECURITY_DEPOSIT;
|
||||
}
|
||||
|
||||
|
||||
public static double getSellerSecurityDepositAsPercent() {
|
||||
return 0.05; // 5% of trade amount.
|
||||
return 0.15; // 15% of trade amount.
|
||||
}
|
||||
|
||||
public static Coin getMinSellerSecurityDepositAsCoin() {
|
||||
if (SELLER_SECURITY_DEPOSIT == null)
|
||||
SELLER_SECURITY_DEPOSIT = Coin.parseCoin("0.005"); // 0.005 BTC about 20 USD @ 4000 USD/BTC
|
||||
SELLER_SECURITY_DEPOSIT = Coin.parseCoin("0.006"); // 0.006 BTC about 42 USD @ 7000 USD/BTC
|
||||
return SELLER_SECURITY_DEPOSIT;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue