An immutable smart contract that enables Balaji's 1M USDC vs 1 BTC bet.
Usage is simple:
- Define two addresses to participate in the bet.
- Deploy the BitSignal smart contract with those two addresses as constructor arguments. This ensures asset isolation between bets.
- The counterparties can call
depositUSDC()
anddepositWBTC()
in either order. The second deposit will finalize the bet and start the 90-day timer. - When the timer expires, either party can call
settle()
, which queries the Chainlink BTCUSD oracle and sends both assets to the winner.
Contract can be found in src/BitSignal.sol
and tests in test/BitSignal.t.sol
.
Enjoy!