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?
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.
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.