<p>With Bitcoin script, is it possible to construct a timelocked address X in such a way that:</p>
<ul>
<li>Players A and B (maybe more players) can send bitcoin to this address;</li>
<li>When the timelock expires,the player <strong>that had sent more bitcoin to address X</strong> can withdraw all bitcoin to himself;</li>
<li>If deposits where equal, then whoever is first - withdraws;
?</li>
</ul>

CC BY-SA 4.0
2020-06-23T11:16:34.150Z
There's a few misunderstandings in your question. You don't construct timelocked addresses, you can construct time-locked transaction outputs. Each payment a player makes to an address results in a different transaction output - so each would need a timelock. There is no way to cross reference information from different transaction outputs in bitcoin script, nor can the script have access to the amount.
Mark H
CC BY-SA 4.0
2020-06-23T13:17:10.847Z
Thanks for clarification!
Dmitry Dubinsky
CC BY-SA 4.0
2020-06-23T13:34:43.557Z
I guess this: https://bitcoin.stackexchange.com/questions/23780/is-there-any-way-to-send-an-output-to-a-script-which-can-then-only-be-sent-to-on?rq=1 answers my question as well.
Dmitry Dubinsky
<script>
Is who is richer game possible with bitcoin script?
Dmitry Dubinsky
# Is who is richer game possible with bitcoin script?

(Asked by: username_0 on 2020-06-23)

With Bitcoin script, is it possible to construct a timelocked address X in such a way that:

* Players A and B (maybe more players) can send bitcoin to this address;
* When the timelock expires,the player **that had sent more bitcoin to address X** can withdraw all bitcoin to himself;
* If deposits where equal, then whoever is first - withdraws;
  ?

**Tags:** script

> **Comments:**
> **username_1**: There's a few misunderstandings in your question. You don't construct timelocked addresses, you can construct time-locked transaction outputs. Each payment a player makes to an address results in a different transaction output - so each would need a timelock. There is no way to cross reference information from different transaction outputs in bitcoin script, nor can the script have access to the amount.  
> **username_0**: Thanks for clarification!  
> **username_0**: I guess this: https://bitcoin.stackexchange.com/questions/23780/is-there-any-way-to-send-an-output-to-a-script-which-can-then-only-be-sent-to-on?rq=1 answers my question as well.  

---

## 0 answers

