Transaction Fees

Development & Technical discussion about Timekoin.
Forum rules
Bug Collecting Database is Click Here
GitHub Account is Click Here
warmach
Posts: 404
Joined: Thu Jun 21, 2012 5:18 pm

Transaction Fees

Post by warmach »

I am starting a new thread to discuss the merits of using/not using transaction fees. This discussion started in the version 4.x feature request thread and has grown where it probably needs its own thread.

The last proposal in the aforementioned thread was that the protocol would be adjusted to allow 1 free transaction every 5 minutes. All subsequent transactions would be a 1 TK fee until the next 5 minute transaction cycle.

Discuss...
warmach
Posts: 404
Joined: Thu Jun 21, 2012 5:18 pm

Re: Transaction Fees

Post by warmach »

I still don't like the 1 free transaction. It provides loophole for an attacker to bloat the blockchain still. Stopping bloat was the purpose of the transaction.

How? I would just create several vps or Pi TK servers. I would then transfer funds every five minutes back and forth. I would then dump hundreds of election requests to the network with bogus info. While these requests wouldn't necessarily make it to the block chain, they would need to be processed and validated slowing down the network. Then, if easy key registration didn't count as your free transaction, I would just create tons of random easy keys.

Maybe I'm being paranoid or missing some TK feature that neutralizes these things. To me, having a fee for each transaction makes the attack self defeating, except election request stuff.
User avatar
bucket
Posts: 32
Joined: Thu May 16, 2013 8:30 pm

Re: Transaction Fees

Post by bucket »

Thanks for creating this, it is helpful to steer the debate since transaction fees weren't part of the original list to work on for v4.

I thought easy keys were always going to cost? So if you create a ton of random ones, they won't be free? I liked the idea of the fee being the same as the number of servers generating, that could be low like now or high later as more servers join?

By that, the 1 free transaction would cost pile on top because if you register 10 easy keys, that it is the easy key reg fee plus the transaction fee again. So, say 30 servers generating and you want to either register 10 easy keys at once or 1 every 5 minutes to get the freebie.

At once, 10x30 = 300 tk easy key fee, transaction fee 1st fee, 9 others cost 9 tk, so total cost 309 tk.
Register 10 keys, 1 every 5 minutes to get free transaction, still going to cost 300 tk.

I agree, someone might want to just spam transactions, but I think the balance is good that at least 1 transaction can be free to everyone and anything more would make a spammer eventually run out of TK to spam with. Sure, you can open up 100 vps for the purpose of spamming but that cost money to keep those running and who want to waste money to spam useless transactions?

I see all points and opinions as valid, my own is keep the fee for easy key, keep the fee for any transaction after the 1st one and not worry that someone might decide to spend money to spam the network. No matter what rules are added, if someone wants to spam and has money, they will do it regardless of the amount of fees in place.
User avatar
joanofarc
Posts: 131
Joined: Sat Sep 08, 2012 8:09 am

Re: Transaction Fees

Post by joanofarc »

I was going to voice my concern about the transaction fee but after reading the concerns with bloat, spam, whatever we call it, 1 free transaction does not seem as bad when we send to each other a few at a time, I don't mind waiting to avoid the fee if I really want to wait, but even with the fee it wouldn't bother me. 1 TK each, that is hardly any cost. I understand that by having at least 1 TK fee, some spammer would eventually run out if doing 2 or more at a time. Doing 1 at a time forever, seems that is just the trade off of ease of use vs. security. Anyone done the math, how much space would 1 spammer doing a transfer ever 5 minutes eat into the database size? With that, easy enough to figure out how much 2 or 20 spammers could do for damage.
User avatar
KnightMB
Site Admin
Posts: 1019
Joined: Thu Feb 23, 2012 5:03 pm

Re: Transaction Fees

Post by KnightMB »

warmach wrote:I still don't like the 1 free transaction. It provides loophole for an attacker to bloat the blockchain still. Stopping bloat was the purpose of the transaction.

How? I would just create several vps or Pi TK servers. I would then transfer funds every five minutes back and forth. I would then dump hundreds of election requests to the network with bogus info. While these requests wouldn't necessarily make it to the block chain, they would need to be processed and validated slowing down the network. Then, if easy key registration didn't count as your free transaction, I would just create tons of random easy keys.

Maybe I'm being paranoid or missing some TK feature that neutralizes these things. To me, having a fee for each transaction makes the attack self defeating, except election request stuff.
Currently, servers can not send an election request directly to each other, they are ignored if sent this way. The only way that election request move around the network queue is by another server requesting it from the one who has it first. So it starts with the server wanting to be elected. Other servers poll it and find the election request. There is a check to make sure the election request isn't just random garbage, but if it has a valid public key and a place to verify it then the election request will get passed around to other peers and the process begins again when those are polled and presented the election request. The election request are basically bottom priority compared to transactions, currency generation, etc. That is why they are passed around for 30 minutes before the peer election to make sure every generating server had time to check the request, poll the new server or servers that want to join, and verify that they are answering the reverse-crypt test properly, history checks, etc. That way, the new server making the request doesn't get DoS by the network trying to verify it, all at the same time for example.

