> For the complete documentation index, see [llms.txt](https://docs.trilobyte.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trilobyte.finance/technical-documentation/testnet-deployment.md).

# Testnet Deployment

{% hint style="warning" %}
**Testnet / sandbox only.** Every address, key, and setting on this page is for **Stellar Testnet** and is not connected to any production system. Stellar testnet resets periodically — a reset wipes all contracts **and** their referenced accounts, and the protocol must be redeployed. Do not send real funds to any address on this page.
{% endhint %}

## Current testnet deployment (as of 28 September 2026, tranched protocol)

| Contract               | Address                                                            | Notes                                                                                                                                                                                                                                                              |
| ---------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `globals`              | `CB2AE4KHDVE6U5HFN6AAWONTOYTXEVAZDT6I2TYFFT2PHOQXQQKEEYQO`         | admin = ops = sec admin use the same backend service key; sandbox settings: 60-second payment period, 100 USDC minimum loan, 1 USDC minimum investment, 120-second grace reference; USDC whitelisted as both a lending and collateral asset; compliance gate unset |
| `factory`              | `CDUBH7DXZG3ULQ5TJURC3S6MITFJHYSXPN7OAABCBF3W4G7IF5Y6JD4B`         | Replaces an earlier Factory that was bricked by settings-struct drift — see the Upgrade-path rule in [Deployment](/technical-documentation/deployment.md)                                                                                                          |
| `vault` (WASM hash)    | `147048c93deb26982477e1fb17a795e525828d3efbe67ea4cbf59880702bec0e` | The Factory deploys a new vault instance per loan from this template                                                                                                                                                                                               |
| `collateral_escrow`    | `CACWAR2Y5PT3PUVFCMZZ54Y7AU2BZKPDLU4RREF6LGUR65PMP6EQSPW4`         | Redeployed with the Globals-linked constructor; Upgradeable                                                                                                                                                                                                        |
| `compliance_allowlist` | `CA4EZQ3OJY7LOGARIOB4EPT4HE3SL6E7WAPJUHHJM3KZXP2HWHHBWOHD`         | Deployed, but **not** wired into Globals on the sandbox                                                                                                                                                                                                            |
| `timelock`             | `CBVBE4KHTLGHE67CTNJOT6Z7F7RCFLCXZRFKZ7345UVAWOGTRAT33MCE`         | Proposer/executor is the governor key; **not** the Globals admin on the sandbox (hardening deliberately skipped for iteration speed)                                                                                                                               |
| `web_auth`             | `CADYLDYIS7U5PA4DEW7YWOJ5DUTEOLCKZUKVNM732VBXQI4ZAYZQDSTQ`         | SEP-45 `web_auth_verify`                                                                                                                                                                                                                                           |

## Sandbox settings vs. production defaults

The testnet deployment deliberately compresses the protocol's time-based parameters for fast iteration, rather than running a separate time-compressed build:

| Setting                                 | Sandbox (testnet) | Production default |
| --------------------------------------- | ----------------- | ------------------ |
| Payment period (`monthly_emi_interval`) | 60 seconds        | 30 days            |
| Minimum loan amount                     | 100 USDC          | Governance-set     |
| Minimum investment                      | 1 USDC            | 100 USDC           |
| Grace period reference                  | 120 seconds       | 30 days            |

{% hint style="info" %}
All of these are ordinary Globals settings, changed via `update_settings` — there is no separate "testnet build" of the contracts. A vault snapshots the period length and other tranche settings from Globals at creation, so changing a setting never alters an already-created vault's schedule.
{% endhint %}

## Why the Factory was redeployed

The prior testnet Factory could not be upgraded: its `upgrade` function decoded the full `GlobalSettings` composite struct just to read one field, and once the real struct in Globals grew past what the deployed Factory expected, every call that touched that decode — including `upgrade` itself — trapped. The Factory was permanently bricked; the fix was a fresh Factory deployment plus `Globals.set_factory(<new address>)`. See the [Upgrade-path rule](/technical-documentation/deployment.md#the-upgrade-path-rule) for the rule this incident produced, and [Governance](/protocol-mechanics/governance.md) for how upgrade paths now avoid it.

## Latest end-to-end run

A full testnet run on 2026-09-28 exercised every major scenario against this deployment using real testnet USDC: full repayment lifecycle, a short payment with arrears carry, renegotiation, default and recovery, and funding-deadline cancellation with self-service refunds. All six scenarios passed. Notable operational findings from that run:

* `factory.create_vault`'s simulated resource fee initially exceeded Stellar's transaction fee cap (a TTL-extension cost issue, since resolved — see the TTL policy in [Deployment](/technical-documentation/deployment.md))
* The recovery-order invariant ("senior receives its full entitlement when the pool covers it") is asserted directly against on-chain state after `distribute_recovery`, not just in unit tests

*As of September 2026. Addresses and settings will change on the next testnet reset — always confirm against `.soroban/contract-ids.json` in the contracts repo before integrating.*
