6102bitcoin
5 years ago
9 changed files with 122 additions and 0 deletions
@ -0,0 +1,75 @@ |
|||||
|
# Script to compare fees when using Wasabi & Whirlpool by 6102bitcoin |
||||
|
|
||||
|
from pylab import * |
||||
|
import numpy as np |
||||
|
import math |
||||
|
|
||||
|
mix_amount_range = np.arange(0.001, 1.001, 0.001) |
||||
|
|
||||
|
# Desired Anonset |
||||
|
anonset = 500.0 |
||||
|
|
||||
|
# Fixed Parameter: Anonset Per Round |
||||
|
wasabi_anonset_per_round = 100.0 |
||||
|
whirlpool_anonset_per_round = 5.0 |
||||
|
|
||||
|
# Fixed Parameter: Pool Size |
||||
|
wasabi_pool_size = 0.1 #BTC |
||||
|
whirlpool_pool_size = 0.005 #BTC |
||||
|
|
||||
|
# Rounds |
||||
|
wasabi_rounds = math.ceil(anonset / wasabi_anonset_per_round) |
||||
|
whirlpool_rounds = math.ceil(anonset / whirlpool_anonset_per_round) |
||||
|
|
||||
|
# Initialise Results Lists |
||||
|
results_mix_amount = [] |
||||
|
results_wasabi_coordinator_fee = [] |
||||
|
results_whirlpool_coordinator_fee = [] |
||||
|
results_wasabi_utxos = [] |
||||
|
results_whirlpool_utxos = [] |
||||
|
|
||||
|
for index, mix_amount in np.ndenumerate(mix_amount_range): |
||||
|
|
||||
|
# Fee Structure |
||||
|
wasabi_coordinator_fee = mix_amount * 0.003/100 * anonset |
||||
|
whirlpool_coordinator_fee = whirlpool_pool_size * 0.05 # 5% of Pool Size |
||||
|
|
||||
|
# UTXO's |
||||
|
wasabi_utxos = ceil(mix_amount / wasabi_pool_size) |
||||
|
whirlpool_utxos = ceil(mix_amount / whirlpool_pool_size) |
||||
|
|
||||
|
results_mix_amount.append(mix_amount) |
||||
|
|
||||
|
if wasabi_pool_size <= mix_amount: |
||||
|
results_wasabi_coordinator_fee.append(100 * wasabi_coordinator_fee / mix_amount) # Percentage of Amount Mixed |
||||
|
results_wasabi_utxos.append(wasabi_utxos) |
||||
|
else: |
||||
|
results_wasabi_coordinator_fee.append(None) |
||||
|
results_wasabi_utxos.append(None) |
||||
|
|
||||
|
if whirlpool_pool_size <= mix_amount: |
||||
|
results_whirlpool_coordinator_fee.append((100 * whirlpool_coordinator_fee / mix_amount)) # Percentage of Amount Mixed |
||||
|
results_whirlpool_utxos.append(whirlpool_utxos) |
||||
|
else: |
||||
|
results_whirlpool_coordinator_fee.append(None) |
||||
|
results_whirlpool_utxos.append(None) |
||||
|
|
||||
|
# Plot Figures |
||||
|
plt.suptitle('CoinJoin Coordinator Fee Comparison \n Anonymity Set: ' + str(anonset) + ' (Whirlpool Pool Size: ' + str(whirlpool_pool_size) + ')') |
||||
|
|
||||
|
subplot(2,1,1) |
||||
|
plt.ylabel('Fee (% of Mix Amount)') |
||||
|
plt.xlabel('Amount being mixed (BTC)') |
||||
|
plt.plot(results_mix_amount, results_wasabi_coordinator_fee) |
||||
|
plt.plot(results_mix_amount, results_whirlpool_coordinator_fee) |
||||
|
plt.legend(['Wasabi', 'Whirlpool']) |
||||
|
|
||||
|
subplot(2,1,2) |
||||
|
plt.ylabel('UTXO\'s') |
||||
|
plt.xlabel('Amount being mixed (BTC)') |
||||
|
plt.plot(results_mix_amount, results_wasabi_utxos) |
||||
|
plt.plot(results_mix_amount, results_whirlpool_utxos) |
||||
|
plt.legend(['Wasabi', 'Whirlpool']) |
||||
|
|
||||
|
subplots_adjust(left=.12, bottom=.11, right=.9, top=.88, wspace=.2, hspace=.5) # Adjust vertical spacing |
||||
|
plt.show() |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 43 KiB |
@ -0,0 +1,21 @@ |
|||||
|
MIT License |
||||
|
|
||||
|
Copyright (c) 2019 6102bitcoin |
||||
|
|
||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
|
of this software and associated documentation files (the "Software"), to deal |
||||
|
in the Software without restriction, including without limitation the rights |
||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
|
copies of the Software, and to permit persons to whom the Software is |
||||
|
furnished to do so, subject to the following conditions: |
||||
|
|
||||
|
The above copyright notice and this permission notice shall be included in all |
||||
|
copies or substantial portions of the Software. |
||||
|
|
||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||
|
SOFTWARE. |
@ -0,0 +1,26 @@ |
|||||
|
# CoinJoinFees |
||||
|
Comparing fees of different CoinJoin tools (Wasabi & Whirlpool for a range of pool sizes) by [@6102bitcoin](https://twitter.com/6102bitcoin). |
||||
|
|
||||
|
I have uploaded the full [python script](CoinJoinFees.py) used to generate these figures. |
||||
|
|
||||
|
To Do: |
||||
|
1) Incorporate On-Chain Fees |
||||
|
2) Incorporate actual Wasabi UTXO cascade splitting (0.7 -> 0.4, 0.2, 0.1) |
||||
|
|
||||
|
## Pool 0.001 BTC |
||||
|
![.](/Images/0.001.png) |
||||
|
|
||||
|
## Pool 0.005 BTC |
||||
|
![.](/Images/0.005.png) |
||||
|
|
||||
|
## Pool 0.01 BTC |
||||
|
![.](/Images/0.01.png) |
||||
|
|
||||
|
## Pool 0.05 BTC |
||||
|
![.](/Images/0.05.png) |
||||
|
|
||||
|
## Pool 0.1 BTC |
||||
|
![.](/Images/0.1.png) |
||||
|
|
||||
|
## Pool 0.5 BTC |
||||
|
![.](/Images/0.5.png) |
Loading…
Reference in new issue