New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

BitDSM - Build Bitcoin Dapp without a Bridge on Ethereum - ETHGlobal Bangkok 2024

ETHGlobalThu, Oct 9, 2025, 12:00 AM

Join us for a workshop with Hammad Tariq, Gaurav Shukla & Usman Sha from BitDSM titled, "BitDSM - Build Bitcoin Dapp without a Bridge on Ethereum." We'll go over how to register your Dapp in the AppRegistry and use lock/unlock BOD for using delegated Bitcoins. We'll also cover what is a BOD and how developers can define arbitrary slashing in their application. This workshops took place at ETHGlobal Bangkok, a 3-day hackathon held November 15 to 17 2024, that brought together the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! ----------------- Follow us: https://x.com/ethglobal Check us out: https://ethglobal.com/ Email us at: hello@ethglobal.com

Transcript

[Music] I will start um for the recording because we are recording as well um so bit DSM is we hacked it in E Singapore just two months ago so it's a it's a new bridgeless way of um bringing bringing your Bitcoin to ethereum Smart contracts so we are uh we use we leverage igen layer and it's exactly um modeled after igen layer pods so what happens it's think of it's like a pipe so if you use if you're a Bitcoin user you use electrum or any other wallet you just do a oneclick deployment of your Bard on ethereum so what happens is your Bitcoin address gets mapped into the ethereum you open a 2X two multisig uh with the IG layer operator so your Bitcoin gets logged in your wallet into the multisig and they get released into the bod so um yeah this better so now as they are released into the uh into the ethereum in a smart contract user still has the control of it but it's not erc20 it's like uh it's like a smart contract you can put conditions on it how you want to spend like uh that smart contract so as an app developer you can get hold of that smart contract you can lock it so if let's suppose I was your user I loged two Bitcoin in my wallet on the Bitcoin two Bitcoin are available on bit DSM and then you your app is locking it uh let's say you are a stable coin or you are minting an nft backed by Bitcoin or something um you have loged The Bard so you have the 2 BTC available in your app now so the app has the app has the capability to liquidate you as well like uh depends on your own conditions yes yes because it's it's a 2 X2 multi with the operator so liquidation is possible but user has to read your contracts and verify everything before giving you the permission to do that before signing up to your app basically so that's how bit DSM Works um any questions solidity yes this is all smart contracts me as the user of the sorry if me as the user of the Bitcoin wallet I want to transfer uh that BTC uh that those Sates those are lock right so if I try to move them I cannot do it if there's a condition on the evbm right because we have the the MPC wallet right okay perfect perfect perfect and does it work with runs or only with BTC right now okay okay perfect cor thank you so yeah um I let Usman explain how this works um in a dashboard and he will show you the app registry contract so whatever app You're Building you can just register it through a command with bit DSM and you will get access to lock and unlock functions of that BTC yeah got it yeah that's so hi uh so this is our basic basic I can't speak it's on okay nice okay so this is our basic dashboard uh that we are using for these contracts that we are having so this is live on holisky and Signet so right now we are using the sign uh BTC from the Signet test net so as a user you can go and deposit your BTC by creating a Bard so the first thing that you need to do is to use the okx and link your account uh with our dashboard so this is already linked so I will use a new account let's say this one and if I connect it here so this should pick up my public key uh and if I go and create a Bard so what will this will do is this will create a Bard that is linked to the public key that you are using to sign the transaction from your wallet so you own the contract that will be deployed as a Bard as a user so we don't own it so if we go and do a create board so we have a list of operators uh that you can choose from so this is the set of operators that are basically registered on IG layer and staked there so you do a multi with these operators on the BTC Network which will become reflected as a value on the board uh contract that we are deploying here so you can select anyone let's say I select Theta so this will create a transaction that will be sent to our contracts and this will also create a multisig address on the bitet uh Bitcoin Network where you can deposit your BTC which will be reflected into our board so Signet is slow so okay so your Port has been created so here you can see this is undelegated and this is the address of the Pod that is now deployed on the holisky network so as a Next Step you can go and basically fund your your pod so you can select the operator with which we wanted to find let's say I wanted to deposit 01 okay fine so this is now taking confirmation from me uh that will create a BTC transaction if I confirm it and so if you can confirm this so this is basically creating a BDC transaction that is sending your funds to the multi that you created when you created the board as well as registering the board to our contracts so that we can verify the request it's taking a lot of time okay so this has basically created a transaction on the Bitcoin network but as you know Bitcoin is slow so it will take some time so uh what I can show you is I have already uh bought that I have deployed that is already funded so I can show you how can I delegate it to the applications which is more useful for you I think so I have a account here let's see uh this one so as you can see it has already 01 BTC Stak so this is already funded and it is delegated to so let's undelegated first okay confirm I can't do anything it's slow it's a test net yeah this is okay so yeah that's done so we have a port that is deployed and funded so we can just go and delegate it to the applications so this shows you a list of applications which are now registered with our B DCM B DSM contracts already so these are some sample applications that we have registered so you can select any one of them which you want delegate to so let's delegate and what this will do why is there an error delegating oh let's try again sometime it just those the problem uh I have to see the delegation is false okay maybe I need to refresh yeah let's go to the smart contract so basically it's just a call to the contracts and the mapping inside our BDSM contracts get updated and we assign the P to a specific app uh which is basically being funded here so this is just that this is just a contract call but I can try it once again sometimes the contract just gets stuck somewhere let see if I can it no it was working it undelegated but now I don't know so anyway so we can go to the contracts I suppose so these are our basic contracts that we have deployed uh on hallisy we have the Bitcoin pod with the Pod that we saw a pod manager which actually manages the deployment and the assignment of the ports to different addresses and maintains the storage information then we have the bit DSM registry and the service manager this is igly related so that's how we get the operators registered with us and the operators are also responsible for verifying the transactions on the Bitcoin Network so the verification is dependent on the operator and the operator is sted in the IG layer so if there is any malicious transaction or the operator does anything fishy we can stake him on the IG layer and uh so the most important thing is basically the app registry where we register the apps so any app developer can come and register with us and have access to these boards that are being deployed by users and funded with BTC so the main uh function that we require is basically Register App so you just have to provide the address of the app and a signature on a digest that you can calculate using uh this calculate app registration digest hash so you just so first call this function and calculate a digest hash then create a signature on it and you just pass that signature and the digest hash to this Register App Register App and this should be enough to register you with our app registry once you have registered uh with our app registry then you can update the information of your application using this update metadata URI so this helps us pick up the information related to your Contra to your application like name website description if you want to put something and this helps us put that information on our dashboard the way I shown you earlier where I showed you the list of the apps so if you can so you register through this one and what else so if you want you can also deregister back so once you deregister you also have to release all the pods out out of it so uh we have created a very basic example to show you the Locking and the unlocking which is actually available on our bit DSM GitHub as a bit DSM examples folder so if we can go back there let's script so we have provided the reference scripts for registration and deploying on app so that you can look at the code and so I if you want I can go through it so basically this is a simple time lock app which is provided here in the examples so it does so what it does is basically locks an app for a certain period of time and then unlocks is when the time has expired in terms of number of blocks and what is what it uses is the Pod manager to lock the app so basically you can import the port manager using these interfaces that we have provided already and you can call this lock pod and unlock pod to lock or unlock the application uh with the Pod right so the registration and the deployment so this is a simple application that we had for lock so this was a deployment script which just deploys the main contract and once you have deployed it you just copy the address of the application and use this Register App script to register it to our app registry so you can see here the process is the same and I've just called the H app hash digest calculation once I have it then I create a signature on it and just checking that the signature is valid so another important point is you have to provide this valid signature uh function inside your app because we are implementing the erc1 1271 uh contract based signature verification so your own app determines what kind of signature you want to verify is it a single verific single party signature do you want to implement a multisig or do you want to have a contract given the authority over this uh application so it's up to you so the only thing is is you just have to override this is valid signature function in your own application and provide the appropriate logic there and it should be able to register it independently and you just call the register app function and it should be enough to register it apart from that we also have a CDP example which shows a collateralized desk position so it's a very basic example which uh locks the Pod uh which uh gets from the app registry in this case and then meant say erc20 stable coin given the liquidation and the collateralization that is provided by the user but just two simple examples provided to to teach you how to use the app registry and how to register the app and what can be done so that's pretty much uh it from us U is there any question sorry I can't hear you now the ethereum gas is paid on so there are two different kind of gases that are going down there so there are two different kind of transactions when you fund your B that funding transaction happens on the Bitcoin so the gas is paid on the rest of the contract interactions all happen on the ethereum so you pay the ethereum gas fee okay got it perfect thanks that's the whole point of the application that you move the Bitcoin from Bitcoin to ethereum and make the value representation in a contract on ethereum once it's there then it's all ethum ecosystem it's all ether land okay perfect thanks is there any other [Music] question yeah so I think that's it uh we are offering bounties for the haathon uh so if you just register the app whatever you end up building uh you will be eligible for for the judging for the bounties yeah [Music]

Automatic transcript — names and jargon may be misspelled.