Building the Exchange, and why buys broke
Listing and buying 1Sat tokens from the wallet. Most of the work was not the screens but storage limits, double-encrypted records and slow APIs.
The first Market
On 1 October the Market showed trending 1Sat tokens and collections with an in-app buy, and NFT categories for music, video and images. Adult content is blurred or hidden by a filter that is always on. Selling was hidden at first, because upstream had turned off creating OrdLock listings.
Buys that didn't work
On 3 October we fixed buying. Three things were wrong: the format of the listing reference, a step in the wallet's permission module that never finished, and the size of the unlocking script. Then bought tokens did not show on the Wallet tab, because they never reached the indexer.
Then a deeper problem. Quick, unconfirmed spends one after another hit "Maximum BEEF depth exceeded. Limit is 12". We raised the limit to 64. The first fix did not reach the copy of the toolbox that threw the error, so we patched every bundled copy at build time. The real fix was storage: wallets that kept their active storage on 1Sat's remote service now switch to the device, with 1Sat as a backup.
Storage, and a restore bug we caused
Moving to device storage exposed more. Backups over 1 MB were rejected by the remote service, so big wallets had never backed up. We now sync in chunks of about 400 KB. Then we found new and restored wallets starting on device storage could not find their history. They now start on 1Sat storage, then switch to the device once.
Tokens that were bought but missing
Some bought tokens never showed in balances. Their records had been encrypted twice, and the toolbox removed only one layer, so it found no amount and skipped them. We fixed the decryption and added "Find missing tokens", which re-derives the keys used for market buys and picks up anything the wallet owns.
Selling, and speed
On 4 October Sell came back, listing tokens as OrdLock v2, since v1 creation is off upstream. The wallet can still read and cancel v1 listings. Token listings now come from GorillaPool's market API, which answered in about 0.9 s against 7 to 15 s for the search we used before. On 5 October we added retries and a fallback when api.1sat.app has problems, instead of showing an empty list.
Exchange today
In bWalletX the tab is called Exchange. It has category filters, search by ticker or token id, price charts from recent sales, and sections for Strategies (post 010) and Contracts and Bonds (post 011). Token rows have Buy, Sell, Send and Chat. In the store app it is Market and view-only.
Update, 7 Oct 2026: The store app no longer has a view-only Market: the store edition, bWallet, no longer has a Market or Exchange tab at all, not even a view-only one (Apple guideline 3.1.5(iii)). Trading is only in bWalletX: see Exchange.
What's not done
- Trading depends on third-party indexers and APIs (1Sat, GorillaPool). When they are slow or wrong, so is the Exchange.
- The chart is built from recent sales only; thin markets give misleading charts.
- We have not had the trading code reviewed independently.