If A wants to transfer 5 ZCoin to B, then A must call the ZCoin contract’s “transfer” function, passing as parameters B’s address and the amount of ZCoin tokens to transfer. What the function does is modify the ZCoin “balance sheet” so that after the transfer A has 5 ZCoin less and B has 5 ZCoin more. The balance sheet is stored as a mapping in the ZCoin contract (persistent) storage, which is stored on the Ethereum blockchain, and a function that modifies the blockchain storage classifies as a “transaction”, and transactions consume Gas, i.e. Ether. So yes, if A wants to transfer ZCoin to B, A’s Ethereum account must have some ETH balance to pay for computation/storage cost of the transaction. So at some point, either A or someone else must have deposited some ETH into A’s account.
Jan 21, 2018, 10:11 PM
By account I mean the ZCoin wallet address.
How will they pay for the ZCoins on your website?
How did pay for them?
^you
I don’t know about how it was for the EOS specifically, but could it be that the “wallets” were not stored on-chain?
Maybe e.g.
Jan 21, 2018, 10:30 PM
I will think that through a bit more and might come back in future when I can specify my question a bit
You have already helped a lot thx
Jan 21, 2018, 10:31 PM
Maybe EOS wallet website owned 100 coins, i.e. on the Blockchain the 100 coins were always EOS's
and maybe when you were "transferring"
the server website was just keeping tabs of who owns how much of those 100 coins
but not storing anything on the blockchain?
Don't know about how EOS was doing it, but that’s how exchanges do it usually.
as in
non-decentralized exchanges
Miners accept only ETH
the value of ZCoin vs ETH would vary all the time
Jan 21, 2018, 10:33 PM
Like when I send you 7 zcoins the miners could accept 0.2 zcoins for the transaction?
Jan 21, 2018, 10:33 PM
depending on market demand/supply
I’m not ignoring your answers Cryptobar
Just answering in a parallel thread
to yours
:)
Jan 21, 2018, 10:34 PM
haha gets messy quick in telegram
Jan 21, 2018, 10:34 PM
no problem
Jan 21, 2018, 10:34 PM
Z I think you should read a bit more before launching a real token. How ethereum works, how smart contracts work and that stuff.
Jan 21, 2018, 10:36 PM
Z-Up,if a user is to initiate a transaction himself from his own wallet for which he keeps the private key, then he *must* that private-key/wallet/account *must* be "topped up" with some ETH in order to pay for the transaction.
If on the other hand,
the user is going to trust a 3rd party
to execute the transaction for him
Jan 21, 2018, 10:37 PM
I will. Its just for fun anyways. But this is something I came across while investigating and I couldnt find answer
Jan 21, 2018, 10:37 PM
or rather
if the user is going to trust the third party to keep tabs "off chain"
then transfers can be free
Jan 21, 2018, 10:38 PM
You can build around it so you don't have to trust a 3rd party. With on the fly exchanging and signing messages. Difficult to implement but very interesting
Jan 21, 2018, 10:38 PM
But then someone else will have to explain it, as I’m not there yet :)
Jan 21, 2018, 10:39 PM
user client signs message allowing transferFrom like function call. Wallet provider gets signed message calls coin contract does transfer gets some coins in return
Only wallet provider needs eth
Jan 21, 2018, 10:41 PM
I understand, thank you. But I still dont get how the ETH could get into the zcoin wallet app without bothering the user with it. I just would like to male an app that allows me to buy zcoins and send them to bob or receive them from alice without having to take care about having enough eth for the transaction fees. Is there a source for the respective information where I can read more about this. Because I think others have already done that
Jan 21, 2018, 10:41 PM
Signed message could even be broadcasted to very large group of people so anyone can get "tx fee" in zcoin for pushing the tx to ethereum
Could be a nice erc20 addition as this allows etherless transfers
Jan 21, 2018, 10:46 PM
Z, this article seems relevant to what you are asking: https://hackernoon.com/announcing-the-erc-20-transporter-now-anyone-can-send-erc-20-tokens-without-holding-eth-1c1aae361e89
I guess this is what Pablo was referring to.
As in, this type of method.
Jan 21, 2018, 11:46 PM
haha yes. Always nice to see other people think of the same thing
Jan 21, 2018, 11:47 PM
👍
Jan 21, 2018, 11:49 PM
Thanks a lot guys for ur time
Jan 21, 2018, 11:54 PM
You’re welcome 👍
Jan 21, 2018, 11:55 PM
Oh now I got you were explaining earlier
Thats quite a near solution
I think Im capable to implement that
However Im not sure if its a little to much work just to learn a little
Jan 21, 2018, 11:59 PM
Well, it depends on what you want to achieve.
I don’t think someone can learn just for the sake of learning.
Or maybe you can, but it might be a bit pointless.
Better to have a concrete goal.
So I say,
If what you want to do in Solidity
requires you to be able to e.g. transfer tokens, without ETH in the account
then it might be worth looking into these methods
even if they are "a little work"
nothing you can do about it
it's not the most basic thing, as such
as using Ethereum in it’s simplest form would be to just charge the account with ETH, and go on from there
If on the other hand, you do not want to particularly implement this token system, but are learning Solidity in general,
I would suggest to pick a simpler objective.
As writing smart-contracts is a bit tricky, so it’s better to have a simpler goal, in order to learn what there is to learn.
But I don’t know your level
so if the methods described in the article seem doable, then go for it & good luck.
Jan 22, 2018, 12:05 AM
I have quite a good understanding of developing in general but just a basic and theoretical understanding of cryptos/icos/blockchain
I was looking for a small-medium sized project I could do for learning purposes and came across the question I was asking in first place since I havent found a proper answer to my question
Jan 22, 2018, 12:13 AM