If the easy key does count at the free 1st transaction, it will still cost at least 1TK (or more?) for it because Timekoin doesn't allow 0 TK transactions. So registering easy keys non-stop would eventually run your balance down to zero also.
User avatar
KnightMB
Site Admin
Posts: 1019
Joined: Thu Feb 23, 2012 5:03 pm

Re: Transaction Fees

Post by KnightMB »

joanofarc wrote:I was going to voice my concern about the transaction fee but after reading the concerns with bloat, spam, whatever we call it, 1 free transaction does not seem as bad when we send to each other a few at a time, I don't mind waiting to avoid the fee if I really want to wait, but even with the fee it wouldn't bother me. 1 TK each, that is hardly any cost. I understand that by having at least 1 TK fee, some spammer would eventually run out if doing 2 or more at a time. Doing 1 at a time forever, seems that is just the trade off of ease of use vs. security. Anyone done the math, how much space would 1 spammer doing a transfer ever 5 minutes eat into the database size? With that, easy enough to figure out how much 2 or 20 spammers could do for damage.
I can answer that, each transaction record is roughly 1,030 bytes in size. If you sent one every 5 minutes for an hour, that would be (1030 x 12=) 12,360 bytes, per day that would be (12360 x 24=) 296,640 bytes, per year that would be (296640 x 52=) 15,425,280 bytes or (15.4 MB) of space per year with a 24/7 spammer using the 1 free transaction loophole. :mrgreen:
User avatar
PoisonWolf
Posts: 186
Joined: Fri Apr 12, 2013 10:39 am

Re: Transaction Fees

Post by PoisonWolf »

You know, the more I think about it, I think the 1tk per transaction fee isn't all that bad to be honest. The deterrence and security that it provides to people that would try to bloat the network is worth the 1tk IMHO. Timekoin as it is generates tonnes of tks, 1tk is really nothing.

Furthermore, the flat 1tk per transaction fee simplifies coding. There will not be any need for CPU cycles spend verifying if this is the 1st free transaction, or the 2nd transaction, etc. It would be a simple if-then 1tk subtraction whenever money is sent from Node A to Node B.
User avatar
koinmaster
Posts: 357
Joined: Mon Jun 18, 2012 8:07 pm

Re: Transaction Fees

Post by koinmaster »

Would it be automatic or some notification that "hey, this second transaction will cost you 1TK"? What happens if someone tries to send a second transaction but the amount is the whole account amount, leaving nothing left for a fee?
User avatar
KnightMB
Site Admin
Posts: 1019
Joined: Thu Feb 23, 2012 5:03 pm

Re: Transaction Fees

Post by KnightMB »

koinmaster wrote:Would it be automatic or some notification that "hey, this second transaction will cost you 1TK"? What happens if someone tries to send a second transaction but the amount is the whole account amount, leaving nothing left for a fee?
It could have to built into the GUI somewhere to let the user know. The logic to have Timekoin do the first transaction for free and without a fee, ignore the rest would not be difficult or CPU expensive on the server. It would be an either/or situation, either you have the fee to process the extra transactions or you don't and they become ignored.

If this is put into place, it would need an activation date to give time for everyone to upgrade, like 1 month are release with this feature for example would turn on and then any transactions being processed are checked for fees. The logic of it isn't difficult, just a matter of, should it be done, if so, what is the simplest way to do it without adding a lot of complexity to it.
User avatar
PoisonWolf
Posts: 186
Joined: Fri Apr 12, 2013 10:39 am

Re: Transaction Fees

Post by PoisonWolf »

KnightMB wrote:
koinmaster wrote:Would it be automatic or some notification that "hey, this second transaction will cost you 1TK"? What happens if someone tries to send a second transaction but the amount is the whole account amount, leaving nothing left for a fee?
It could have to built into the GUI somewhere to let the user know. The logic to have Timekoin do the first transaction for free and without a fee, ignore the rest would not be difficult or CPU expensive on the server. It would be an either/or situation, either you have the fee to process the extra transactions or you don't and they become ignored.

If this is put into place, it would need an activation date to give time for everyone to upgrade, like 1 month are release with this feature for example would turn on and then any transactions being processed are checked for fees. The logic of it isn't difficult, just a matter of, should it be done, if so, what is the simplest way to do it without adding a lot of complexity to it.
Knight, you seem like you're leaning more towards the 1 free transaction per 5 minutes. How about 1 free transaction per 60 minutes (12 5-minute cycles)? Anything more than that would require a fee of 1tk? If you think about it, if TK becomes mainstream, the average joe would likely at most only make a handful of transactions a day, which is why I suggested the 1 free transaction per hour.

Also, what do folks think about a transaction fee that scales with the size of the TK transferred? Like some have pointed out, right now TK's rate of creation is insanely fast. I think some sort of scaling transaction fee mechanism needs to be in place to control the rate of generation.
Post Reply