user4968: What are the options for Bitcoin integration on Cardano?
Is there a way to allow users to deposit BTC, have smart contract rules that adjust balances (based on signed app specific transactions), whilst also allowing users to withdraw their balance? Does a simple example exist anywhere?

user4627: There's a great read here on one possible approach to such an integration: https://medium.com/@anetaBTC/anetabtc-litepaper-v1-0-171f29b3276a
Basically there is a piece of software - the bridge - that acts as an intermediary between both chains, ie locking and releasing btc to / from a bitcoin vault and minting / burning native assets on Cardano (or Ergo).
This way you can freely use your native assets on Cardano and then trade them back in to redeem your BTC later.

user5844: If I am understanding this correctly you wish for:

users to be able to move assets (Having BTC deposited on Cardano Smart Contracts Would mean doing this)

Have a smart contract that enables arbitrary deposits and withdrawals by an authorised party.

Have balances of a party automatically updated in the smart contract.


I will now attempt to help with each in turn:

Assets on the bitcoin blockchain are completely different from assets on the Cardano blockchain and currently, smart contracts can only interact with their own blockchain and assets on it (this may change in the future but I doubt it).

The way projects get around this currently is to first wrap assets into a representation of that assets on a different blockchain through a bridge. You can wrap BTC and to Cardano and have that work with Cardano smart contracts. For more details, I would suggest reading up on Nomad and Milkomeda and AnnetaBTC.

I have not heard of anything like this but it is conceivably possible, also this is a bad project design. After the Vasil hardfork reference scripts will enable you to have two lightweight contracts to implement and decrement the balances. Currently, you will have to resubmit the contracts to the chain every transaction.

I don't think you should attempt to use smart contracts to store states that is the job of the ledger. I am not sure if this is even possible at the moment.



4968: <p>What are the options for Bitcoin integration on Cardano?</p>
<p>Is there a way to allow users to deposit BTC, have smart contract rules that adjust balances (based on signed app specific transactions), whilst also allowing users to withdraw their balance? Does a simple example exist anywhere?</p>
 4627: <p>There's a great read here on one possible approach to such an integration: <a href="https://medium.com/@anetaBTC/anetabtc-litepaper-v1-0-171f29b3276a" rel="nofollow noreferrer">https://medium.com/@anetaBTC/anetabtc-litepaper-v1-0-171f29b3276a</a></p>
<p>Basically there is a piece of software - the bridge - that acts as an intermediary between both chains, ie locking and releasing btc to / from a bitcoin vault and minting / burning native assets on Cardano (or Ergo).</p>
<p>This way you can freely use your native assets on Cardano and then trade them back in to redeem your BTC later.</p>
 5844: <p>If I am understanding this correctly you wish for:</p>
<ol>
<li><p>users to be able to move assets (Having BTC deposited on Cardano Smart Contracts Would mean doing this)</p>
</li>
<li><p>Have a smart contract that enables arbitrary deposits and withdrawals by an authorised party.</p>
</li>
<li><p>Have balances of a party automatically updated in the smart contract.</p>
</li>
</ol>
<p>I will now attempt to help with each in turn:</p>
<ol>
<li>Assets on the bitcoin blockchain are completely different from assets on the Cardano blockchain and currently, smart contracts can only interact with their own blockchain and assets on it (this may change in the future but I doubt it).</li>
</ol>
<p>The way projects get around this currently is to first wrap assets into a representation of that assets on a different blockchain through a bridge. You can wrap BTC and to Cardano and have that work with Cardano smart contracts. For more details, I would suggest reading up on Nomad and Milkomeda and AnnetaBTC.</p>
<ol start="2">
<li><p>I have not heard of anything like this but it is conceivably possible, also this is a bad project design. After the Vasil hardfork reference scripts will enable you to have two lightweight contracts to implement and decrement the balances. Currently, you will have to resubmit the contracts to the chain every transaction.</p>
</li>
<li><p>I don't think you should attempt to use smart contracts to store states that is the job of the ledger. I am not sure if this is even possible at the moment.</p>
</li>
</ol>
