1
submitted 8 months ago by bot@lemmit.online to c/monero@lemmit.online
This is an automated archive made by the Lemmit Bot.

The original was posted on /r/monero by /u/Unkn8wn69 on 2024-03-08 13:27:59.


Help the network by running a node or mining xmr!

Hey,

I wrote a small script to calculate average fee of the transactions in the mempool. Which is then multiplied by the attacking tx's (estimated about 50k of spam tx a day).

Tell me if I'm wrong with the math, but my python scripts results are: Average Fee: 41143406.40293638 (piconeros XMR), Number of Transactions in mempool: 9808

Fee for 50K Tx a day: 2.057170320146819 XMR

Here is the script:

import requests

url = ''

response = requests.get(url)
attacking\_tx = 50000

if response.status\_code == 200:
 data = response.json()

if 'data' in data and 'txs' in data['data']: txs = data['data']['txs'] num_tx = len(txs) # Number of transactions

# Calculate the total fee of all transactions
total_fee = sum(tx['tx_fee'] for tx in txs)

# Calculate the average transaction fee if there are any transactions
if num_tx > 0:
    avg_fee = total_fee / num_tx
else:
    avg_fee = 0

print(f"Average Fee: {avg_fee}, Number of Transactions in mempool: {num_tx}")

fee_for_spam = avg_fee * attacking_tx
monero = fee_for_spam / 1e12 # piconeros to moneros

print(f"Fee for {attacking_tx / 1000}K Tx a day: {monero}")

else: print("No transactions found.")


else:
 print(f"Failed to fetch data, status code: {response.status\_code}")

EDIT: Edited script to have easily changable amount of spam tx

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here
this post was submitted on 08 Mar 2024
1 points (100.0% liked)

Monero: the secure, private, untraceable currency

44 readers
1 users here now

This is the official subreddit of Monero (XMR), a secure, private, untraceable currency that is open-source and freely available to all.

founded 1 year ago
MODERATORS