StayUSB is a time lock escow written especially for reservation payments.
The reservation factory contract, will create a new contract for each reservation and the advance payment will be locked in that contract.
The Gas cost to create the Reservation contract is around 1,234,000 Gas @ 6 Gwei should be about $1.50.
The reservation fee of 1 DAI charged by stayusb to create the contract, is not refundable after the contract is created.
All payments are made in stablecoin DAI. (ERC20 Token)
Computers understand Unix Time Stamps. Since all reservation times are host time, it is important to pick the correct host
time zone, so that the unix time stamp can be appropriatialy adjusted.
To Avoid confusion all reservations start at 14:00 PM host time and end at 11:00 AM host time.
Pressing the Create Reservation Button, will create 2 seperate transactions:
DAI Approval (44,000 Gas):The app will check whether the reservation factory contract has approval
to transfer the users DAI for the amount of the advance payment. If not, the user will have to give approval. This is
done everytime a user creates a new Reservation. The app does not request an infinite approval. If the user wants,
they can set their own approval limit with the DAI contract directly on the main chain, in which case, this first step can be avoided.
Create New Reservation Contract:Once the reservation factory contract has the necessary DAI allowance approval,
it will create a new reservation contract, and transfer the advance payment to the new contract.
To avoid confusion there is only one cancellation policy written into the smart contract, that varies
the cancellation period and cancellation amount, depending on the reservation length of stay.
If the length of stay is 5 days(nights) or less. The guest can cancel upto 3 days (72 Hrs) before Checkin Time, without a cancellation fee.
After that a cancellation fee of 1 days price is applied.
If the length of stay is greater than 5 days(nights). The guest can cancel upto 5 days (120 Hrs) before Checkin Time, without a cancellation fee.
After that a cancellation fee of 2 days price is applied.
The minimum amount due, when creating a reservation is the cancellation fee, that the guest will be charged if they cancel the reservation after
the cancellation period.
Yes. The guest can pay the entire amount. If the guest cancels the reservation and a cancellation fee is applicable, the cancellation fee will be deducted
from the amount locked in the contract and transferred to the Host. The remaining amount will be refunded back to the guest instantly.
Assuming the reservation has not been cancelled, the host can claim the rent amount locked in the contract 21 Hrs after Checkin Time.
The DAI contract balance will be instantly transfered to their address.
Create Reservation (1,234,000 Gas): Only the Guest can create a reservation.
Activate Reservation (31,000 Gas): Only the Host can activate the reservation. The reservation is only valid, if activated by the host.
Claim Rent (36,000 Gas): The host can transfer the contract balance to their address 21 Hrs after Checkin Time
Refund Amount (50,000 Gas): 21 Hrs after Checkin Time, if the host decides to refund part of the rental amount locked in the contract, they can put the refund amount in the text box. That amount
will be refunded back to the guest. The remaining amount if any will be transferred to the host.
Guest or Host:
Host (40,000 Gas): The Host can cancel the reservation anytime upto 21 Hrs after Checkin Time. The Guest will get an instant refund for the entire amount locked in the contract.
Guest (54,000 Gas): The guest can cancel anytime upto 21 Hrs after Checkin Time. If the guest cancels after the cancellation period, the cancellation fee
will be deducted and transferred to the Host. The remaining amount if any will be transferred to the Guest instantly.