Skip to content

Commit

Permalink
Update dip-10.md
Browse files Browse the repository at this point in the history
Introducing some changes to make this a wallet-2-wallet protocol rather than user-to-user (and a few minor cleanups).
  • Loading branch information
dahliamalkhi committed Jul 1, 2021
1 parent 95c84a9 commit 15c1df6
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions dips/dip-10.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
This DIP describes DiemID, a human-readable identifier for user accounts, and a protocol standard for pre-flight exchange using DiemID to form payment transactions.

# Motivation
DiemID provides a convenient method for identifying users within a VASP. DiemID allows users to exchange human-readable identifiers as either the sender or the receiver of peer-to-peer payments, and plays the role of an email address for payments. The benefits of using a DiemID are:
* Privacy: DiemID's do not appear on-chain. The standard uses a pre-flight off-chain exchange between VASPs to agree on a reference ID. The sending VASP can then submit an on-chain transaction containing only this reference ID and without any potentially identifiable user information.
* Persistent Identifiers: Currently there are no persistent user identifiers in the Diem ecosystem. DiemID establishes a persistent identifier from a user's perspective which are not used publicly on-chain.
DiemID provides a convenient method for identifying users within a VASP. DiemID allows VASPs to exchange human-readable identifiers as either the sender or the receiver of peer-to-peer payments, and plays the role of an email address for payments. The benefits of using a DiemID are:
* Compatibility with Diem privacy approach: DiemID's do not appear on-chain and do not enable linking payments from/to the same user. The standard uses a pre-flight off-chain exchange between VASPs to agree on a reference ID. The sending VASP can then submit an on-chain transaction containing only this reference ID and without any potentially identifiable user information.
* Persistent Identifiers: Currently there are no persistent user identifiers in the Diem ecosystem. DiemID establishes a persistent identifier from a VASP's perspective which are not used publicly on-chain.

# End-to-End Experience
Below is an example of using DiemID for transferring money from one user to another.
Below is an example wallet-2-wallet flow using DiemID for transferring money from one user to another.

## Prerequisite:
* VASPs get approval from association (via some offline process) on domain name.
Expand All @@ -35,8 +35,6 @@ bvasp, 0xc5ab123458df0003415689adbb47326d
* Bob wants to receive funds from Alice
* Alice has an account with VASP A: `alice@avasp`
* Bob has an account with VASP B: `bob@bvasp`
* Bob shares the DiemID, `bob@bvasp` with Alice
* Alice logs into VASP A, enters Bob’s identifier, an amount to pay, and submits payment
* VASP A contacts VASP B via an off-chain API with the sender identifier `alice@avasp` and requests a reference_id, `rb`
* VASP A constructs a transaction with the specified amount and the reference_id `rb` and submits it to the Diem network
* VASP B receives a transaction with metadata containing `rb`, deposits the amount in Bob's account. (VASP B may use Alice’s DiemID for its own record keeping or seek receipt confirmation from Bob.)
Expand All @@ -58,9 +56,6 @@ We are starting with a small character set to keep it compatible with most namin
# On-chain Domain Resolution
Given a receiver's DiemID, `bob@bvasp`, the sender VASP uses its `vasp_domain_identifier` (`bvasp`) to look up the receiving VASP's on-chain address using the on-chain domain resolution process defined in [DIP-182](https://github.com/diem/dip/blob/main/dips/dip-182.md).

The sender VASP may build an application to listen for domain events to construct a mapping of DiemID domains to VASP on-chain addresses to lookup onchain addresses given a DiemID domain.


# ReferenceID Exchange
Once the sender VASP gets the receiving VASP's address using on-chain domain lookup, the sender VASP initiates a reference ID exchange as defined in [DIP-183](https://github.com/diem/dip/blob/main/dips/dip-183.md)
in order settle on a unique reference ID and submit the transaction on-chain.
Expand Down Expand Up @@ -95,4 +90,4 @@ The format of the success response is:
}
```

Once the reference ID exchange is done and two VASPs have settled on a reference ID, the sender VASP uses that reference ID to create a p2p transaction with [PaymentMetadata](https://github.com/diem/dip/blob/main/dips/dip-183.md#on-chain-transaction-settlement) and submits the transaction on-chain.
Once the reference ID exchange is done and two VASPs have settled on a reference ID, the sender VASP uses that reference ID to create a p2p transaction with [PaymentMetadata](https://github.com/diem/dip/blob/main/dips/dip-183.md#on-chain-transaction-settlement) and submits the transaction on-chain.

0 comments on commit 15c1df6

Please sign in to comment.