Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

defi-btc-anchorer sends two transactions whern running full autonomously #9

Closed
AltCoiFish opened this issue Mar 4, 2021 · 1 comment · May be fixed by AltCoiFish/defi-btc-anchorer#3 or #10
Closed

Comments

@AltCoiFish
Copy link

AltCoiFish commented Mar 4, 2021

I do not know why, but when running defi-btc-anchorer fully autonomously sometimes he sends two transactions even when he should be sending only one.

running anchor with:
python3 main.py --config config.toml --checkprofit yes --checkcompeting yes --createanchor yes --sendanchor yes --repeat 300

Both transactions where send in exactly 6 minutes apart (see -repeat 300 aprox. 6 min)

  1. https://www.blockchain.com/btc/tx/f54a783460457dcef9ac33799a04ee31041154ec3174b63e2a856a7a1d73097e
  2. https://www.blockchain.com/btc/tx/85f8611db3e515239c6709a8d79a3dbc9118b9792cb3c0ae5a7a9f57dc6f8070

Log from anchorer:


2021-03-04 21:03:53.463058 repeating the routine
================================================

checking competing anchors in BTC mempool
ESC[92mok
ESC[0m
requesting anchor template from DeFi RPC
* DeFi block      : 2f7142d1425c8d4df31776c107b3967b2ddfa186f8c01ac680945ab1a7c67149
* potential reward: 75.00000000 DFI
ESC[92mok
ESC[0m
checking minimum profit conditions
ESC[92mok
ESC[0m
creation of anchor transaction
ESC[92mok
ESC[0m
sending anchor transaction
* BTC anchor transaction: 85f8611db3e515239c6709a8d79a3dbc9118b9792cb3c0ae5a7a9f57dc6f8070
* DeFi block            : 2f7142d1425c8d4df31776c107b3967b2ddfa186f8c01ac680945ab1a7c67149
* potential reward      : 75.00000000 DFI
ESC[92mok
ESC[0m

2021-03-04 21:09:42.250217 repeating the routine
================================================

checking competing anchors in BTC mempool
ESC[92mok
ESC[0m
requesting anchor template from DeFi RPC
* DeFi block      : 2f7142d1425c8d4df31776c107b3967b2ddfa186f8c01ac680945ab1a7c67149
* potential reward: 75.00000000 DFI
ESC[92mok
ESC[0m
checking minimum profit conditions
ESC[92mok
ESC[0m
creation of anchor transaction
ESC[92mok
ESC[0m
sending anchor transaction
* BTC anchor transaction: f54a783460457dcef9ac33799a04ee31041154ec3174b63e2a856a7a1d73097e
* DeFi block            : 2f7142d1425c8d4df31776c107b3967b2ddfa186f8c01ac680945ab1a7c67149
* potential reward      : 75.00000000 DFI
ESC[92mok
ESC[0m

Can someone please look into this , as this should be avoided as it does not check correctly the mempool if there is an existing transaction in it?

I would have saved a lot of BTC when only sending first transaction and spend the remaining BTC on new anchors.

Also could I be wrong, as I did the repeat time to short (5min)?

@AltCoiFish
Copy link
Author

Ok was a problem on my side I think I fixed it , had the old config not changed to mainnet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant