AsseteraAssetera Docs
Smart contracts

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

PropertyWhat 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-gatedEvery 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 availableThe 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:

RolePurpose
DEFAULT_ADMIN_ROLEGovernance: upgrades, pause/unpause, compliance toggles, fee-collector allowlist, and the emergency cancelOrderForUser / cancelOfferForUser exits. Held by a Safe multisig in production.
KYC_OPERATOR_ROLEThe operator key whose EIP-712 signature authorizes each KYC-gated action.
FEE_OPERATOR_ROLEThe 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

ContractAddress (integrate against this)
AsseteraECS0x58c3Fb1B69ca985A5461CcEfFd0Fe590b653F213
Forwarder0x402D2d3e7CdD42cAb656475952961f150f3Cf07f
MockRWA0x7c8d03B4aA9b4A21BAA82266f10174f0961a7A0E
MockUSDC0xf4e1049Ec8b2C8CD2e5a6554acA3f5c267951043

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.

ContractImplementation (changes on every upgrade)
AsseteraECS0xe0A9AA1ec16c2d9402AfD5e276e4691B5b1c0bd5

Chain ID 11155111 · CAIP-2 eip155:11155111 · deployed at block 11,264,402

ContractAddress (integrate against this)
AsseteraECS0x58c3Fb1B69ca985A5461CcEfFd0Fe590b653F213
Forwarder0x402D2d3e7CdD42cAb656475952961f150f3Cf07f
MockRWA0x7c8d03B4aA9b4A21BAA82266f10174f0961a7A0E
MockUSDC0xf4e1049Ec8b2C8CD2e5a6554acA3f5c267951043

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.

ContractImplementation (changes on every upgrade)
AsseteraECS0xe0A9AA1ec16c2d9402AfD5e276e4691B5b1c0bd5

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

Read the source

The contract repository is public. These deep links are pinned to the evm-contracts-v4.0.0 tag.

FileWhat it covers
contracts/src/AsseteraECS.solThe assembled contract: UUPS, ERC-2771 and the initializer, over the OrderBook / OfferBook modules.
contracts/AUDIT-SCOPE.mdWhat is in and out of scope for external review, per module.
contracts/docs/FUNCTIONAL_SPEC.mdThe behavioural specification the lifecycle pages summarize.
contracts/docs/INDEXER_EVENT_SCHEMA.mdThe event schema of record: canonical signatures, topic0 hashes, error selectors.

On this page