Skip to main content

Pay to Email

The email registry allows for ease of sending assets easily to accounts that have registered for the service. Pay to Email, does this and more. Users can send assets to an email address, even if the recipient does not have an Aztec account yet. This is accomplished through a temporary escrow contract that holds the funds until they are either claimed by the recipient (using a paylink) or refunded to the sender. If the recipient does not claim the funds within an accepted time window. The user has the ability to claim back the funds from the escrow.

Flow

Firstly the user needs to navigate to the email payments tab in the sidebar.

Send to Email Sidebar

In the "Send" tab, input the email address that you would like to send the assets to. You can check to see if the recipient has added their email to the registry. If they have not then you can still send assets to the email address. Select the asset that you would like to send and the amount that you would like to send to them.

If the user has not registered their email, after the transaction you can generate a paylink to send to the recipient. At the minute you have to manually send this paylink to the intended recipient. In the future, Obsidion will automatically send the paylink to the email provided by the user.

Pay to Email

If you forget to copy the claim link once you have sent the transaction. Do not worry, you can regenerate the claim link in the transaction tab within Obsidion.

Pay to Email Transaction Receipt

In the right side of the transaction receipt click on the "Manage Payment" button.

Manage Payment Button

You can copy the claim link here if you ever need it again.

Refunding Payment

For assets that are sent to an email address using a claim link. If the asset has not been claimed by the receiver, you can always refund the transaction and claim back the funds.

To do this, similar to obtaining the claim link. Navigate to the transaction receipt. Click on "Manage Payment" and click on "Refund Payment". You will have to do one last confirmation that you want to refund the amount that was sent in the transaction.

After this refund transaction you will get the funds deposited right back into your account.

Claiming Funds

To claim the funds that where sent to you, make sure that you have the claim link that will have been sent to you by the sender. (In the future, check your emails for the claim link from Obsidion.)

Paste this claim link into your browser and you will land on the claim page inside the obsidion web app.

You will be prompted to sign in with google, then you can claim your payment. After a successful claim, the funds will be transferred into your account.

Claim Email Tab

Technical Details

The pay to email service in Obsidion Wallet allows users to send cryptocurrency to an email address, even if the recipient does not have an Aztec Account. They can create one later and still claim the funds.

This is accomplished by a one time use escrow contract that holds the funds until they are either claimed by the recipient or refunded to the sender.

This process is completely none custodial and complete privacy is maintained for both parties.

System Architecture

The service consists of multiple components.

  1. Burner Escrow Contract: A smart contract that temporarily holds funds.
  2. Email Registry Contract: Verifies that the JWT from the claimer is current and signed by googles public keys.

Sending Funds

If the email is not registered in the email registry, an escrow approach is used, if it is registered, a direct transfer is used to transfer the funds.

Escrow Contract Deployment

For an unregistered email recipient:

Obsidion prepares parameters for a new Account Escrow Contract, this inlcudes a note that contains the token address, amount, email hash, timestamp and the sender address.

Once the escrow is deployed, within a batch transaction, the tokens are transferred to the new escrow contract.

To generate the paylink, the secret for the escrow account is needed, the partial address, and the sender of the funds. The first two parameters are needed for the recipient to reconstruct the escrow account, the sender is needed for the recipient to register the sender of the funds so that they can view and claim the notes within the escrow contract.

Refund Process:

If the payment is not claimed by the expected owner of the email address within a speified time window, the sender is able to reclaim the funds that where sent to the escrow contract. This is done by matching the msg_sender with the sender inside the note that is stored within the contract. Once funds are refunded, they cannot be claimed by the intended recipient.

Claim Process:

When a recipient wants to claim their funds, they need to have proved ownership of the email address that is stored in the note. This is done by verifying the google JWT that they got from signing in with google, the same process that is used within the email registry (see here for more information). See here for more details. Once the provided JWT is proved to belong to the intended recipient of the asset. The escrow contract transfers the assets to the account that provided the correct proof of ownership of the email address. Once funds are claimed, they cannot be then refunded by the original sender.

Privacy Concerns:

If the contents of the paylink is leaked somehow. The privacy of the transaction is lost and the intercepter will be able to see the contents of the note within the contract. However, they will not be able to claim the funds without valid ownership of the email address. All funds are safe.