You don't seem to understand how the prices and things are calculated.
I was not looking at the total payout over time and saying man that seems low. I was looking at every reported coin that was mined in the earnings section and comparing the paid out value of those coins to the market prices of the day that the coins were exchanged and every single one was below the lowest market value by 20% or more. How does one sell coins below the lowest market value for a day?
I've mined on Zpool for a couple of months. You can do these same calculations yourself and see the same thing. When you mine a coin it shows up in your earnings as X coins mined, share %, how much mBTC those coins are worth. That price of the mBTC will fluctuate periodically as the coin moves from Immature, Exchange, and Cleared. At any time during that period you can take the number of coins, multiply it by the current market price and you will see that the mBTC listed is 20%+ less than the market price. Then when the coin actually is cleared you will see that is the actual mBTC value that is moved from unconfirmed to unpaid in your total amount.
I posted screenshots every single market that I gathered the prices from to prove that I wasn't just misreading the prices and making stuff up. My system clock is in the lower right corner of all those screenshots to prove the date and time that those prices were checked. I have nothing to gain by spending hours of my time try to prove this to people other than to try and get it fixed so that I can feel comfortable mining on zpool again.
Try it yourself and you will see exactly what I'm talking about. Most coins only have one major exchange that they trade on so it is pretty easy to determine where the price is coming from. That's what led me to looking at the code of Yiimp and seeing this evidence in the code. I'm still trying to get a fully working Yiimp pool setup just to test what prices are coming from the exchange, but this appears to be the problem.
The relevant function that I believe is causing the issues is as follows:
In web\yaamp\core\backend\markets.php on line 203
function AverageIncrement($value1, $value2)
{
$percent = 80;
$value = ($value1*(100-$percent) + $value2*$percent) / 100;
return $value;
}
This function is used for pretty much every price lookup from the markets. The purpose of this function is to create a weighted value based upon 20% of value1 and 80% of value2. The reason for doing it is to create a trailing average for price moves. As an example in the price look up for any of the exchanges.
web\yaamp\core\exchange\bittrex.php on line 61-63
$price2 = ($m->Bid + $m->Ask)/2;
$market->price2 = AverageIncrement($market->price2, $price2);
$market->price = AverageIncrement($market->price, $m->Bid);
The purpose of this code is to first get the average of the Bid and Ask and put it in price2.
Next it sets the price2 value to the weighted value of the previous price2 and the current price2. This would be a 20% weight of the old price + 80% value of the new price.
Finally it sets the price value to the weighted value of the previous price and the current bid. This would be a 20% weight of the old bid + 80% value of the new bid.
On paper this seems reasonable because if the price fluctuates by a significant margin it will trail that value and essentially smooth the movement out.
This is significant because if you look at the AverageIncrement function and consider that if the previous price being passed in value1 does not exist then the function returns 80% of the current price2 or Bid. So I think what might be happening is somehow the object is falling out of scope or some other issue that is causing that value1 to get a 0 amount and therefore the values coming out are 80% of the value they should be.
As a workaround until it can be determined if the values are being passed incorrectly or falling out of scope a line to check if value1 is 0 and if it is return the value2 should work around the issue. I'm going to likely try and setup a Yiimp instance on a test VM and see if I can get values out of it to determine for sure if this is the problem.
I'll let you know what I find. Crackfoo if you want to perhaps add some debug logging like the following it may be quicker for you to see:
function AverageIncrement($value1, $value2)
{
$percent = 80;
$value = ($value1*(100-$percent) + $value2*$percent) / 100;
debuglog("AverageIncrement: $value1, $value2");
return $value;
}
Or report it to Tpruvot and see if he can look at it. I'm pretty sure this is what is causing the issues.