AsseteraECS
AsseteraECS (Execution, Clearing and Settlement): the escrow-based, UUPS-upgradeable, gasless, compliance-gated order and offer book behind Assetera trading.
AsseteraECS (Execution, Clearing and Settlement) is the Solidity smart contract that settles trading on Assetera. It holds an order book and a targeted-offer (negotiation) book, escrows the tokens users trade, and gates every state change behind an off-chain compliance attestation. It is the on-chain record of what was traded, by whom, and under which terms.
It is an escrow-based limit-order venue with no on-chain matching engine. Makers post priced limit orders and the contract escrows the sell side immediately; a taker executes against a specific order id. Nothing on chain scans the book for crosses, so every execution is an explicit call against an order the caller chose. That keeps the contract small and its gas cost predictable, and it is why the two lifecycle pages below describe explicit transitions rather than a matching algorithm.
This section documents the contract for integrators: the two lifecycles, the event catalog you index against, and the EIP-712 attestation model that authorizes each action.
Formerly AsseteraExchange
The venue was called AsseteraExchange. The rename is cosmetic: deployed addresses, the ABI, event and function selectors, and the storage layout are all unchanged, so no redeploy or migration is involved. One identifier deliberately keeps the old spelling, the EIP-712 domain name. See Attestations.
What it is
| Property | What it means for you |
|---|---|
| UUPS-upgradeable (ERC-1967) | Logic lives in an implementation behind a single proxy. Always index and interact with the proxy address. Confirm the live implementation via the eip1967.proxy.implementation storage slot. |
| Gasless (ERC-2771 meta-tx) | Users pay no gas and hold no native tokens. Calls are relayed through a trusted Forwarder; the contract resolves the real actor with _msgSender(). Read identity from the address in each event (maker, taker, account, by, proposedBy), never from tx.from. See Events. |
| Compliance-gated | Every state-changing call carries a single-use, deadline-bound EIP-712 KYC attestation signed off-chain. Fee terms travel in a separate fee attestation. See Attestations. |
| Source available | The Solidity source, tests and audit scope are public: Assetera-AG/AsseteraEvmContracts. Read the contract itself in contracts/src/AsseteraECS.sol and the review boundary in AUDIT-SCOPE.md. Links are pinned to the evm-contracts-v4.0.0 tag so they cannot rot. |
Roles
The contract uses OpenZeppelin AccessControl. The roles an integrator should know about:
| Role | Purpose |
|---|---|
DEFAULT_ADMIN_ROLE | Governance: upgrades, pause/unpause, compliance toggles, fee-collector allowlist, and the emergency cancelOrderForUser / cancelOfferForUser exits. Held by a Safe multisig in production. |
KYC_OPERATOR_ROLE | The operator key whose EIP-712 signature authorizes each KYC-gated action. |
FEE_OPERATOR_ROLE | The operator key whose EIP-712 signature sets the fee terms snapshotted onto an order or offer. |
Fee terms are authorized by a separate FeeAttestation signed by FEE_OPERATOR_ROLE, not the KYC
attestation. See Attestations.
Where it runs
AsseteraECS is deployed on Polygon Amoy and Sepolia, both testnets, with the same addresses on each. Pick a network for its contract addresses:
Addresses exactly as published in @asseteragmbh/evm-contracts, the version these docs are built against.
Chain ID 80002 · CAIP-2 eip155:80002 · deployed at block 42,134,204
| Contract | Address (integrate against this) |
|---|---|
| AsseteraECS | 0x58c3Fb1B69ca985A5461CcEfFd0Fe590b653F213 |
| Forwarder | 0x402D2d3e7CdD42cAb656475952961f150f3Cf07f |
| MockRWA | 0x7c8d03B4aA9b4A21BAA82266f10174f0961a7A0E |
| MockUSDC | 0xf4e1049Ec8b2C8CD2e5a6554acA3f5c267951043 |
Behind the proxy. The addresses above are the stable ones. The UUPS implementation below is what the proxy currently delegates to. It is useful for verifying the deployed bytecode, but it changes on every upgrade, so never hardcode it.
| Contract | Implementation (changes on every upgrade) |
|---|---|
| AsseteraECS | 0xe0A9AA1ec16c2d9402AfD5e276e4691B5b1c0bd5 |
Chain ID 11155111 · CAIP-2 eip155:11155111 · deployed at block 11,264,402
| Contract | Address (integrate against this) |
|---|---|
| AsseteraECS | 0x58c3Fb1B69ca985A5461CcEfFd0Fe590b653F213 |
| Forwarder | 0x402D2d3e7CdD42cAb656475952961f150f3Cf07f |
| MockRWA | 0x7c8d03B4aA9b4A21BAA82266f10174f0961a7A0E |
| MockUSDC | 0xf4e1049Ec8b2C8CD2e5a6554acA3f5c267951043 |
Behind the proxy. The addresses above are the stable ones. The UUPS implementation below is what the proxy currently delegates to. It is useful for verifying the deployed bytecode, but it changes on every upgrade, so never hardcode it.
| Contract | Implementation (changes on every upgrade) |
|---|---|
| AsseteraECS | 0xe0A9AA1ec16c2d9402AfD5e276e4691B5b1c0bd5 |
The ABI and every address above are published with each deployment in the TypeScript SDK; resolve them from the package rather than hardcoding.
These are testnet addresses. Production will be a fresh deploy (a brand-new proxy governed
by a Safe multisig), not an in-place upgrade of a testnet proxy. Storage layout, structs, and the
action enum are being redesigned for the production baseline (targeting an on-chain version() of
4.0.0, which is unrelated to the npm package version), so
the production ABI and typehashes will differ. Re-point every off-chain consumer at the new
address when it lands.
Where to go next
Order lifecycle
place → fill → settle, plus cancel and expiry, and what each step escrows.
Offer lifecycle
The regulator-mandated targeted offer / counter-offer negotiation flow.
Events
The event catalog you index against, with the meta-tx actor model.
Attestations
The EIP-712 KYC and fee attestation model that authorizes each action.
Source on GitHub
The public AsseteraEvmContracts repo: Solidity source, Foundry tests, functional spec and audit scope.
Read the source
The contract repository is public. These deep links are pinned to the evm-contracts-v4.0.0 tag.
| File | What it covers |
|---|---|
contracts/src/AsseteraECS.sol | The assembled contract: UUPS, ERC-2771 and the initializer, over the OrderBook / OfferBook modules. |
contracts/AUDIT-SCOPE.md | What is in and out of scope for external review, per module. |
contracts/docs/FUNCTIONAL_SPEC.md | The behavioural specification the lifecycle pages summarize. |
contracts/docs/INDEXER_EVENT_SCHEMA.md | The event schema of record: canonical signatures, topic0 hashes, error selectors. |
Real-time updates (SSE)
Use a server-minted, channel-scoped ticket to receive Server-Sent Events without exposing an Assetera API token to the browser.
TypeScript SDK
Consume AsseteraECS with @asseteragmbh/evm-contracts: ABIs, per-chain addresses, a viem client, and wagmi hooks, all generated from the contract.