Building in Public: eCash x THORChain Native Integration - Technical Update #1

By xolosArmy Network | Engineering & Infrastructure

This is a detailed technical summary for the community and backers supporting the Teyolia campaign to bring native eCash ($XEC) into THORChain and Tonalli Wallet.

Over the past few days, we have been working directly on a fork of the THORNode repository—the technical core of THORChain—to prepare the initial integration of $XEC as a native UTXO chain. This is part of our broader mission: native cross-chain swaps, zero wrapped tokens, zero centralized bridges, and a seamless future UX via Tonalli Wallet.

This is not just about "adding a ticker." We are paving the infrastructure path so THORChain can recognize, validate, derive addresses, sign transactions, and eventually operate with $XEC as a first-class citizen. Here is our Proof of Work.

1. The Technical Progress

1. THORNode Fork & Draft MR

We prepared a working fork to develop without touching the official repository yet. Our main working branch is clean/xec-shared-utxo, and we created an internal Draft Merge Request titled: Draft: Add initial eCash (XEC) chain support to THORNode via shared UTXO client. We have officially moved from concept to reviewable, testable code.

2. Setting up a Local GitLab Runner (CI/CD)

THORNode has a massive CI suite (protobuf, tests, lint, semgrep). We installed and registered a dedicated Docker executor runner: xolosrmz-thornode-docker-runner. We resolved initial 403 Forbidden token errors and adjusted config.toml to allow privileged = true, essential for docker:dind to work correctly within the jobs.

3. Fixing Docker-in-Docker in CI

The original pipeline struggled with TLS configs on the local runner. We switched to a non-TLS approach using DOCKER_HOST: tcp://docker:2375 and the docker:28.5.2-dind service. This unlocked the generate job, allowing the pipeline to actually execute THORNode tasks.

4. Resolving Docker Hub Access

The upstream pipeline hardcoded the user as -u thornode. We parameterized the login to use our own Personal Access Token via $DOCKER_HUB_USER, bypassing upstream credential blocks.

5. Overcoming the Protobuf Blocker

The proto-check-breaking job failed due to an upstream misalignment regarding QueryStreamingSwapResponse. Since our branch doesn't modify .proto files, we temporarily marked this job as allow_failure: true to avoid blocking the XEC logic review.

6. Fixing Go Compilation in common/pubkey.go

We hit a real Go error: fmt.Errorf format %s has arg chainNetwork of wrong type common.ChainNetwork. We patched it to use %v, allowing the codebase to continue compiling.

7. Memo Tests "Butterfly Effect"

In x/thorchain/memo/memo_test.go, a test that expected an invalid memo to fail suddenly started passing. Why? Adding XEC as an asset made previously ambiguous empty values resolve differently. We updated the test to use a truly invalid asset (INVALID!ASSET). Adding a new chain changes the environment.

8. Asset Parser Bug (The Empty Shortcode)

We discovered a critical error: pool XEC.XEC does not exist. The root cause was in common/asset.go. XECAsset.ShortCode() was returning an empty string, which was dangerously registering in the map as shorts[""] = "XEC.XEC". This caused empty optional fields in memos to be accidentally parsed as XEC. We fixed the logic to prevent registering empty shortcodes. This is exactly why infrastructure funding matters.

9. Passing Unit-Tests

After fixing the shortcode bug, unit-tests went green ✅. This confirms that the core logic of THORNode is no longer breaking due to the XEC integration.

10-13. Linting, Go Toolchain, and Trunk Concurrency

We cleaned up a useless trunk-ignore comment, resolved a Go toolchain mismatch (forcing Go 1.24.6 to match the pipeline), increased the golangci-lint timeout, and reduced Trunk's job concurrency (-j4) to prevent our local runner from aborting under heavy load.

2. What We Achieved for Teyolia Backers

This is no longer just an idea. The project has real code in a THORNode fork. We are identifying exact touchpoints (parsers, addresses, UTXO clients, CI/CD). We are fixing real bugs, like the empty shortcode collision, preventing silent failures. We are actively funding the heavy lifting.

3. What is Next? (Phase 1 & Phase 2)

4. A Message to Our Donors

We have proven that technical progress is happening right now. We aren't asking for support to "see if we can start"—we are already deep in the THORNode codebase navigating infrastructure, compilers, and parsers.

The Teyolia campaign funds this exact reality: turning an ambitious idea into a serious, reviewable integration. Native eCash + Tonalli Wallet + Cross-Chain Swaps.

Let's build the path. 🐕⚡️

Support the Infrastructure Campaign on Teyolia