> Is this “30–50%” is proved or just based on your imagination？
Rough guess at the time of writing ;
Transferring an NFT costs about 28k gas (when not keeping track of balances), where 5k gas is used for updating the owner’s address of a given ID (1
SSTORE operation) and 21k is the base transaction cost. If you keep track of balances, then you have 2 additional
SSTORE operations, which would add about 20k + (-10K), or 10K gas just in
SSTORE additional cost. So doing this increase the cost by at least 10k gas, or ~36% increase compared to 28k.
> Can you prove this “linear”, or this is based on your imagination again Transfer 10000 NFTs one by one, during the same period, are you sure the total cost is just 10000 times of tranfering 1 NFT?
Yes, I believe so. Assuming the the base cost of each transaction is 21k gas and the cost of transferring one NFT is about 8k gas , transferring `N` NFTs one by one should cost
21000 * N + N*8000 , or about
21000 * (N-1) more than transferring in batch, which is linear.