Skip to content

Instantly share code, notes, and snippets.

View aruokhai's full-sized avatar
๐Ÿฆ
Building On Bitcoin

Aruokhai Joshua aruokhai

๐Ÿฆ
Building On Bitcoin
View GitHub Profile
@aruokhai
aruokhai / enclave_model.md
Last active August 24, 2026 21:04
Nitro Enclave Model

Simulation-Based Security Model for an Attested HTTP Runtime

1. Overview

We model the runtime as an ideal attested HTTP request-response functionality.

The functionality provides an authenticated and confidential HTTP service associated with an image identity, backed by canonical deployment state and evaluated relative to an admissible view of the external world.

Security is defined by simulation: every real execution must be computationally indistinguishable from an execution using only the ideal functionality.

@aruokhai
aruokhai / cost.md
Last active July 23, 2026 13:04
Simple Enclave AWS Cost

Enclave Platform โ€” AWS Cost Analysis

A self-contained AWS cost analysis for one enclave deployment: the full detail of five areas โ€” fixed infrastructure, usage-based infrastructure, the freshness anchor (S3), KMS key material, and state_root โ€” followed by a consolidated, segmented monthly estimate for an example workload.

Headline: for the example workload (ยง7.1), $209/month ($2,510/year) for one host โ€” ~68% is the always-on EC2 instance. Parts 1โ€“5 detail each area; Part 7 consolidates them by cost behavior (fixed, variable, per-reboot, per-migration,

@aruokhai
aruokhai / prfextension.md
Last active June 2, 2026 16:57
PRF Extension

A Social 2-of-3 MPC Wallet with Passkey-PRFโ€“Derived User Shares

Type: construction + security analysis (design draft / paper skeleton) Status: working draft Anchor related work: A. P. Sarr, Cryptanalysis and Improvement of Smart-ID's Clone Detection Mechanism โ€” used as the motivating foil (password/PIN-camouflaged shares are insecure).

Notation. I_P is the passkey share's signing identifier. seed is a high-entropy value; f_seed(ยท) is the deterministic refresh polynomial derived

@aruokhai
aruokhai / arkadeauth.md
Last active March 16, 2026 05:46
arkade-auth.md

Pseudonymous Authentication for Arkade Services Using Ark Batches as Anonymity Sets


The Problem

Arkade is an ecosystem of Bitcoin services built on the Ark Protocol, where users hold Virtual Transaction Outputs (VTXOs) that are periodically refreshed through coordinated rounds managed by an Ark Service Provider (ASP). Each round produces a VTXO tree whose root is committed on-chain in a Bitcoin transaction, establishing a publicly verifiable, Bitcoin-anchored record of all participants in that round.

As Arkade grows and services like LendASat emerge, a fundamental authentication gap surfaces. The protocol coordinates VTXO ownership and refresh cycles efficiently, but it provides no mechanism for Arkade services to answer three questions simultaneously: is this user a legitimate Ark participant with a real VTXO in a committed round batch, has this user already registered with this service under a different identity from the same VTXO, and can this user authenticate on return visits without re-prov

@aruokhai
aruokhai / ark-mpc-wallet.md
Last active March 4, 2026 04:43
Ark MPC Wallet

Solving Ark's Liveness Problem with Threshold Cosigning

What I'm Working On

I've been building out an MPC wallet specifically designed to address what I see as the biggest UX blocker in the Ark protocol โ€” the interactivity requirement during Batch Swap rounds.

This is still a work in progress, but the core primitives are in place and I wanted to share where things stand and get your feedback on the direction.

Liquidity Provisioning for Arkade Using a Bradt Auction System

Liquidity provisioning for Arkade via a Bradt-style auction requires m providers, each committing x units of liquidity.

This model aligns naturally with the Commitment Transaction format, which is composed of multiple batches organized as commitnent outputs. In this setup, each providerโ€™s liquidity can be assigned to a specific batch, effectively capping the exposure of any single branch and improving system reliability.

The connector tree can also be simplified. The first level has radix y, representing the number of liquidity providers, while the second level contains the providers's connector outputs used across all forfeit transactions.


I have an idea of using Ark for Escrow related services. ( I am thinking about it )
The idea lies in the finality of sweep and unilateral exit.
@aruokhai
aruokhai / arkuximprovment.md
Last active January 20, 2025 14:59
Ark UX Improvement: Binary Forest Replaces Binary Tree

Objectives

The Ark Protocol, a very splendid UTXO based Bitcoin OffChain Protocol, in its current non-convenant iteration, is presently faced with some not so splendid UX Flaws. These Flaws are categorized into two:

Liquidity Flaw (Short Sweep Duration):

In cases where a premature sweep is conducted using the linear properties of Schnorr signatures, the recovered liquidity from such a sweep remains dependent on the transaction frequency of users and the depth of the Ark tree, given that a binary tree structure is employed. A proposed solution by Joรฃo Bordalo involves utilizing a splitting function for VTXOs based on a predefined ratio. Building on this idea, I suggest a more dynamic splitting approach that accounts for the average transaction size. This adjustment could better optimize the protocol by reducing both the cost of unilateral exits and the overall size of the Ark tree. Regardless of the specific approach taken, a reduction in liquidity requirements is likely to result.

Reliabi

@aruokhai
aruokhai / Arkissue.md
Last active November 26, 2024 15:29
Ark Liquidity Issue Fix

Ark Liquidity Lock Fix

The unresolved issue of liquidity lock requirements must be addressed before the Ark protocol can be deemed ready for public deployment. This issue pertains specifically to the mechanics of spending outputs within the Ark protocol, which directly impact its scalability and efficiency in managing off-chain transactions.

In the Ark Protocol, a timelock is imposed on non-leaf transactions, allowing the Ark Server to reclaim the associated outputs once the timelock expires. However, this timelock mechanism significantly amplifies the Ark Server's liquidity requirements, as it necessitates maintaining locked funds over extended periods, thereby impacting the system's overall capital efficiency.

To address this issue, I propose utilizing a multi-key address scheme analogous to the structure employed in Silent Payments. This approach not only mitigates the liquidity challenges but also introduces the added advantage of enabling Ark Providers to reorganize and group transactions based on

@aruokhai
aruokhai / gist:796adfc5317dc76a0c33cf167ebd6f44
Created August 4, 2024 16:06 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue: