How Dtravel Deploys a Smart Contract When You List a Property

 
When you list a property on Dtravel, your listing is automatically deployed on a smart contract that lives on the blockchain. Whenever a guest makes a booking at your property, the payment process is conducted in an automated and decentralized manner.
 
Payment never passes through Dtravel — the entire transaction involves only you and your guest, with the smart contract being the technology that facilitates the payment.
 
If you’re wondering about how smart contracts work and how Dtravel uses them, then you’re in the right place! Consider this guide your one-stop shop for everything you need to know about how smart contracts fit into Dtravel.

What are Smart Contracts?

Smart contracts are programs coded on a blockchain that automatically execute when predetermined conditions are met. These contracts follow a simple logic: “if X occurs, then Y happens.”
 
The primary logic of Dtravel’s smart contracts is this: if the cancellation period ends and the guest has not canceled, then the smart contract will automatically release the booking payment to the host. Dtravel smart contracts are based on the BNB Smart Chain (BSC).
 
The smart contract rules are based on parameters set by you: price per night, cleaning fee, cancellation policy, etc. By using smart contracts, the parties to the contract (i.e. you and your guest) know the potential outcomes prior to entering into the transaction. Transparent, efficient, fair.

Benefits of Smart Contracts

Payments facilitated via smart contracts offer a range of benefits over traditional, centralized payments. These include:
  • No chargebacks: with unrivaled payment finality, guests can’t unfairly request chargebacks.
  • Lower fees: transaction fees on the BSC network are a fraction of the 1%–3% charged by fiat payment processing systems.
  • Faster payouts: automatically receive payment as soon as the cancellation period ends.
  • Non-custodial payments: be in charge of your money, with no central authority holding custody of your payments at any point.
  • Transparent and fair: payments are transparently held in escrow in the smart contract, ensuring you and your guest are on the same page from the start.

How Smart Contracts Are Deployed and Used

Listings (Deploying the Smart Contract)

Dtravel deploys smart contracts on behalf of hosts for a seamless hosting experience. By removing the need for hosts to deploy contracts themselves for each listing, the complexities associated with setting up these contracts are all taken care of by Dtravel.
 
Before a smart contract can be deployed, your listing description must be completed and the parameters of your listing (price, cancellation policy, cleaning fee, etc.) must be set within your Dtravel account. Once these are ready, you’ll be able to click “Deploy”.
 
This is where the magic happens. Clicking “Deploy” sends a message to the Dtravel system to generate a new smart contract for your listing. Your unique smart contract is automatically deployed by signing a contract deployment transaction and paying the transaction fee. The deployment fee is covered by Dtravel.

Bookings (Using the Smart Contract)

Now that a smart contract has been deployed for your listing, it kicks into action when a guest makes a booking at your property. The details of that booking (amount paid, cancellation policy, etc.) will be recorded on the blockchain and included in the transaction, along with the booking payment.
 
The transaction will then be sent to your listing’s smart contract and the booking details will be stored in the contract. The payment is held in escrow and managed by the predetermined conditions of the smart contract, which knows exactly when and where to pay the funds.
 
As soon as the cancellation period ends, the smart contract will automatically release the funds to you (provided the guest doesn’t cancel within this period). There’s no ambiguity when you’ll receive funds or bureaucracy over whether you’ll receive funds at all — just automated code.

How Non-custodial Wallets Interact with Smart Contracts

When a smart contract is deployed for your listing, your non-custodial BNB Smart Chain (BEP20) wallet address is registered in the smart contract. Because you can only have one wallet connected to your Dtravel account at any point in time, each smart contract will have this wallet address registered.
 
Once a guest makes a reservation at your property, the amount paid by the guest is held in the smart contract. Dtravel never has access to these funds — the smart contract holds these funds in escrow until either of the following happens:
  • Guest doesn’t cancel within cancellation period: if the guest doesn’t cancel within the cancellation period set by you, the smart contract will automatically release the funds to your wallet. A 5% fee is distributed to Dtravel's Community Treasury.
  • Guest cancels within cancellation period: if the guest cancels within the cancellation period set by you, the smart contract will automatically distribute the funds in accordance with your cancellation policy. Where you have a more flexible cancellation policy, this may mean the smart contract refunds the amount to the guest’s wallet partially or in full. If you have a stricter cancellation policy, the entire amount may be released by the smart contract to your wallet address, depending on when the guest cancels.

True Ownership

The current process of deploying smart contracts for Dtravel listings is the first step in Dtravel’s road to decentralization. The deployment of smart contracts has been streamlined for an optimized user experience, and while this process provides significantly greater transparency and efficiency, Dtravel technically owns the smart contract, meaning the process is not yet fully decentralized.
 
The long-term vision of enabling hosts to update and manage their own smart contracts will result in the true decentralization of listings, with hosts owning the entire process from end-to-end. However, to get there, we’re starting with a method that involves less friction and caters to all hosts, rather than those who are experienced in web3 technologies.
 
By adopting a user experience that is largely familiar rather than mostly new, we believe this will incentivize hosts to naturally seek progressive decentralization for their businesses as they learn more about the rationale and benefits throughout the course of their Dtravel journey.