0

Let's say my DApp requires a seamless way to transfer USD between users, given that some contract requirements are fulfilled first. Person A transfers USD to person B, the latter only gets a deposit once a condition is satisfied. I will assume some time has passed between the time the transaction initiated and the time the money is deposited into the receiver's account. All the while this is done with Ethereum Network under the hood. So, users don't know they are technically using the Blockchain.

The question is: When the money is sent to the Smart Contract, is it at all possible to retain the original USD value? If not, how would you deal with this type of problem?

If the application is responsible to ensure the money transferred is the same, there is risk. In particular, when the price of ETH goes down relative to USD, the developer will inevitably pay the difference. This solution isn't good.

Any ideas on how to deal with this scenario?

  • 1
    "So, users don't know they are technically using the Blockchain." What benefit is the blockchain bringing you if the user's don't actually use it? – smarx Jan 8 at 5:30
  • 1
    The app operates on the Blockchain but users don't necessarily need to know that it is. The benefit is decentralization, of course, without needing to know how it works under the hood. – hknjj Jan 8 at 5:35
  • When the money is sent to the Smart Contract, is it at all possible to retain the original USD value? Ethereum, Users will transfer amount in Eth only. Can you explain little what your looking for – Jitendra Kumar. Balla Jan 8 at 9:19
  • My question is general: Ethereum and Bitcoin prices relative to USD fluctuate a lot. When money transfers occur instantaneously (USD -> ETH -> USD), this isn't a problem. However, when money transfer is NOT instantaneous (USD -> ETH -> CONTRACT (hours? days?) -> ETH -> USD) this is potentially an issue. – hknjj Jan 9 at 6:32
1

It looks like you want to use a stable coin like Dai in your contract:

https://makerdao.com/dai

Dai is an ERC20 token which has contract logic to keep the coins value pegged to the US dollar. You can integrate Dai into your contract just like any other ERC20 token. As long as you use the Dai token within your contract logic, you should be able to assume the value of a single token stays fixed throughout the process. In the end, users should be able to extract any Dai from your contract and use the Dai contract to return any Dai they have for the USD equivalent amount of Ether.

  • Thanks! This looks like a viable solution. I will do more research on the their product. – hknjj Jan 9 at 6:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.