[ZIP-18] Simple TX Spamming Protection

Hi @kat

I found that the dollar price is not really mattering here. I’ve rather focused on the ratio to other blockchain functions like sending a ZRC-2 around (1 ZIL) or swapping on ZilSwap (4 ZIL).

Current ratios:
ZRC-2 token transfer: 1:500
Zilswap swap: 1:2000

Proposal’s ratios:
ZRC-2 token transfer: 1:10
Zilswap swap: 1:40

I’ve figured these ratios would be meaningful.

Your dollar price argument does not really hold, because imaging paying $8 for a swap if $ZIL rises to $2. This is basically Ethereum costs. Thus, gas price would need to be reduced anyways then for all stuff happening on the blockchain.

Edit: If $ZIL rises to Ethereum-like marketcap, Zilliqa swaps would be actually more expensive then Uniswap swaps on Ethereum. Think about that. :thinking:

1 Like

Agree to your argument on using the ratios, and not the dollar figures. However, I think the solution should entail some sort of dynamic pricing model / bond curve for gas fees based on the address in use, general demand, block usage etc. rather than manual fixing everytime based on then existing scenarios.

1 Like

I would love to investigate more on dynamic gas price.

Maybe we could talk about this in a different proposal as this would be much more complicated to define and implement. If you open a new thread on this, I would love to dig deeper on that idea: “Dynamic gas price adjustment”

Assigned a ZIP number. ZIP-18. Voting will commence in a week (after Tuesday) due to Chinese New Year holidays.

Can you do a markup version of the ZIP-18 proposal and submit a PR under:

Thanks!

Thanks for assigning the ZIP number.

The PR is done.

For those interested, you can check out the gas pricer which will be triggered when there is congestion. This is our mechanism for dynamic pricing.

1 Like

If there is one thing that is missing in this proposal is a comparison with other chains (non-ETH). If by increasing the gas price by a factor of 50x for payment transactions makes it more expensive to send payment transactions compared to other non-ETH chains, then this might be an issue for end users. Therefore, it will be good to do a bit of benchmarking so as to position this increase wrt cost on other chains. This will further help justify the factor 50.

FWIW, I did some back-of-the-envelope calculation to compare the gas price of the simplest transactions on Cardano and Algorand. From what I see, the smallest fee on Algorand is 0.001 ALGO which is currently traded at $0.8360 and therefore costs $0.0008269 while on Zilliqa, it costs $0.00016502 assuming $0.08251 per ZIL and 0.002 ZIL as gas price. The minimum transaction fee on Cardano is 0.5149 ADA which at the current price of $0.5132 is equal to $0.079. While the minimum fee in Zilliqa is 0.002 ZIL which at current price of $0.08251 is $0.00016502

2 Likes

Hi @maqstik !

On the small end I was considering increasing it by a factor of 10 would be meaningful while with the factor of 50 we are probably more on the high end.

NORMAL_TRAN_GAS to 10 would result in the following ratios:

ZRC-2 token transfer: 1:50
Zilswap swap: 1:200

If we are using a poll with multiple choice we could vote on FOR or AGAINST and at the same time for the factor, like:

Edit: Although this might be probably in favour of AGAINST voters. Fair would be single choice and summing up all FOR in the end.

FOR or AGAINST. Select up to 3 options!
  • AGAINST
  • FOR and NORMAL_TRAN_GAS = 10
  • FOR and NORMAL_TRAN_GAS = 25
  • FOR and NORMAL_TRAN_GAS = 50

0 voters

Of course, we can include some comparison table to other blockchains in the specification, but the comparison most likely won’t be completely accurate because you would need to look at the tokeneconomics of each blockchains in a bigger picture, e.g. inflation rate, are fees burned or distributed to miners, etc…

Furthermore, I find the dollar price of transactions is something to be adjusted using the gas price. For this proposal I would like to mainly focus on getting meaningful ratios of payment transactions to other blockchain functions.

1 Like

@Snowsledge

I would prefer to postpone the voting until ZilSwap LPs are able to vote. Worst thing that could happen is that the voting fails due to missed quorum…

Now, there is already 24k $gZIL locked in ZilSwap.

3 Likes

Yes, we are working on that. Good point. Hoping to deploy by new build by mid Feb.

2 Likes

If it adds security and value to the project its a no brainer.

Enabling of ZilSwap LPs the ability to vote is ready now, will be deploying to production soon.

We can start voting on ZIP-18 beginning next week Monday 8pm (GMT +8).

1 Like

Awesome!

The poll above suggests NORMAL_TRAN_GAS = 10 could be more widely accepted. (Although 9 voters are of course not a representative amount of people)

I tend to change the proposal to NORMAL_TRAN_GAS = 10 ( It is still a 10x increase of fees. Thus, significant.) and go for a binary No/Yes vote in order to avoid any complications.

What do you think?

New Snapshot build with ability to capture LP token holdings is up: Snapshot.

For all ZIPs, the voting option has to be binary (YES/NO). If you wish to, you can create a non-ZIP vote (not formal binding) on Snapshot and rally gZIL holders to signal their votes so we can understand the landscape better first.

Can you give update the ZIP-18 PR on Github to the number you would like to include for this proposal? Voting will begin tmr.

One point to consider is that basic transactions are more parallelizable at the protocol level than smart contracts are: that is, there is a technical reason that basic transactions are cheaper.

One of the key advantages of Zilliqa is that it is cheap to use. This is because technically it can handle much higher TPS than Ethereum, etc. Zilliqa can currently do at least 1,000 basic transactions per second (it has done 2,500 per second under some conditions). That’s 86+ million transactions per day. Keep in mind, also, that by adding extra shards we can increase our TPS, so if the network has sustained growth in transactions it can adjust to handle them efficiently.

If we want to get into the business of floating the price to prevent attacks that at this point are more theoretical than real – which I’m not sure we do – then we should try to adjust it from time to time to stay near USD 0.01 for a basic transfer (about ZIL 0.1 today, but if ZIL continues to go up in USD terms then we should try to move the transaction cost in ZIL back down). At that level, a 1-day spam attack would cost USD 860k per day – not chicken feed – while basic transfers are still quite cheap compared to e.g. Ethereum. If the attack is sustained for longer than a day or so I bet the network will just add a shard, meaning that the attackers are spending millions and not really clogging the network.

I think if ZIL goes to USD 1, then we move the gas price down to ZIL 0.01 to keep basic transfers to around USD 0.01. Of course, if real attacks start occurring (right now, this is all pretty much in the realm of theory), we can reconsider.

2 Likes

@Snowsledge

I want to stick with the current proposal as is. I still find the ratios between ZRC-2 token transfers and normal TXs given as reasonable. If we find that with increasing $ price of ZIL fees seem to be too high in general, we have to go for another proposal and concentrating on the gas price.

So, for this proposal, I’d stick with it as is.

Let the gzil holders vote!

@GodZILla

I think we are more or less on the same page here. When talking about 2500 TX per second, this is pretty much theory as well and has never been seen on mainnet. I fully agree with you when ZIL dollar price rises to higher levels, the gas price has to be adjusted. Just consider Zilliqa would have the marketcap of Ethereum right now, then using ZilSwap would be equaly expensive as using Uniswap and this has to be handled via the gas price.

You are saying that normal transactions can be that cheap because of technical reasons (can go through shards). I wonder if ZRC-2 token transfer might also be handled by shards in the future in the same way as normal transactions (send it to a shard based on the sender address). I have no clue about the status on smart contract sharding right now, but it is defenitely something we will need in the future for Zilliqa to survive.

1 Like

https://vote.zilliqa.com/#/gzil/proposal/QmcxZJ5x7o9tWRmjD73uopRno35iwJhydgTTCbHsS1AFUt

Vote scheduled to start 25th Feb 2021, 04:00 UTC. Voting period = 1 week (7 days).

What would you define as spamming/useless transactions? If you want to increase adoption in a competitive environment than your proposal doen’t make sense. We only need to look to Ethereum and learn from them.

There are already a number of people complaining about smart contract gas fees and now you want to increase the price of simple transaction before Zilliqa blockchain is widely adopted? It’s wrong strategy in my opinion.

You have even stated that currently we only have around 0.4txn/s

So where is the spam in this?