# Distribution fees problem

#### GabrielNN

##### New member
Hey guys, nice to meet you. I have a problem. There is a way to distribute the fees among the participants and I will explain why I am showing it to you.

Imagine that we have a total stock of 100 coins.

Account A -> has 50 coins
Account B -> has 20 coins
C accounts -> has 30 coins
Total =========> 100 coins

Nothing new here.

All right, but imagine that account A wants to transfer 10 coins to account B. In a system without fees, we would probably only need to increase one part and decrease another part.

But, imagine we have a 50% rate (I know, it's just for math to be more expressive).

Thus, Account A will decrease 10 coins, obtaining a balance in 40 coins ( 50 - 10 ). But instead of Account B getting all 10 coins, it actually gets half because the rate is 50%.

So now the balance is

Account A -> has 40 ( 50 - 10 )

Account B -> has 25 ( 20 + 5 )

Account C -> has 30

FEES - has 5

Total =========> 100

One way to make this distribution for the entire system is to reduce the total available balances. Before we had 100 coins, but as rates increased by 5 coins, we got 95

And it makes sense, because

A B C Total
40/95 + 25/95 + 30/95 = 95/95 = 1

This approach is meant to encourage the "holders" of some currencies in some systems. Let's think about it, Account C, while doing nothing, actually increased its market share, because before it had 30/100 (30%), now it has 30/95 (>30%). Impressive.

But actually this approach also reveals some problems, as whoever has the biggest account balance will receive the biggest reward as well. It's a linear function. If you have 90% of the coins, in this logic, you get 90% of the rewards. Right?

My idea is, could we be doing something better? I'm having trouble implementing some mathematical calculus that could use a function like y = √x, where "x" is the user's balance proportion and "y" is the reward.

Because in this way the more you have coins, the less you receive in REWARDS on an equal basis, it is no longer linear, allowing smaller holders to be more rewarded.

So does anyone have any idea if this is possible? Because in the first case I don't need to know in advance how much participation each one has, the denominator is the same for everyone, but in this new concept, I would have to know in advance how much each one has to create a "differentiated" denominator instead of ( "balance" /95 to everybody) for each account based on its own bank balance.

#### Xre@

##### New member
There is no solution..

#### Cubist

##### Senior Member
Are you designing a game? The following suggestion might be suitable. You almost wrote the answer in your first paragraph, "distribute the fees among the participants".

A 20 (20% of total)
B 10 (10%)
C 10 (10%)
D 60 (60%)

A wants to pay 8 towards B, but 4 is taken in fees. Then, distribute the fees evenly between all 4 accounts:-

A 12 + 1 from fees= 13 (13% of total)
B 14 + 1 from fees= 15 (15%)
C 10 + 1 from fees= 11 (11%)
D 60 + 1 from fees= 61 (61%)

Both C and D gain 1% of the total. However, the percentage increase for each account is...
C (11-10)*100/10=10%
D (61-60)*100/60= 1.7%
...and you don't need to know the amounts in each account.

For a bigger effect, to further discourage large account balances, you could do some quantitative easing (printing money). If A wants to pay 8 towards B then 4 is taken in fees. The treasury/bank also prints an extra 4. Then, distribute the 4+4=8 evenly between all 4 accounts:-

A 12 + 2 = 14 (13.46% of total)
B 14 + 2 = 16 (15.38%)
C 10 + 2 = 12 (11.53%) <- percentage of total is up from 10%
D 60 + 2 = 62 (59.62%) <- percentage of total is down from 60%

#### GabrielNN

##### New member
Are you designing a game? The following suggestion might be suitable. You almost wrote the answer in your first paragraph, "distribute the fees among the participants". A 20 (20% of total) B 10 (10%) C 10 (10%) D 60 (60%) A wants to pay 8 towards B, but 4 is taken in fees. Then, distribute the fees evenly between all 4 accounts:- A 12 + 1 from fees= 13 (13% of total) B 14 + 1 from fees= 15 (15%) C 10 + 1 from fees= 11 (11%) D 60 + 1 from fees= 61 (61%) Both C and D gain 1% of the total. However, the percentage increase for each account is... C (11-10)*100/10=10% D (61-60)*100/60= 1.7% ...and you don't need to know the amounts in each account. For a bigger effect, to further discourage large account balances, you could do some quantitative easing (printing money). If A wants to pay 8 towards B then 4 is taken in fees. The treasury/bank also prints an extra 4. Then, distribute the 4+4=8 evenly between all 4 accounts:- A 12 + 2 = 14 (13.46% of total) B 14 + 2 = 16 (15.38%) C 10 + 2 = 12 (11.53%) <- percentage of total is up from 10% D 60 + 2 = 62 (59.62%) <- percentage of total is down from 60%

Man!!! Thank you so much for your answer !! I really appreciate this! I understand what you did, but I didn't actually give all the explanations for this problem, my fault. And actually, already answering your question about the purpose of the problem, it's for a mechanism in a blockchain involving cryptocurrency, and here, I'll explain why the strategy is to use something in 'denominator'. In blockchain technology, it's very expansive to save all users in an organized way and individually increase these rates, so the strategy behind the "denominator" is to create something that everyone can consume, we don't change the "nominator balance", instead we change something in an easier and more shared way.

What I'm trying to do is create some equally easy way of sharing information. One solution I thought was that I could create two records for each user, one of gains (example: 40/100 (40%)) and other of losses (fees for your transfers), instead of getting the full denominator with all rewards. When it comes to knowing how much the account would be entitled to, subtract your balance of losses, but it involves other problems, because just by creating another account, the losses would be reset, although he would have to make a transfer between his accounts that would put him in losing money also.

We store users on the blockchain LITERALLY like this, although we cannot individually add each reward.

Again, it's literally like that.

John => 24232 coins
Mary => 88553 coins
Matt => 11221 coins

and we have a public record like that ( we can create variables we want )

total coins => 124006

when i want to know john's balance, the only thing i do is

john % = 24232 / 124006

is easy.

but there's this problem I told you about. it's unfair, because whoever has the most tokens gets almost all the rewards.

A parallel solution that I imagined:

John => 20,000
Mary => 30,000
Matt => 50,000
Total => 100,000

John transfers 10,000 to Matt. (50% fee)

Now we have:

John => 10,000
Mary => 30,000
Matt => 50,000 + 5,000 = 55,000
Total => 100,000 - 5,000 = 95,000

But john also took a penalty on fees, so instead of being 95,000, I record that he still sees the denominator as 100,000.

Penalty Balances
John => 5,000
Mary => 0.000
Matt => 0.000

Now to calculate john's balance I do

John % = 10,000 / (Total + John Penalty)

John % = 10,000 / 95,000 + 5,000

But I'm not solving any unfair rate issue, I'm just penalizing the transfer. So it's not the right answer to the problem.

Man, if the problem I'm bringing you seems really crazy and you feel difficult, don't worry. Because it's like I told you, it's a blockchain context that you might not be familiar with. However, the math resolution is as simple as the ones posted here by me. Everything you can put in a variable, or create a shared records like "balances" or "penaltys" it's possible to do. They just don't allow iterating between the accounts to add individually. The rest comes from the imagination.

Again, I really appreciate your time in writing this answer, if you can think of something based on the information I've given you, very cool!

Last edited:

#### GabrielNN

##### New member
For a bigger effect, to further discourage large account balances, you could do some quantitative easing (printing money). If A wants to pay 8 towards B then 4 is taken in fees. The treasury/bank also prints an extra 4. Then, distribute the 4+4=8 evenly between all 4 accounts:-

A 12 + 2 = 14 (13.46% of total)
B 14 + 2 = 16 (15.38%)
C 10 + 2 = 12 (11.53%) <- percentage of total is up from 10%
D 60 + 2 = 62 (59.62%) <- percentage of total is down from 60%
I understand your solution, in fact, it's not to discourage accounts with high balances, but to do they get less rewards.
Because the problem would be that transferring it between different people, like from A to B, could remove D's wealth. Ideally it would be if everyone's wealth would be equal or greater, if they weren't the ones transferring the money.

#### lev888

##### Senior Member
I understand your solution, in fact, it's not to discourage accounts with high balances, but to do they get less rewards.
Because the problem would be that transferring it between different people, like from A to B, could remove D's wealth. Ideally it would be if everyone's wealth would be equal or greater, if they weren't the ones transferring the money.
What are the principles behind this system of fees and rewards? It seems very strange to me. What do you mean by "Ideally it would be if everyone's wealth would be equal or greater"? What's so great about everybody's wealth being equal? What's is unfair about accumulating more than others by making wise choices and not spending your coins? How does my account get rewarded by someone else paying fees? Do those fees disappear? Or someone who does the work necessary to enable the transaction gets them?

#### JeffM

##### Elite Member
Your explanations are incomprehensible. I do not know if English is not your native language or if you simply have no idea how to write technical exposition.

Each actor in the system has a non-negative number of coins. Is that correct?

Actors can transfer coins to other actors. So A can transfer to B. Is that correct?

Each transfer is subject to a fee, which is proportional to the amount transferred and is deducted from what the recipient receives. (Makes sense. If you are a gun runner, you should be willing to pay to cover up your tracks.) Do I understand it?

Now there are also rewards. You do not say what the rewards are for. They sound sort of like dividends. It is normal for dividends to be distributed pro-rata according to how many shares a stockholder holds. But you want to penalize people who have more coins? Do I understand that correctly? (I'd see no reason whatsoever to build up a balance in this cryptocurrency under those rules because you would maximize your reward by holding a zero balance.) If, however, the rewards are to encourage certain behavior, then why not base the rewards on that behavior.

You then you begin to talk about market share. Why would anyone care about market share? What you care about are the value of the coins. You do understand that if you grant rewards proportional to the holdings of coins, no one's market share goes up. If A has 9000 coins and B has 1000 coins, and you give a reward of r per coin, A's market share before the reward is 90% and after the reward is

[MATH]\dfrac{9000 + 9000r}{10000 + 10000r} = \dfrac{9000(1 + r)}{10000(1 + r)} = \dfrac{9000 \cancel{(1 + r)}}{10000 \cancel{(1 + r)}} = 90\%.[/MATH]
Now I do not understand the technical reasons why you want to record numerators instead of just counting coins. But if you change the total number of coins in the hands of customers (whether through fee reductions or rewards awarded, you have to change the denominator and recompute all the numerators against the revised denominator. .

#### GabrielNN

##### New member
Cool guys, I'll try to bring together the two answers above. Yes, English is not my native language, so I'm sorry about that. On the issue raised that I wanted the wealth among the participants to be equal, no, I don't want that, what I said is that it would be nice for a person's wealth to be at least equal to or greater than their own wealth , because in the solution pictured above, transactions involving third parties could deteriorate my capital. The understanding that this reward would basically be like dividends is correct and the incentive behind it is to remunerate the holder of the currency at the expense of those who prefer to trade it.

Actually the account for a user is this:

% / total coins * (totalSupply) <- totalSupply never changes, under the hood, everyone is vying for the 100% share.

example

Balance User A = 20 / 100 * 5556663 coins = 1111332.6 coins balance

Balance User A =20 / 95 * 5556663 coins = 1169823.78947 coins balance

Everything is calculated and brought up automatically by the blockchain and the user. If the denominator changes from 100 to 95, he automatically sees his balance increase and if the price of the currency does not devalue so much comparatively, it is an incentive for him to keep his cryptocurrencies.

I understand that since we have a rate that subtracts 5, for example, from 95. So if we want to make those with less tokens earn more compared to those with a lot of tokens, some should go down from 95 and others should go up 95 for math close. And the only variable actually to be calculated to know this is the user's own balance like ( 53.5/95 ~ 56% ) , so it can be above 95. As for someone who has ( 2.9 /95 ~ 3%) it can go below 95 and earn a little more reward than you would. The idea is that based on market share some would go down from "95" and others would go up. But in the end the sums should be equal 1, does it make sense to you guys?

Last edited:

#### JeffM

##### Elite Member
Hey there is nothing to apologize about for not having English as a native language. There are hundreds of languages that are not my native language. My point is that knowing English is not your native language means it may take a while to understand the problem. Everyone will have to be patient.

Now you say that the total number of coins never changes. So how do these fees work? Person A initially has 100000 coins, which represents 10% of the total, and person B has 900000, or 90% of the 1,000,000 total. Next A transfers 5000 coins to B, who pays a fee of 250. At the end of the transaction, A has 95000 coins and B has 904,725 for a total of 999,750 coins. The total seems to have changed, or is there now a C who has been gifted 250 coins? Now suppose D wants to buy 1000 coins. Does that mean A’s coins are now reduced to 94905, B’s are reduced to 903,845.25, C’s are reduced to 249.75, and D now has 1000, all of which do add up to a total of 1,000,000. Do I have it?

Now answer me this. Why would I want to buy these coins in the first place if my stake is continually being reduced?

#### GabrielNN

##### New member
Sorry for taking so long to respond, my job is taking a lot out of me. And thanks for the empathy with the language. I try to draw a picture to try to help show how rates flow, The big question pointed out to you why you would invest in a currency that would reduce the amount received is that, in fact, this would be exactly the desired effect, to curb large players from owning the currency in excess, creating a more distributed network.

In a nutshell, this model is very similar to stock dividends, the more shares you have, proportionally you earn in dividends, but imagine a fairer system where you decrease in yield as you accumulate coins and this somehow makes the system less corruptible and manipulable and more distributed because agents will know that they don't receive a linear return the amount of their shares, can you see that?

#### Attachments

• Frame 2 (1).jpg
244.5 KB · Views: 1
Last edited:

#### JeffM

##### Elite Member
Sorry for taking so long to respond, my job is taking a lot out of me. And thanks for the empathy with the language. I try to draw a picture to try to help show how rates flow, The big question pointed out to you why you would invest in a currency that would reduce the amount received is that, in fact, this would be exactly the desired effect, to curb large players from owning the currency in excess, creating a more distributed network.

In a nutshell, this model is very similar to stock dividends, the more shares you have, proportionally you earn in dividends, but imagine a fairer system where you decrease in yield as you accumulate coins and this somehow makes the system less corruptible and manipulable and more distributed because agents will know that they don't receive a linear return the amount of their shares, can you see that?
I don’t see what the problem is. You have x to share out. You can make up any sharing ratio that you want provided the shares in the aggregate add up to 100%.

A has 70%, B has 20%, and C has 10%. You want to pay a reward of 4.

Raise C to 12.8 = 10 + 0.7 * 4. C’s share has been raised from 10% to about 12.3%.

Raise B to 20.8 = 20 + 0.2 * 4. B’s share has been left unchanged.

Raise A to 70.4 = 70 + 0.1 * 4. A’s share has been reduced from 70% to about 67.7%.

The arithmetic seems trivial. I do not see why it is particularly fair or why anyone wants to play.

#### HallsofIvy

##### Elite Member
Hey guys, nice to meet you. I have a problem. There is a way to distribute the fees among the participants and I will explain why I am showing it to you.

Imagine that we have a total stock of 100 coins.

Account A -> has 50 coins
Account B -> has 20 coins
C accounts -> has 30 coins
Total =========> 100 coins

Nothing new here.

All right, but imagine that account A wants to transfer 10 coins to account B. In a system without fees, we would probably only need to increase one part and decrease another part.

But, imagine we have a 50% rate (I know, it's just for math to be more expressive).

Thus, Account A will decrease 10 coins, obtaining a balance in 40 coins ( 50 - 10 ). But instead of Account B getting all 10 coins, it actually gets half because the rate is 50%.

So now the balance is

Account A -> has 40 ( 50 - 10 )

Account B -> has 25 ( 20 + 5 )

Account C -> has 30

FEES - has 5

Total =========> 100
You said "A wants to transfer 10 coins to B's account" but he only transfered 5! Why is the fee coming out of B's account? Wouldn't it make more sense to take the fee out of A's account so he has 50- 10- 5= 35 and B has 20+ 10= 30?
One way to make this distribution for the entire system is to reduce the total available balances. Before we had 100 coins, but as rates increased by 5 coins, we got 95

And it makes sense, because

A B C Total
40/95 + 25/95 + 30/95 = 95/95 = 1

This approach is meant to encourage the "holders" of some currencies in some systems. Let's think about it, Account C, while doing nothing, actually increased its market share, because before it had 30/100 (30%), now it has 30/95 (>30%). Impressive.

But actually this approach also reveals some problems, as whoever has the biggest account balance will receive the biggest reward as well. It's a linear function. If you have 90% of the coins, in this logic, you get 90% of the rewards. Right?

My idea is, could we be doing something better? I'm having trouble implementing some mathematical calculus that could use a function like y = √x, where "x" is the user's balance proportion and "y" is the reward.

Because in this way the more you have coins, the less you receive in REWARDS on an equal basis, it is no longer linear, allowing smaller holders to be more rewarded.

So does anyone have any idea if this is possible? Because in the first case I don't need to know in advance how much participation each one has, the denominator is the same for everyone, but in this new concept, I would have to know in advance how much each one has to create a "differentiated" denominator instead of ( "balance" /95 to everybody) for each account based on its own bank balance.