Author

Topic: Does FRC go down in value while you are waiting for Confirmations? (Read 644 times)

legendary
Activity: 1372
Merit: 1002
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://bitcointalksearch.org/topic/freicoin-application-developer-best-practices-133968

I hope this helps.
legendary
Activity: 1204
Merit: 1002
RUM AND CARROTS: A PIRATE LIFE FOR ME
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?
Jump to: