btc-locker, the TypeScript library that constructs the scripts and transactions.
Dawn is on public testnet. See Status and security.
The four transactions
Every position follows the same sequence. Two scripts are created with the same deadline: a Timelock (Return) script and an Escrow script.1
Deposit
You broadcast one Bitcoin transaction that funds both scripts:
- The Timelock script receives part of your principal. Only you can spend it, and only after the deadline.
- The Escrow script receives the rest. The provider can claim it, and you can reclaim it after the deadline.
OP_RETURN output with a 60-byte SNDL payload that identifies the deposit and the provider.2
Claim
The provider sweeps the Escrow output to its own address using the
OP_ELSE branch of the script, which needs only the provider’s signature.3
Distribute
The provider sends your principal plus the agreed yield to your Timelock address. This is an ordinary Bitcoin payment from the provider’s wallet.The amount and the schedule are set by the agreement you sign with the provider before depositing.
4
Withdraw
After the deadline, you broadcast one transaction that spends everything at the Timelock address and any unclaimed Escrow output.
The scripts
Timelock (Return) script
Timelock (Return) script
nLockTime must be at or after locktime. Only the holder of user_pubkey can spend. The provider holds no key for this script.Escrow script
Escrow script
OP_IF branch is your reclaim path: available after the deadline, with your signature. The OP_ELSE branch is the provider’s claim path: available at any time, with the provider’s signature.How Dawn connects Bitcoin to traditional finance
Dawn is the link between Bitcoin and a traditional finance institution. Bitcoin scripts hold the position and enforce the timing and the keys. The provider earns the yield off-chain, under a signed agreement with you that sets the return and when it is paid.What Bitcoin enforces
What the provider does
Yield is paid to a script only you can spend, or straight to you.
On-chain metadata
Each protocol transaction embeds a 60-byte payload in anOP_RETURN output. Sundial’s indexer uses it to bind a Bitcoin transaction to a position.
Example transactions on Bitcoin testnet:
Assurance
Dawn core has been audited by Hacken, with no critical or high findings and every finding fixed. It is also covered by an ongoing HackenProof bug bounty. See Status and security.Next steps
Stake with Dawn
The dashboard walkthrough for depositors.
btc-locker SDK
Build the four transactions from your own application.