I thought that pog_coinagepercentage was in fact free balance percentage, because that's how I think it worked for the first 2 days when I tried it. But yesterday and today, I noticed it takes a much smaller balance than I configured. For example if I put .50, it uses about 25% of my free balance instead of 50%. Why?
Its based on the coin age percentage, in contrast to the free wallet balance percentage.
If all UTXOs in my wallet have exactly the same age, then coin age percentage and free balance percentage would be the same, right?
OK, now let's say I have two UTXOs in my wallet:
UTXO1: 10k BBP (10 days old) = 100k weight
UTXO2: 100k BBP (1 day old) = 100k weight
So in this particular case, these two outputs weigh the same, except I don't know how the algorithm then decides which of these two outputs to take if I want to use 50% of weight, more on that below.
Now take this example:
UTXO1: 100k BBP (1 day old) = 100k weight
UTXO2: 100k BBP (2 days old) = 200k weight
So the total weight is 300k. Then if I set pog_coinagepercentage to .50, that means I want to use half of my
weight (150k). But will that use 100k of weight from UTXO1 and 50k of weight from UTXO2, or will it use 150k of weight just from UTXO2? Or any other combination in between?
Because if 100k of weight is taken from UTXO1 and 50k of weight is taken from UTXO2, the total amount of coins used is:
(100k/100k)*100k + (50k/200k)*100k = 1*100k + 0.25*100k = 100k + 25k =
125kBut if no weight is taken from UTXO1 and 150k of weight is taken from UTXO2, then the total amount of coins used is:
(0k/100k)*100k + (150k/200k)*100k = 0*100k + 0.75*100k = 0 + 75k =
75kSo how do we know which of these scenarios will happen (or any scenarios in between)?
Another thing which confuses me is how is one supposed to use all of their free coins? If I put pog_coinagepercentage=1, in the example above that should mean I want to use 300k weight (100% of it), so it should simply use all free coins (200k BBP). But in my experience it uses about 50% of all free coins. Why not all free coins, because 100% of coin age should be all coins, no?
If all UTXOs in my wallet have exactly the same age, then coin age percentage and free balance percentage would be the same, right?
-> Yes, correct. If you had 6 coins, 3 with 1 million coin age, and 3 with 10 coin age, you have 3.1 MM total. If you select .50 coinagepercentage, the wallet will use the first 2 (to get past 1.5MM in weight required), and would stop and you would be left with 4 coins (3 aged 10, 1 aged 1 mil ) that were unspent.
OK, now let's say I have two UTXOs in my wallet:
UTXO1: 10k BBP (10 days old) = 100k weight
UTXO2: 100k BBP (1 day old) = 100k weight
So in this particular case, these two outputs weigh the same, except I don't know how the algorithm then decides which of these two outputs to take if I want to use 50% of weight, more on that below.
-> The algorithm loops through your wallet by the timestamp of the UTXOs, so it would pick the one that was 10 days old (not because it has more coin age, but because it encountered it first in the set).
So the total weight is 300k. Then if I set pog_coinagepercentage to .50, that means I want to use half of my
weight (150k). But will that use 100k of weight from UTXO1 and 50k of weight from UTXO2, or will it use 150k of weight just from UTXO2? Or any other combination in between?
-> It would be picking the older of the two, so you don't have control over which one it chooses. It is true that it might overshoot the total, by choosing the higher one because it encountered it first. Let me explain the rule and this will clear it up:
You have a balance of 10 million. You choose .50 coin age. You have 100 coins. Your total wallet has 5 million coin-age.
The selector will loop through the wallet searching for coins until it reaches 2.5 million coin age (thats half of the 5 million target). You have no control over whether it picks five 1 mil coins or 25 smaller aged coins, it just finds coins until it reaches 2.5 mil coin age, then breaks out and uses those.
So how do we know which of these scenarios will happen (or any scenarios in between)?
-> We don't, it could be any scenario in between, and I don't think that will be a problem, since the only anomaly that can happen is someone has a Very big coin and it uses it, but we spend coin age all the time and it constantly recycles, so in the grand scheme that should be OK, as the one with a very big single coin with coin age - that person could break it with the bankroll command, or simply use it and get a higher reward that day.
Another thing which confuses me is how is one supposed to use all of their free coins? If I put pog_coinagepercentage=1, in the example above that should mean I want to use 300k weight (100% of it), so it should simply use all free coins (200k BBP). But in my experience it uses about 50% of all free coins. Why not all free coins, because 100% of coin age should be all coins, no?
-> This scenario should be working, and I think it does work - you should definitely be able to spend all your coin-age if not limited by our 100K transaction size limit. So please try this ; try setting the coinagepercentage to .99 and restart and try one, and if it does not work please give me the error from the log and we can work through this.