Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Initial demo script #157

Closed
wants to merge 2 commits into from
Closed

Initial demo script #157

wants to merge 2 commits into from

Conversation

bitwiseguy
Copy link
Contributor

Closes #121

Copy link
Contributor

@geoknee geoknee left a comment

Choose a reason for hiding this comment

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

I think this is a good start!

demo.md Outdated Show resolved Hide resolved
demo.md Outdated Show resolved Hide resolved
demo.md Outdated
Comment on lines 21 to 22
- Alice designates some of her Network1 funds to Intermediary
- Bob designates some of his Network2 funds Intermediary
Copy link
Contributor

Choose a reason for hiding this comment

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

"Alice has Network1 funds she can sign over to Irene, and Irene has Network2 funds she can sign over to Bob."

Copy link
Contributor Author

@bitwiseguy bitwiseguy Oct 19, 2023

Choose a reason for hiding this comment

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

I was trying to list requirements for off-chains payments to work. Can you rephrase your statement so that it indicates what MUST be done by Alice, Irene, and Bob instead of what COULD be done?

Copy link
Contributor

@geoknee geoknee Oct 19, 2023

Choose a reason for hiding this comment

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

Alice MUST have sufficient Network1 funds she can sign over to Irene, and Irene MUST have sufficient Network2 funds she can sign over to Bob.

Concretely, if Alice wants to Pay bob x coins, Alice-Irene SCW has balance [a,i1] and Irene-Bob has balance [i2,b], then the condition is x<=a AND x<=i2*e, where e is the exchange rate from network2 funds to network1 funds.

Copy link
Contributor Author

@bitwiseguy bitwiseguy Oct 19, 2023

Choose a reason for hiding this comment

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

Does this satisfy what you are saying?

  - Alice on Network1 can pay Bob on Network2 if the following conditions are met:
    - Alice has sufficient funds on Network1
    - Intermediary has sufficient funds on Network2
    - Intermediary has an exchange rate to convert between Network1 funds and Network2 funds
    - Intermediary can access both Network1 and Network2 to monitor Alice & Bob balances

Your formula and associated variables make sense but I think its better to communicate using concise bullet points for the demo so I'm trying to get it into that format

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough.

Does this satisfy what you are saying?

  - Alice on Network1 can pay Bob on Network2 if the following conditions are met:
    - Alice has sufficient funds on Network1
    - Intermediary has sufficient funds on Network2

I would specify that these funds need to be in Bob's wallet. Not just "on Network2"

Otherwise, seems good. I don't know if you need to underline that the intermediary can access both networks. That is probably implied by having funds on each network.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call, I'll remove the bullet about intermediary accessing both network. How about this:

  - Alice on Network1 can pay Bob on Network2 if the following conditions are met:
    - Alice has sufficient funds on Network1
    - Bob has designated enough of his Network2 funds for Intermediary
    - Intermediary has an exchange rate to convert between Network1 funds and Network2 funds

demo.md Outdated Show resolved Hide resolved
- `Explain browser tab setup with Alice(left), Irene(middle), Bob(right)`
- How it works:
- on-chain txs are 2/2 multi-sig (user + intermediary)
- `Show on-chain tx from Alice to Metamask account`
Copy link
Contributor

@lalexgap lalexgap Oct 19, 2023

Choose a reason for hiding this comment

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

It might be nice to do this on the receiving end, and have Bob show the transaction. We could have a flow like this:

  • Alice and Bob start with a balance of [5,5]
  • Alice pays Bob (crosschain and offchain!) an amount of 3
  • We see all the balances update
  • Bob now has a balance of 8
  • Bob sends an L1 transaction of 7 (which he couldn't afford before the payment) to some external address.

This way Bob is spending funds on the chain that he didn't have access to before, due to the "offchain" payment. I think that makes the off-chain payment feel more "real", since after Bob receives it he can spend more.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. That'd be a good way to show the cross-chain functionality

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes I like this!

## Demo script:

- ERC-4337 compatible Smart Contract wallet
- Unique feature: gasless off-chain txs with instant finality enabled by HTLC technology, as used in Bitcoin Lightning. Funds can be moved in and out of the off-chain payment system without any on-chain txs!
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should lean into the cross-chain aspect and also emphasize that. Not only do the payments happen completely off-chain, but the payments can be redeemed on different chains.

## Demo script:

- ERC-4337 compatible Smart Contract wallet
- Unique feature: gasless off-chain txs with instant finality enabled by HTLC technology, as used in Bitcoin Lightning. Funds can be moved in and out of the off-chain payment system without any on-chain txs!
Copy link
Contributor

Choose a reason for hiding this comment

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

We may want to be careful with the term gasless. While it's true the off-chain payments don't require gas, it could get confused with "gasless" ERC 4337 transactions, which is a whole different kettle of fish.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But our txs are actually gasless whereas the ERC-4337 txs are more like "sponsored txs" where somebody else pays the gas 🙄. You are correct though, might be confusing to use that term. Originally I had "free off-chain txs". Do you like that better or can you think of any other term that might be better?

Copy link
Contributor

@lalexgap lalexgap Oct 19, 2023

Choose a reason for hiding this comment

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

Something like that makes sense to me! Maybe "free off-chain payments"? The term Off-chain tx seems like it might be slightly confusing. Since submitting an on-chain tx let you do much more then pay someone, while in our system an off-chain tx would only ever be a payment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed on the use of "off-chain payment" instead of "off-chain tx".

"free payment" seems contradictory but I'm good with it if you are 🤷‍♂️

@geoknee
Copy link
Contributor

geoknee commented Oct 20, 2023

@geoknee geoknee closed this Oct 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write script for demo video
3 participants