This documentation is restricted to authorised members of the SWSS Developer Community. Access is granted exclusively through SWSS DevHub, after KYB and SWSS Foundation approval.
All SwssChain GitHub repositories are private. Significant updates are currently deploying across the full SWSS Ecosystem. SDK and API specifications are subject to change at any time in accordance with security requirements and SwssChain Foundation governance decisions.
SWSS SDK v2.1 is deploying across the ecosystem. API signatures may change during this period. Ensure your integration uses the latest schema from SWSS DevHub.
A contract deployed to SwssChain is immutable, holds economic value and cannot be patched in place. SWSS therefore treats the path from source to deployed address as a controlled process with the same seriousness as the consensus layer itself. This page describes the assurance applied to first-party SWSS contracts.
Before an Address Exists
| Stage | What is required |
|---|---|
| Independent review | Contract logic is reviewed by engineers who did not write it. Review is a gate, not a courtesy, an unreviewed contract does not reach a deployment key |
| Formal verification | Protocol-critical logic is proved rather than tested. Verification carries stronger guarantees than review for rules that must hold under every possible input, which is why it is applied to finality attestation and certificate verification. See BFTFA: Byzantine Fault Tolerant Finality Attestation |
| Adversarial testing | Contracts are exercised against failure paths and hostile inputs, not only the behaviour they were written to produce |
| Independent audit | Components that hold value or bind settlement are audited externally before they carry production traffic. See Independent Assurance |
| Controlled deployment | Deployment authority is held under the custody rules described in Key Custody and Protection. A deployment is a multi-party operation |
The Deployment Record Is the Authority
This is the discipline that distinguishes a controlled deployment from a recorded one, and it is worth stating precisely because the failure it prevents is not obvious.
When a contract is superseded, the old contract does not disappear. It remains deployed, it remains callable, and it continues to answer correctly for the questions a caller knows how to ask, a retired DEED-1 registry still reports its own name and still returns data. A contract cannot be asked whether it is current. An integrator holding a stale address therefore does not receive an error; they receive a plausible answer from the wrong contract, which is a far worse failure than a clean rejection.
SWSS answers this structurally. Every deployed address resolves from the Foundation's deployment record, through the published address register, to the values distributed in the SWSS SDK. The chain confirms what is deployed; the deployment record establishes which deployment is current. Integrators are expected to resolve addresses through that chain of authority rather than from a value held in their own source.
Change After Deployment
Because a deployed contract cannot be edited, a change to first-party contract behaviour is a new deployment, a migration path and a record update: never a silent substitution. Material changes to protocol-governing contracts are enacted through SWSS Governance, so the decision is recorded on chain and is auditable by anyone, rather than being an operational action visible only to the operator.
Resolving Which Address Is Current
The failure described above is worth making concrete, because it does not announce itself. A superseded contract answers correctly for everything a caller knows how to ask, so an integrator holding a stale address receives plausible data rather than an error, and nothing in the response indicates which deployment produced it.
The address therefore has to come from the deployment record, and the chain is used to confirm it rather than to discover it.
// The deployment record is the authority on WHICH deployment is current.
// The chain is the authority on WHAT is deployed at an address. Neither
// question can be answered by the other, and asking the contract answers
// neither.
const expected = deployments[network].deedRegistry
if (configuredAddress.toLowerCase() !== expected.toLowerCase()) {
throw new Error(
`deed registry address ${configuredAddress} is not the current deployment ` +
`for ${network} (${expected}) — refusing to settle against a superseded contract`,
)
}
const code = await provider.getCode(expected)
if (code === '0x') {
throw new Error(`no contract deployed at ${expected} on ${network}`)
}
An integration that fails closed on this check cannot silently settle against a retired contract. One that reads its address from a constant in its own source will do so the first time an address moves, and will report success while doing it.
Third-Party Contracts
This programme covers first-party SWSS contracts. Contracts deployed by other parties on SwssChain remain the responsibility of whoever deployed them, and SwssChain makes no representation about their security regardless of whether they integrate with SWSS infrastructure. Developers admitted under Developer and Validator Access are contractually accountable for the contracts they deploy, which is set out in Developer Obligations.
Integration requirements for building against SwssChain (supported opcodes, fee behaviour, certificate verification) are documented under Developer Reference and are engineering documentation rather than security policy.
