Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EIP 808 - ERC for a Standard Decentralized Booking Protocol #808

Closed
wants to merge 16 commits into from

Conversation

appyhour770
Copy link

@appyhour770 appyhour770 commented Dec 26, 2017

EIP 808 - ERC for a Standard Decentralized Booking Protocol

@pirapira pirapira added the ERC label Jan 2, 2018
@pirapira
Copy link
Member

pirapira commented Jan 2, 2018

Please use the number 808 instead of 770. (The convention is to use the issue number or a PR number in this repository, and #770 is already a PR about something else).

I'll review this today or tomorrow.

EIPS/eip-770.md Outdated

## Abstract

The following describes standard functions for a decentralized booking protocol that can be used to reserve any kind of resource (Hotel, concert ticket, restaurant table).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hotel-->hotel room?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, hotel room

EIPS/eip-770.md Outdated
Category : ERC
Status: Draft
Created: 2017-12-26
Requires : ERC 20
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An extra space before :.

Requires: 20
should be fine.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be done in next submission

EIPS/eip-770.md Outdated

(Step 6.2 - Optional) Provider cancels the reservation by broadcasting a cancellation request. This triggers a submission to the RES smart contract that empties the registries for this resource. RES smart contract is releasing the escrowed amount to booker.

(Step 7.1 & 7.2) Booker is notifying that the resource has been paid (presumably at resource check-out). RES smart contract is releasing the escrowed BTU back to user in addition to a BTU agreed commision.
Copy link
Member

@pirapira pirapira Jan 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling: commision should be commission.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be fixed in next submission

EIPS/eip-770.md Outdated

## Motivation

The Booking Token Unit (BTU) protocol is a building block for any decentralized application (dApp) or web site willing to implement booking features for their end-users.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the name of the protocol

  • The Booking Token Unit protocol, or
  • Decentralized Booking Protocol?

If these two are different protocols, where is the Booking Token Unit protocol described?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is only one protocol, the "Booking Token Unit protocol" that is the subject of this ERC

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title reads differently.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Title was not meant to name the protocol, but thanks for this valuable feedback, I adjusting the title accordingly

EIPS/eip-770.md Outdated

The Booking Token Unit (BTU) protocol is a building block for any decentralized application (dApp) or web site willing to implement booking features for their end-users.
This standard also brings interoperability among decentralized applications that incorporate it.
We strongly believe that a transparent and public inventory enabled by an open-source standardized protocol would considerably lower the entry barriers to many Internet booking markets.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An extra space after a.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be fixed in next submission

EIPS/eip-770.md Outdated

The BTU protocol involves potentially ten steps and our standardized decentralized reservation contract (RES). Some of following steps can be relayed off-chain, but are always settled on-chain.

<img src="./eip-770/protocol-steps.png">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The image contains an Ethereum logo. Ethereum logos are distributed under Creative Commons Attribution 3.0. Please follow the term of the license.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this reminder that will be taken into account in next submission

EIPS/eip-770.md Outdated

<img src="./eip-770/protocol-steps.png">

Hereafter the general sequence :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An extra space before :.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be fixed in next submission

EIPS/eip-770.md Outdated

(Step 7.1 & 7.2) Booker is notifying that the resource has been paid (presumably at resource check-out). RES smart contract is releasing the escrowed BTU back to user in addition to a BTU agreed commision.

## Implementation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation section is supposed to contain links to testable code.

EIPS/eip-770.md Outdated
BookingStatus _bookingStatus ; // reservation status
string _metaDataLink // Link to Meta Data of the bookable resource (desc, image links, etc…)
}
//Submit one or multiple availability - implementation will be off-chain
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does an offchain functionality appear in the interface of an Ethereum contract?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We did this for pedagogical reasons (easier to understand).
Also, because sample implementation may implement on-chain functions (for testing without scalability)

EIPS/eip-770.md Outdated
}
//Submit one or multiple availability - implementation will be off-chain
function publishAvailabilities (address _owner, availability[] _availability, bytes32 signatureProof ) constant returns (uint status);
//Query Availabilities - implementation will be off-chain
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does an offchain functionality appear in the interface of an Ethereum contract?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We did this for pedagogical reasons (easier to understand).
Also, because sample implementation may implement on-chain functions (for testing without scalability)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If an implementation has this function on-chain, is the implementation still compliant to this ERC?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Because the ERC specified "eventually" off-chain (not mandatory to be off-chain)

EIPS/eip-770.md Outdated
string _metaDataLink // Link to Meta Data of the bookable resource (desc, image links, etc…)
}
//Submit one or multiple availability - implementation will be off-chain
function publishAvailabilities (address _owner, availability[] _availability, bytes32 signatureProof ) constant returns (uint status);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A _ seems to be missing in front of signatureProof.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct

EIPS/eip-770.md Outdated
//Request reservation
function requestReservation(address _requester, availability _availability) constant returns (uint status);
//Check booking status
function getReservationStatus(address _requester, availability _availability) constant returns (BookingStatus status);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is status sometimes BookingStatus and sometimes uint?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this relevent remark. The correct type is BookingStatus and this mistake came from a bad copy and paste (from a previous code base)

EIPS/eip-770.md Outdated


