USA Election Bet Escrow Service

Hey y’all,

I have an ETH bet with a friend of mine on the ultimate outcome of this election. It’s a 10-1 bet so I definitely want him to lock in his funds in an escrow type of service . :stuck_out_tongue_winking_eye:

Two considerations:

  • We both deposit funds and they’ll stay locked until an agreement is reached that the election outcome is finalized.
  • In case of disagreement, I’d like to have a mutual friend of ours act as the 3rd party arbiter on the outcome…so when 2 of 3 ETH addresses connected to the contract agree on an outcome, the bet is settled and funds get deposited to the winner.

Does anyone know of projects in production that enable this?

I came across this thread where another person posed a similar question and Thokil Vaerge posted the code below as an example that could be used.

In addition to the code below, I found a lady who wrote her own escrow contract here which was cool:
https://youtu.be/6Mry6oAQVXU

I also found BETR - looks like it could solve this, but I have never heard of them 'till now. Anyone used them?
https://betr.org/

Thanks in advance for your feedback!

  • Jason

Thread with question: https://ethereum.stackexchange.com/questions/65796/simple-smart-contracts-to-make-a-bet?newreg=bbb87d54376b4ca6903fad46a5774067

Code:

pragma solidity ^0.5.2;

contract Exchange {
  address public admin;

  modifier onlyAdmin {
    require(msg.sender == admin);
    _;
  }

  function Exchange() {
    admin = msg.sender;
  }

  function changeAdmin(address _newAdmin) onlyAdmin {
    require(_newAdmin != address(0));
    admin = _newAdmin();
  }

  function deposit() payable {
  }

  function settle(address _winner) onlyAdmin {
    selfdestruct(_winner);
  }
}