PQ performance with linear distribution of TX by wallet balance

This post explores the performance of Nano with a TaaC/P4Q implementation as described here: Time-as-a-Currency & PoS4QoS - PoS-based Anti-spam via Timestamping

In particular, I was interested in performance with all TX in the Priority Queue during a spam attack if a strict linear distribution of available TX was made based on wallet balances. (i.e., if you own 1% of all Nano you get rights to 1% of available TX capacity.)

This differs from Rob's skewing in favor of smaller accounts to give regular users more TX. While it is a good goal to get them more TX, from repeated discussions here it's clear there is a concern that an attacker could spam millions of dust addresses and thus claim the majority of the PQ under such a skewing. In my proposal here that doesn't work - if the attacker wants to hog over 50% of TX capacity they would need to own over 50% of all Nano. (*Edit: This is without considering donated TX capacity. In that case they'd only need 50%+ of wallet balances attempting spending. Which is still a lot in any real-world context.)

Note that in my figures below I assume a current TX capacity of 100 TX/second. My goal is to understand what happens in the near future with this proposed implementation. Naturally if Nano goes global, the price of Nano rises and many accounts considered "dust" today will need a decent TX rate. But that's a general problem for Nano, not one particular to this model. We all know we need more TX capacity to gain large-scale adoption.

Using the data from Rob's pyramid, we see that wallets with 1000 Nano and higher would be able to transact every 22 minutes or faster. Going down to 100 Nano (~$500) the rate drops to every 222 minutes, or 6.5 TX/day. That would be adequate for light to moderate users of Nano, albeit users might have to plan out or delay some TX because of the 222 minute spacing.

Down to 10 Nano we see the rate drop to 1 TX every 1.54 days - enough to get funds to an exchange or make an occasional purchase but not use it heavily. But at this point we're only talking about $50 worth anyway. Below this we have the wallets of smaller users and then the numerous dust accounts, which would effectively be pretty well frozen if TX were only happening on the PQ. Note that this would limit a dust-wallet spammer to only impacting the NQ, which, since no TX would be happening on it, means the only effect a spammer would be having is in keeping all TX under PQ rules rather than NQ for the duration of the attack.

This isn't functional for smaller users and has some impact on moderate sized wallets, so what can be done to improve this situation? In his posts Rob outlines the possibility of the protocol automatically donating unused TX capacity to wallets seeking to transact. I think this would be extremely helpful.

For example, let's assume the "investor" class accounts require virtually no TX capacity (at least relative to their allocations); for simplicity let's say that inactive smaller accounts can donate an amount equal to that actually used by the exchange-sized accounts. This results in 93.31% of available TX capacity going unused on the PQ and donated to anyone who needs it.

That speeds up TX by a factor of 15. The user with a 10 Nano wallet can now make 10 TX/day instead of one every 1.54 days. Basically it works out that for every 1 Nano you have in your wallet you can make 1 TX/day. This isn't perfect, but for a near-future scenario this means only the dust-sized accounts really get frozen and anyone with enough Nano to buy a candy bar or use a parking meter could pretty much still do so.

Note that a spammer with huge numbers of dust wallets would still not benefit effectively from the TX donations unless they owned a large % of Nano relative to all the honest users' Nano balances. If 10% of Nano users by wallet balance were attempting to transact on the PQ and the spammer "only" owned 0.1% of Nano the spammer would only get 1% of the donated TX. The number of wallets they controlled would be irrelevant.

TL/DR: Allocating TX capacity in a strictly linear fashion (owning 1% of Nano gives you 1% of TX capacity), combined with automatic donation of unused TX capacity by the protocol, results in a workable solution for outlasting spam attacks or other network overload events. Skewing the base allocations towards smaller balances empowers the spammer, whereas a linear distribution with donation of unused TX capacity gives smaller users an acceptable TX rate (roughly 1 TX per day for every 1 Nano in their wallet) without giving the spammer enough TX to matter.

4 Likes

Hey, replying from reddit. I think it does make that attack vector much harder to execute since it reduces PQ TPS for low value wallets significantly. One concern some people will probably have is that with your proposal, it will make low value wallets unuseable on PQ. This will make them rely on NQ. If NQ is not spammed, they'll be okay.

And once they have to use NQ. It's another problem entirely since PoW is their only protection.

This is not a problem with your proposal, but is a problem with how to protect NQ is the first place.

1 Like

Fair points. NQ is currently protected by PoW, and if that can be improved that would be good.

One point I'll add is that in my example resulting in a 15X increase from the baseline, I simply assumed unused TX from low value wallets would equal TX from exchange wallets. That's a wild guess on my part and I'd appreciate a better analysis if anyone has some data on TX distributions by wallet balance. For example, how many people with a 10 Nano wallet in the near future would really be using it 10 times/day, eating up their PQ TX allotment in my scenario above? My guess is not many. And those with 100-1000 Nano would barely be touching their allotment.

So I'd guess even a lot of 1-1000 Nano wallets would be donating most of their TX, with the result that even the <1 Nano wallets would wind up getting a fair shot at transacting.

Some further thinking out loud: If (1) the transaction capacity of the Nano network is decently larger than legitimate (non-spam) demand at any given time and (2) all unused TX allotments are donated in the PQ, then by definition I don't think we have a problem with users wanting to move their Nano. Given (1) there would always be some amount of available TX capacity that could be made available to even the smallest nodes wanting to transact.

Under these assumptions the spammer could soak up all unused TX capacity and keep the PQ 100% full. Not sure how serious this is, since from what I understand above everyone would be able to transact at will. But it's probably not a healthy state for the network to be kept in.

Note that I'm assuming donated TX allotments would go to wallets prioritized by wait time to their next base TX allocation. In other words if one account had 1 day to go to their next base TX allotment and another had 1 hour to go (as based on the chart above and the time since their last TX), the latter wallet would be able to transact first.

OK, so what would prevent a spammer from spamming with a larger nano balance to continually get priority over a small account that needs to wait days (or more) in the chart above? Seems to me that using donated TX would need to result in a "penalty time" adjustment to a wallets next TX so that it would lose priority with each additional TX until even the smallest wallets got their turn. That would prevent a 100 Nano wallet with a 222 minute wait time from spamming endlessly to exclude wallets with 1 Nano that have to wait over 15 days until their remaining time drops below 222 minutes.