-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Conversation
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hotel
-->hotel room
?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The title reads differently.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An extra space before :
.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
Also, GPL 3.0 is not common in this repository. I'm asking other editors what they think. |
Update schema
Adjusting licence
Following your comments, i've submitted new files. Waiting for a new (and final) review |
Following your comments, I've submitted new files for (final) review. |
Why does the PNG image say "Ethereum or other platforms"? Is the standard meant for other platforms as well? |
Fix typo
"Ethereum or other platforms" was referencing, for instance, a private Ethereum network. |
@appyhour770 let's just say "Ethereum" because this is an Ethereum Improvement Proposal. |
"let's just say Ethereum because this is an Ethereum Improvement Proposal" |
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:
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:
|
New EIPs format + Link to reference Implementation
@appyhour770 sauf erreur, tu dois écrire: ;) |
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…) |
There was a problem hiding this comment.
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 ?
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo _startDateTs
@appyhour770 are you still pursuing this? |
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"> |
There was a problem hiding this comment.
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.
I think the Specification part could be expanded to be a bit more comprehensive. See EIP-721 and EIP-777 as widely used examples. |
There was a problem hiding this 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.
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. |
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. |
EIP 808 - ERC for a Standard Decentralized Booking Protocol