Git Product home page Git Product logo

Comments (1)

h4sh3d avatar h4sh3d commented on June 19, 2024

Because you introduce an race condition.

In that case Alice can wait on Bob to start a refund with path 2, when she sees <h_b> value she can try to complete the swap on the BTC side (path 1) with higher fees AND get the Monero back with <h_a> and <h_b>.

If she managed to do it, she gets BTC and XMR. (At that point Bob can also race, all values are revealed.)

To be safe Bob needs to:

  1. Broadcast the Refund transaction,
  2. Wait enough confirmations invalidating path 1, and
  3. Complete the refund, reveling <h_b>

No race is possible in that scenario.

from xmr-btc-atomic-swap.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.