```
contract ERC770 is ERC20 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this need to be an ERC20?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because during the process (step 3.1 or6.1 for instance), the allowance & approve may be called by the RES smart contract

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The RES contract doesn't need to be an ERC20 contract for calling allowance or approve. The callee needs to be ERC20, but the caller doesn't need to.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for my quick reply.
You are right, RES smart contract does not have to be ERC20, however in the sample implementation we are doing it (but not required). Still, the BTU tokens have to ERC20 compliant.
I realize that my description can this code sample is confusion and that it's more clear to separate the token from the RES contract.
This (valuable) feedback will be taken into account in next submission to make things more clear.

Copy link
Member

@pirapira pirapira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of the Ethereum logo should follow the terms of the license on which it's distributed.

A specification of the on-chain component is desired.

@pirapira
Copy link
Member

pirapira commented Jan 2, 2018

Also, GPL 3.0 is not common in this repository. I'm asking other editors what they think.

@appyhour770
Copy link
Author

Following your comments, i've submitted new files. Waiting for a new (and final) review

@appyhour770
Copy link
Author

Following your comments, I've submitted new files for (final) review.

@pirapira
Copy link
Member

Why does the PNG image say "Ethereum or other platforms"? Is the standard meant for other platforms as well?

@appyhour770
Copy link
Author

"Ethereum or other platforms" was referencing, for instance, a private Ethereum network.
For more clarity and since the protocol makes more sense on the public network, this mention has been removed to simply "Ethereum"

@pirapira
Copy link
Member

pirapira commented Feb 8, 2018

@appyhour770 let's just say "Ethereum" because this is an Ethereum Improvement Proposal.

@appyhour770
Copy link
Author

"let's just say Ethereum because this is an Ethereum Improvement Proposal"
Agree and PNG updated

@Arachnid
Copy link
Contributor

This is a courtesy notice to let you know that the format for EIPs has been modified slightly. If you want your draft merged, you will need to make some small changes to how your EIP is formatted:

  • Frontmatter is now contained between lines with only a triple dash ('---')
  • Headers in the frontmatter are now lowercase.

If your PR is editing an existing EIP rather than creating a new one, this has already been done for you, and you need only rebase your PR.

In addition, a continuous build has been setup, which will check your PR against the rules for EIP formatting automatically once you update your PR. This build ensures all required headers are present, as well as performing a number of other checks.

Please rebase your PR against the latest master, and edit your PR to use the above format for frontmatter. For convenience, here's a sample header you can copy and adapt:

---
eip: <num>
title: <title>
author: <author>
type: [Standards Track|Informational|Meta]
category: [Core|Networking|Interface|ERC] (for type: Standards Track only)
status: Draft
created: <date>
---

New EIPs format + Link to reference Implementation
@berreb
Copy link

berreb commented May 18, 2018

@appyhour770 sauf erreur, tu dois écrire:
type: Standards Track
au lieu de
type: Standard

;)

EIPS/eip-808.md Outdated
@@ -98,7 +98,7 @@ contract RES {
uint _minDeposit ; // minimum BTU deposit for booking this resource
uint _commission ; // commission amount paid to booker in BTU
uint _freeCancelDateTs; // Limit date for a reservation cancellation
uint _statDateTs; //availability start date timestamps
uint _startDateTs; //availability start date timestamps
uint _endDateTs; //availability end date timestamps
BookingStatus _bookingStatus ; // reservation status
string _metaDataLink // Link to Meta Data of the bookable resource (desc, image links, etc…)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should add a semicolumn add the end of _metaDataLink ?

@appyhour770 appyhour770 changed the title EIP 770 - ERC for a Standard Decentralized Booking Protocol EIP 808 - ERC for a Standard Decentralized Booking Protocol Nov 5, 2018
EIPS/eip-770.md Outdated
uint _minDeposit ; // minimum BTU deposit for booking this resource
uint _commission ; // commission amount paid to booker in BTU
uint _freeCancelDateTs; // Limit date for a reservation cancellation
uint _statDateTs; //availability start date timestamps

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo _startDateTs

@axic
Copy link
Member

axic commented Dec 16, 2019

@appyhour770 are you still pursuing this?

@appyhour770
Copy link
Author

appyhour770 commented Dec 16, 2019

Yes.


The BTU protocol involves potentially ten steps and our standardized decentralized reservation contract (RES). Some of following steps can be relayed off-chain, but are always settled on-chain.

<img src="https://raw.githubusercontent.com/appyhour770/image-808/master/protocol-steps.png">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be included in the EIP repo. See the images section of EIP-1.

@axic
Copy link
Member

axic commented Dec 16, 2019

I think the Specification part could be expanded to be a bit more comprehensive. See EIP-721 and EIP-777 as widely used examples.

Copy link
Member

@axic axic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add discussions-to URL and a Backwards Compatibility section.

@github-actions
Copy link

There has been no activity on this pull request for two months. It will be closed in a week if no further activity occurs. If you would like to move this EIP forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review.

@github-actions github-actions bot added the stale label Sep 22, 2020
@github-actions
Copy link

This pull request was closed due to inactivity. If you are still pursuing it, feel free to reopen it and respond to any feedback or request a review in a comment.

@github-actions github-actions bot closed this Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants