Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: crazy_rabbit on January 17, 2013, 10:00:07 AM



Title: Does FRC go down in value while you are waiting for Confirmations?
Post by: crazy_rabbit on January 17, 2013, 10:00:07 AM
Over at Exchange.zapto.org the admin mentioned in the chat box that while they are coding for FRC one of the problems they have to deal with is that while waiting for a payment to confirm, it is simultaneously losing value due to demurrage.

Is that true? How do payments work then? You pay 1 FRC and by the time it confirms it's maybe .99999 FRC? And how are scripts supposed to adjust for that? The longer it takes to confirm the less FRC I assume there would be, no? How are you ever supposed to buy something if unless you over spend to try and be sure that at *least* 1FRC makes it to the merchant?


Title: Re: Does FRC go down in value while you are waiting for Confirmations?
Post by: jtimon on January 17, 2013, 11:31:24 AM
Over at Exchange.zapto.org the admin mentioned in the chat box that while they are coding for FRC one of the problems they have to deal with is that while waiting for a payment to confirm, it is simultaneously losing value due to demurrage.

Is that true? How do payments work then? You pay 1 FRC and by the time it confirms it's maybe .99999 FRC? And how are scripts supposed to adjust for that? The longer it takes to confirm the less FRC I assume there would be, no? How are you ever supposed to buy something if unless you over spend to try and be sure that at *least* 1FRC makes it to the merchant?

Yes, that's true.
The referenceHeight is set on the transaction at the moment of its creation. Then it may take some blocks to get into the chain, but the demurrage will be applied from that demurrage block.
You could set a referenceHight in the future so that the merchant receives exactly the transaction's amount at that given block. The client uses the current Height as refHeight by default, but with there will be an optional field for the refHeight using RPC calls. I coded that simple change for some calls but it needs testing and peer review to get into the next version:

https://github.com/freicoin/freicoin/pull/83

The protocol doesn't enforce refHeigh = currentHeigh. That's why you should check the refHeigh in addition to the amount when you receive freicoins. If the refBlock is too far in the past, maybe the payer is cheating so that you pay part of his demurrage. There's people working on making this clearer on the client or maybe raise warning messages.
You may be interested in this thread (and its links) for completion: https://bitcointalk.org/index.php?topic=133968.0

I hope this helps.