ArkSwap - Programmable transactions on Ark

Greetings! I recently found this community, happy to be here. I’d like to share an open source regtest implementation built recently to explore the programmability of Ark. It has two main POCs:

  1. ArkSwap - trustless atomic swaps between Ark and L1 Bitcoin. It uses Taproot HTLCs to show that ASPs can blindly mint VTXOs to any valid script hash, pretty much enabling permissionless smart contracts.
  2. SatoshiKoi - an Ark Assets implementation that shows how we can cryptographically bind metadata to a VTXO using double key tweaking.

The repo can be found here: GitHub - jgmcalpine/ArkSwap: A research prototype demonstrating programmable Ark Layer 2 transactions, using Taproot to enable trustless atomic swaps and stateful digital assets (SatoshiKoi)

Happy to discuss or share any thoughts behind the decisions. I had started building a third piece but think I will move on to build a toll that integrates the Bark SDK.

2 Likes

Hey, welcome to the forum! You’ve got some interesting ideas that I’ll be sure to look into sometime this week. I’m particularly interested in trying out your ArkAdmin project. barkd is a project we have a lot of hopes for so any frontends for this are very much appreciated.

2 Likes

Hi, thanks for taking a look!

For anyone interested, here is the link to ArkAdmin: GitHub - jgmcalpine/ArkAdmin: A Control Plane / Dashboard for the Bark Bitcoin Wallet Daemon.

I’ll update the readme with a roadmap soon so it’s more clear where things stand and happy to incorporate any feedback. I added a walkthrough of the main features that are working currently. It’s been fun building on top of barkd on signet, nice work!

1 Like

I made a quick Loom to walk through some of the features of ArkAdmin. I didn’t demo everything but it’s a solid overview. I will write up a dev experience audit in the coming days.

3 Likes

Sorry for the late response @jgmcalpine. The wrapper looks great, you’re honestly pioneering a bunch of things on wallet UX that even we haven’t had time to consider.

I only really have some nits on UX:

I increasingly think it’s better to frame “cooperative exits” as just on-chain/Lightning spends, rather than try to make potentially confusing distinctions between “cooperative” and “emergency exits” (which is probably a more user-friendly term than “unilateral exit”). Even just the term “exit” should probably be reserved for triggering the broadcast of a VTXO’s pre-signed transactions—that’s why we use “offboard” to refer to (cooperatively) spending all a wallet’s bitcoin over on-chain or Lightning.

Similarly, I would reframe “deposit/onboard” as just “board” and keep it in the coin management page. It’s relatively advanced operation of turning on-chain bitcoin into off-chain bitcoin that hopefully most users will never need to do, and they definitely shouldn’t conflate it with receiving of VTXOs (which they might consider “deposits”). “Boarding” might make it more clear it’s a pretty specific operation in the context of the Ark protocol.

2 Likes

Thanks for the feedback! I agree regarding the mental models and just pushed an update to align the UI with that language.

Your point about most users not needing to board actually fits perfectly with the rest of the suite I’ve been building since that last video. I’ve expanded the repo to include ArkPOS (a retail PWA) and ArkFetch (a self-hosted developer API) to show how we can skip the manual boarding step entirely via instant inbound liquidity.

I’ll record a new short walkthrough to demo the full stack and the updated UX and will drop it here soon.

Here is the Loom with a quick (2:33) demo of ArkPOS and ArkFetch:

One additional note, while building this I documented the specific friction points I hit and compiled them into a DX Audit in the repo here:

Excited to see V1 hit mainnet!