windingtree / wt-hackathon

WT Hackathon repository
https://windingtree.com/hacktravel-london-2019
11 stars 27 forks source link

Idea - Dynamic Pricing #5

Closed AugustoL closed 5 years ago

AugustoL commented 6 years ago

Summary

To process payments on chain the price of ETH or LIF is needed, but this information is not supported by the EVM. This is why we need to figure out a how to get this information and offer an easy way to make/confirm payments on chain. The WT API provides api endpoints to get the rate plans, one of the solutions can be to add /offers endpoints and issue cryptographic signed offers that are going to be valid for a period of time, the signature can be verified in the smart contract level and if it is valid the payment can be triggered as successfully. Here we even have two options, to make the payment in cryptocurrency and verified it on chain or to make the payment using fiat and receive a signature by the hotel saying that the payment was done, with this I can trigger an ethereum transaction and register my booking on chain. Another way of solving this issue in a lower scale is to issue a signature allowing a room to be booked, verify the signature in the smart contract and get the ETH or LIF price from an oracle smart contract; the oracles smart contract can provide off chain information such as ETH price; although in this case the payment can be done only in cryptocurrency.

Ideas

Resources: