What is Nostr?
Tier Nolan [ARCHIVE] /
npub1g6v…l5wd
2023-06-07 18:26:34
in reply to nevent1q…lfr4

Tier Nolan [ARCHIVE] on Nostr: 📅 Original date posted:2020-08-17 📝 Original message:On Mon, Aug 17, 2020 at ...

📅 Original date posted:2020-08-17
📝 Original message:On Mon, Aug 17, 2020 at 6:04 AM ZmnSCPxj <ZmnSCPxj at protonmail.com> wrote:

> Taproot MAST to the rescue.
>

Another option would be a binary payout

You pay 64 + 32 + 16 + 8 + 4 + 2 + 1 as outputs. The outputs are
enabled/disabled based on the diff value. This would require division and
also binary operators.

D = (int) ((100 * diff) / (1 trillion))

Output 0: 1.28: If (D & 128) then pay Alice otherwise Bob
Output 0: 0.64: If (D & 64) then pay Alice otherwise Bob
Output 0: 0.32: If (D & 32) then pay Alice otherwise Bob
Output 0: 0.16: If (D & 16) then pay Alice otherwise Bob
Output 0: 0.8: If (D & 8) then pay Alice otherwise Bob
Output 0: 0.4: If (D & 4) then pay Alice otherwise Bob
Output 0: 0.4: If (D & 4) then pay Alice otherwise Bob
Output 0: 0.4: If (D & 4) then pay Alice otherwise Bob

This has log performance in terms of the number of ticks like the MAST
solution.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20200817/a3fd8bd8/attachment.html>;
Author Public Key
npub1g6vxlp4e0nyhs2dqxxcryztyf5f5hyuaq93nw4r87zcnv0sdsa0qqsl5wd