Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with open('./collector_db_pusher/data.csv', 'r') as f:
- csv_reader = csv.reader(f)
- data = list(csv_reader)[1:]
- transfers = []
- for row in data:
- timestamp = int(row[2])
- f = row[4]
- t = row[5]
- amount = float(row[6].replace(',', ''))
- transfers.append({
- 'timestamp': timestamp,
- 'from': f,
- 'to': t,
- 'amount': amount
- })
- current_timestamp = 1720136819
- cumulative_wsteth_balance = 0
- for transfer in transfers:
- coeff = (current_timestamp -
- transfer['timestamp']) / 3600
- if transfer['from'] == '0x0000000000000000000000000000000000000000':
- cumulative_wsteth_balance += transfer['amount'] * coeff
- else:
- cumulative_wsteth_balance -= transfer['amount'] * coeff
- # 3600 constant price for wsteth for all time. At the same time, the rate of symbiotic points is: 1 point for $4000 per hour.
- price_coefficient = 3600 / 4000
- # 3.7M points
- print(cumulative_wsteth_balance * price_coefficient)
- # symbiotic API returns 2.99M points
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement