Pinned Tweet
gm stacks fam 🙂 i'm really excited to share @magicstx. what excites me most about @stacks is the possibilities for direct connections with the Bitcoin chain, and Magic takes full advantage of that. i'll be sharing more soon!
our contracts have been fixed, tested, and deployed to mainnet. if you were interesting in running a supplier / front-end, now is the time!
magicstx.gitbook.io/magic-pr…
at @magicstx, we just pushed code that allows our contracts to validate BTC txs, even if they were in a flash block.
this builds on top of @judecnelson's core "clarity-bitcoin" contract, which has been used by many projects to validate if a tx was mined
how does it work? 👇
so, if a tx was in a flash block, we now:
- get the next possible btc block that wasn't a flash block
- fetch all btc headers going back to our tx
- in Clarity, verify that each header is a valid "parent" of the latest block
our solution supports up to 10 consecutive flash blocks - which I don't think has ever happened.
want to check it out? it's the `was-tx-mined-prev?` method in our `clarity-bitcoin.clar` contract:
github.com/magicstx/bridge/b…
did you know that magic supports suppliers setting *negative* fees?
with negative fees, a swapper is actually getting _paid_ to make a swap. why would a supplier ever want to do this?
this allows for some interesting supplier dynamics 👇
acting as a supplier is more work and takes longer, but this user will end up swapping all of their xBTC into BTC for a much lower fee than they'd get from acting as a swapper.
here's a real-world bitcoin script for depositing into magic. it's mostly a typical HTLC script, but with some extra magic on top ✨
the magic bridge testnet app is live! there are still many improvements to come, but we wanted to let you check it out as soon as possible. let me know what you think 🪄
testnet.magic.fun



