{"action":"created","issue":{"url":"https://api.github.com/repos/ucoin-io/cutecoin/issues/148","labels_url":"https://api.github.com/repos/ucoin-io/cutecoin/issues/148/labels{/name}","comments_url":"https://api.github.com/repos/ucoin-io/cutecoin/issues/148/comments","events_url":"https://api.github.com/repos/ucoin-io/cutecoin/issues/148/events","html_url":"https://github.com/ucoin-io/cutecoin/issues/148","id":88246325,"number":148,"title":"bugs in cutecoin 0.10.0","user":{"login":"galuel","id":5245398,"avatar_url":"https://avatars.githubusercontent.com/u/5245398?v=3","gravatar_id":"","url":"https://api.github.com/users/galuel","html_url":"https://github.com/galuel","followers_url":"https://api.github.com/users/galuel/followers","following_url":"https://api.github.com/users/galuel/following{/other_user}","gists_url":"https://api.github.com/users/galuel/gists{/gist_id}","starred_url":"https://api.github.com/users/galuel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galuel/subscriptions","organizations_url":"https://api.github.com/users/galuel/orgs","repos_url":"https://api.github.com/users/galuel/repos","events_url":"https://api.github.com/users/galuel/events{/privacy}","received_events_url":"https://api.github.com/users/galuel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ucoin-io/cutecoin/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"vtexier","id":2174016,"avatar_url":"https://avatars.githubusercontent.com/u/2174016?v=3","gravatar_id":"","url":"https://api.github.com/users/vtexier","html_url":"https://github.com/vtexier","followers_url":"https://api.github.com/users/vtexier/followers","following_url":"https://api.github.com/users/vtexier/following{/other_user}","gists_url":"https://api.github.com/users/vtexier/gists{/gist_id}","starred_url":"https://api.github.com/users/vtexier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtexier/subscriptions","organizations_url":"https://api.github.com/users/vtexier/orgs","repos_url":"https://api.github.com/users/vtexier/repos","events_url":"https://api.github.com/users/vtexier/events{/privacy}","received_events_url":"https://api.github.com/users/vtexier/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/ucoin-io/cutecoin/milestones/6","html_url":"https://github.com/ucoin-io/cutecoin/milestones/Cutecoin%200.10","labels_url":"https://api.github.com/repos/ucoin-io/cutecoin/milestones/6/labels","id":970596,"number":6,"title":"Cutecoin 0.10","description":"","creator":{"login":"vtexier","id":2174016,"avatar_url":"https://avatars.githubusercontent.com/u/2174016?v=3","gravatar_id":"","url":"https://api.github.com/users/vtexier","html_url":"https://github.com/vtexier","followers_url":"https://api.github.com/users/vtexier/followers","following_url":"https://api.github.com/users/vtexier/following{/other_user}","gists_url":"https://api.github.com/users/vtexier/gists{/gist_id}","starred_url":"https://api.github.com/users/vtexier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtexier/subscriptions","organizations_url":"https://api.github.com/users/vtexier/orgs","repos_url":"https://api.github.com/users/vtexier/repos","events_url":"https://api.github.com/users/vtexier/events{/privacy}","received_events_url":"https://api.github.com/users/vtexier/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":26,"state":"open","created_at":"2015-02-08T17:34:51Z","updated_at":"2015-06-15T15:22:53Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2015-06-14T20:44:53Z","updated_at":"2015-06-18T18:58:37Z","closed_at":null,"body":"In relative view we should see 1 UD, but it appears 0,90909 which is exactly the well known 10/11 fraction... :) Probably you take last UD you divide by actual one.\r\n\r\nIt appears also that M in units divided by UD in units is not the same result in relative view neither.\r\n\r\nAlso the account in MB divided by the UD in MB don't give the same result we see in relative view...\r\n\r\nNote : you can either\r\n\r\n(1) Calculate the DU live\r\n(2) Use the DU in the blockchain, but as M is added of the DU just when it is calculated by uCoin, you will have a DU more in the money. So you can calculate all relative view dividing by 1,1 DU. For instance (M/N) / (1,1*DU) will give you the correct answer 1/c DU and not the incorrect 1/c + 1 (11 for 1/c = 10).\r\n\r\nProbably the best option is the first one. So you need to calculate the DU corresponding to a M(t)+N*DU using the full monetary mass with the general formula DU(actual) = Max(DU(t);c*[M(t)+N*DU]/N) which will be the correct DU(t+1) one, if N(t) doesn't move.\r\n\r\nIt is necessary, because with second option, you will have false calculation when DU is stable."},"comment":{"url":"https://api.github.com/repos/ucoin-io/cutecoin/issues/comments/113258033","html_url":"https://github.com/ucoin-io/cutecoin/issues/148#issuecomment-113258033","issue_url":"https://api.github.com/repos/ucoin-io/cutecoin/issues/148","id":113258033,"user":{"login":"vtexier","id":2174016,"avatar_url":"https://avatars.githubusercontent.com/u/2174016?v=3","gravatar_id":"","url":"https://api.github.com/users/vtexier","html_url":"https://github.com/vtexier","followers_url":"https://api.github.com/users/vtexier/followers","following_url":"https://api.github.com/users/vtexier/following{/other_user}","gists_url":"https://api.github.com/users/vtexier/gists{/gist_id}","starred_url":"https://api.github.com/users/vtexier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtexier/subscriptions","organizations_url":"https://api.github.com/users/vtexier/orgs","repos_url":"https://api.github.com/users/vtexier/repos","events_url":"https://api.github.com/users/vtexier/events{/privacy}","received_events_url":"https://api.github.com/users/vtexier/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T18:58:37Z","updated_at":"2015-06-18T18:58:37Z","body":">The definition of UD(t) is : what it is added to members accounts from M(t) to obtain M(t+1).\r\n\r\nThat definition does not reflect the UD block generation of ucoin as explained in the protocol : \r\n\r\n**UD(t+1) = CEIL(MAX(UD(t) ; c * M(t) / N(t+1) ))**\r\n\r\nHere we have UD(t+1) added to M(t) to get M(t+1)...\r\n\r\nSo if we say that LAST UCOIN UD BLOCK TIME is \"t\" then it contains : \r\n\r\n* M(t) = Monetary mass including UD(t)\r\n* UD(t) = Calculated on M(t-1) and added to M(t-1) to obtain M(t)\r\n* N(t) = Nb of members included those of this block, used to calculate UD(t)\r\n\r\nSo my very first screenshots showing M(t), N(t) from the last block does not seems wrong to me.\r\nAnd calculating live the UD(t+x, or t+1 or present) based on M(t) to have relative referential give accurate results on display.\r\n\r\nFurthermore, all the display is based on the only last valid block of the blockchain so every users will see the same thing. If not, it means that their client is not synchronised correctly with the blockchain.\r\n"}}