Skip to content

Instantly share code, notes, and snippets.

@ripzery
Last active August 10, 2020 02:23
Show Gist options
  • Save ripzery/ab05700e60964502c4a3ef0b4601588c to your computer and use it in GitHub Desktop.
Save ripzery/ab05700e60964502c4a3ef0b4601588c to your computer and use it in GitHub Desktop.

UTXOs

Given that:

  • ETH is a token user wants to send
  • OMG is a fee token
ETH OMG
5 5
10 10
15 -
20 -

Strategy

Pick fee tokens first for the stealth inputs (because fee token is often used)

Send Amount (ETH) Fee Amount (OMG) Inputs Stealth Inputs
5 3 5 ETH, 10 OMG 5 OMG, 20 ETH
35 8 20 ETH, 15 ETH, 10 OMG 5 OMG
35 15 20 ETH, 15 ETH, 10 OMG, 5 OMG -
12 15 20 ETH, 10 OMG, 5 OMG 15 ETH
30 10 20 ETH, 15 ETH, 10 OMG 5 OMG
15 10 15 ETH, 10 OMG 5 OMG, 20 ETH
@kalouo
Copy link

kalouo commented Aug 10, 2020

We also need to clarify two things:

  • Do we prioritise larger or smaller inputs for stealth merge? 🤔
  • How do we prioritise currencies for stealth merge? I propose we order currencies by number of UTXOs, given that each currency has an exit queue and this is what we are trying to shorten in the case of a mass exit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment