Commit 0c703530 authored by zeroleak's avatar zeroleak
Browse files

set minerFeeMix=2*minerFeeCap

parent 1e177aa8
......@@ -22,12 +22,12 @@ The node will be used to verify UTXO and broadcast tx.
### Pool: UTXO amounts
```
server.pools[x].denomination: amount in satoshis
server.pools[x].miner-fee-min: minimum miner-fee accepted for mustMix
server.pools[x].miner-fee-max: maximum miner-fee accepted for mustMix
server.pools[x].miner-fee-cap: "soft cap" miner-fee recommended for a new mustMix (should be <= miner-fee-max)
server.miner-fees.miner-fee-min: minimum miner-fee accepted for mustMix
server.miner-fees.miner-fee-max: maximum miner-fee accepted for mustMix
server.miner-fees.miner-fee-cap: "soft cap" miner-fee recommended for a new mustMix (should be <= miner-fee-max)
```
UTXO should be founded with:<br/>
for mustMix: (*server.mix.denomination* + *server.mix.miner-fee-min*) to (*server.mix.denomination* + *server.mix.miner-fee-max*)<br/>
for mustMix: (*server.mix.denomination* + *server.miner-fees.miner-fee-min*) to (*server.mix.denomination* + *server.miner-fees.miner-fee-max*). New TX0 outputs are capped to (*server.mix.denomination* + *server.miner-fees.miner-fee-cap*).<br/>
for liquidities: (*server.mix.denomination*) to (*server.mix.denomination* + *server.mix.miner-fee-max*)
......@@ -73,12 +73,11 @@ SCode can expire for tx0s confirmed after a specified time.
server.pools[x].anonymity-set = 5
server.pools[x].must-mix-min = 1
server.pools[x].liquidity-min = 1
server.pools[x].miner-fee-mix = 510 # miner fee (sats) to accumulate before adding liquidities
```
Mix will start when *anonymity-set* (mustMix + liquidities) are registered.<br/>
At the beginning of the mix, only mustMix can register up, to *anonymity-set - liquidity-min*. Meanwhile, liquidities are placed on a waiting pool.<br/>
Liquidities are added as soon as *must-mix-min* and *miner-fee-mix* are reached, up to *anonymity-set* inputs for the mix.
Liquidities are added as soon as *must-mix-min* and *miner-fee-mix=(2x)miner-fee-cap* are reached, up to *anonymity-set* inputs for the mix.
### Exports
Mixs are exported to a CSV file:
......
......@@ -473,7 +473,6 @@ public class WhirlpoolServerConfig extends ServerConfig {
private long minerFeeMin; // in satoshis
private long minerFeeCap; // in satoshis
private long minerFeeMax; // in satoshis
private long minerFeeMix; // in satoshis
public void validate() throws Exception {
if (minerFeeMin <= 0) {
......@@ -485,9 +484,6 @@ public class WhirlpoolServerConfig extends ServerConfig {
if (minerFeeMax <= 0) {
throw new Exception("Invalid minerFeeMax");
}
if (minerFeeMix <= 0) {
throw new Exception("Invalid minerFeeMix");
}
}
public long getMinerFeeMin() {
......@@ -515,11 +511,7 @@ public class WhirlpoolServerConfig extends ServerConfig {
}
public long getMinerFeeMix() {
return minerFeeMix;
}
public void setMinerFeeMix(long minerFeeMix) {
this.minerFeeMix = minerFeeMix;
return minerFeeCap * 2;
}
}
......
......@@ -92,6 +92,7 @@ public class StatusWebController {
poolAttributes.put("mustMixQueued", mix.getPool().getMustMixQueue().getSize());
poolAttributes.put("liquiditiesQueued", mix.getPool().getLiquidityQueue().getSize());
poolAttributes.put("mustMixQueued", mix.getPool().getMustMixQueue().getSize());
Map<MixStatus, Timestamp> timeStatus = mix.getTimeStatus();
List<StatusStep> steps = new ArrayList<>();
......
......@@ -19,7 +19,6 @@ server.samourai-fees.secret-wallet.passphrase = CONFIGUREME
server.miner-fees.miner-fee-min = 102
server.miner-fees.miner-fee-cap = 9500
server.miner-fees.miner-fee-max = 10000
server.miner-fees.miner-fee-mix = 510
server.test-mode = false
server.request-timeout = 20000
......
......@@ -11,9 +11,6 @@
<link rel="stylesheet" href="/css/status.css"/>
</head>
<body>
<span th:fragment="colorify(value, green)">
<span th:if="${green}" th:text="${value}" style="color:green"/><span th:if="${!green}" th:text="${value}"/>
</span>
<div layout:fragment="main">
<h1 class="h2">Status
<svg width="20px" height="20px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="lds-eclipse">
......@@ -49,9 +46,9 @@
</div>
</td>
<td>
<strong><span th:replace="status.html::colorify(value=${pool.nbInputs}, green=${pool.nbInputs>=pool.anonymitySet})"/> / <span th:text="${pool.anonymitySet}"/> confirmed</strong><br/>
<strong th:replace="status.html::colorify(value=${pool.nbInputsMustMix}, green=${pool.nbInputsMustMix>=pool.minMustMix})"/> / <span th:text="${pool.minMustMix}"/> mustMix, <strong th:replace="status.html::colorify(value=${pool.minerFeeAccumulated}, green=${pool.minerFeeAccumulated>=minerFees.minerFeeMix})"/> / <span th:text="${minerFees.minerFeeMix}"/> sat<br/>
<strong th:replace="status.html::colorify(value=${pool.nbInputsLiquidities}, green=${pool.nbInputsLiquidities>=pool.minLiquidity})"/> / <span th:text="${pool.minLiquidity}"/> liquidities + <span th:text="${pool.liquiditiesQueued}" style="font-weight:bold"/> queued
<strong><span th:text="${pool.nbInputs}"/> / <span th:text="${pool.anonymitySet}"/> confirmed</span><br/>
<strong th:text="${pool.nbInputsMustMix}"/> / <span th:text="${pool.minMustMix}"/> mustMix<span th:if="${pool.mustMixQueued>0}" style="color:red"> + <strong th:text="${pool.mustMixQueued}"/> queued</span>, <strong th:text="${pool.minerFeeAccumulated}"/></strong> / <span th:text="${minerFees.minerFeeMix}"/> sat<br/>
<strong th:text="${pool.nbInputsLiquidities}"/> / <span th:text="${pool.minLiquidity}"/> liquidities<span th:if="${pool.liquiditiesQueued>0}"> + <strong th:text="${pool.liquiditiesQueued}"/> queued</span>
</td>
<td><span th:text="${@templateUtil.duration(pool.elapsedTime/1000)}"/></td>
<td>
......
......@@ -13,6 +13,10 @@ spring.datasource.password=sa
server.samourai-fees.secret-wallet.words = all all all all all all all all all all all all
server.samourai-fees.secret-wallet.passphrase = whirlpool
server.miner-fees.miner-fee-min = 102
server.miner-fees.miner-fee-cap = 8000
server.miner-fees.miner-fee-max = 10000
server.register-input.liquidity-interval = 10
server.test-mode = false
......@@ -28,10 +32,6 @@ server.rpc-client.mock-tx-broadcast = false
# pool 0
server.pools[0].id = 0.5btc
server.pools[0].denomination = 50000000
server.pools[0].miner-fee-min = 102
server.pools[0].miner-fee-cap = 8000
server.pools[0].miner-fee-max = 10000
server.pools[0].miner-fee-mix = 510
server.pools[0].must-mix-min = 1
server.pools[0].liquidity-min = 1
server.pools[0].anonymity-set = 2
......@@ -39,10 +39,6 @@ server.pools[0].anonymity-set = 2
# pool 1
server.pools[1].id = 0.1btc
server.pools[1].denomination = 10000000
server.pools[1].miner-fee-min = 102
server.pools[1].miner-fee-cap = 8000
server.pools[1].miner-fee-max = 10000
server.pools[1].miner-fee-mix = 510
server.pools[1].must-mix-min = 1
server.pools[1].liquidity-min = 1
server.pools[1].anonymity-set = 2
......@@ -50,10 +46,6 @@ server.pools[1].anonymity-set = 2
# pool 2
server.pools[2].id = 0.01btc
server.pools[2].denomination = 1000000
server.pools[2].miner-fee-min = 102
server.pools[2].miner-fee-cap = 8000
server.pools[2].miner-fee-max = 10000
server.pools[2].miner-fee-mix = 510
server.pools[2].must-mix-min = 1
server.pools[2].liquidity-min = 1
server.pools[2].anonymity-set = 2
......@@ -61,10 +53,6 @@ server.pools[2].anonymity-set = 2
# pool test
server.pools[3].id = 1btc
server.pools[3].denomination = 100000000
server.pools[3].miner-fee-min = 102
server.pools[3].miner-fee-cap = 8000
server.pools[3].miner-fee-max = 10000
server.pools[3].miner-fee-mix = 510
server.pools[3].must-mix-min = 1
server.pools[3].liquidity-min = 1
server.pools[3].anonymity-set = 2
......@@ -19,6 +19,10 @@ server.ban.expiration = 1000
server.samourai-fees.secret-wallet.words = all all all all all all all all all all all all
server.samourai-fees.secret-wallet.passphrase = whirlpool
server.miner-fees.miner-fee-min = 102
server.miner-fees.miner-fee-cap = 8000
server.miner-fees.miner-fee-max = 10000
server.register-input.liquidity-interval = 2
server.test-mode = false
......@@ -27,10 +31,6 @@ server.export.directory = /tmp
# pool 0
server.pools[0].id = 0.5btc
server.pools[0].denomination = 50000000
server.pools[0].miner-fee-min = 102
server.pools[0].miner-fee-cap = 8000
server.pools[0].miner-fee-max = 10000
server.pools[0].miner-fee-mix = 510
server.pools[0].must-mix-min = 1
server.pools[0].liquidity-min = 1
server.pools[0].anonymity-set = 2
......@@ -38,10 +38,6 @@ server.pools[0].anonymity-set = 2
# pool 1
server.pools[1].id = 0.1btc
server.pools[1].denomination = 10000000
server.pools[1].miner-fee-min = 102
server.pools[1].miner-fee-cap = 8000
server.pools[1].miner-fee-max = 10000
server.pools[1].miner-fee-mix = 510
server.pools[1].must-mix-min = 1
server.pools[1].liquidity-min = 1
server.pools[1].anonymity-set = 2
......@@ -49,10 +45,6 @@ server.pools[1].anonymity-set = 2
# pool 2
server.pools[2].id = 0.01btc
server.pools[2].denomination = 1000000
server.pools[2].miner-fee-min = 102
server.pools[2].miner-fee-cap = 8000
server.pools[2].miner-fee-max = 10000
server.pools[2].miner-fee-mix = 510
server.pools[2].must-mix-min = 1
server.pools[2].liquidity-min = 1
server.pools[2].anonymity-set = 2
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment