Smart contracts
Managers target Euler as the lending market: each market is a manager instance bound at deployment to one immutable collateral/debt vault pair, deployed through a factory that serves as the system-wide registry. Solidity ^0.8.20, OpenZeppelin 5.4.0, Ethereum Vault Connector, and the Pyth SDK for oracle updates. Integrators index state through events and view calls.
Architecture
Everything is an OpenZeppelin minimal-proxy clone: managers (cloned and initialised by their factories), one escrow per request, a fee collector per manager, and on the unwind side a shared liquidator and the auction contract. Nothing is upgradeable: every clone points at an immutable implementation, so fixing a defect means deploying a new implementation for future requests; already-deployed escrows never change. The unwind manager splits its logic between a core contract and a delegatecall extension sharing one storage layout, purely to stay within the contract size limit.
Three structural facts matter to integrators:
- Escrow addresses are deterministic. The request ID doubles as the
CREATE2 salt (
keccak256of the request inputs and a per-user nonce), so an escrow address is predictable before the request is submitted. This is load-bearing: the destination sub-account must authorise the escrow as its EVC operator ahead of finalisation. - PSBA bridges the settlement gap. While real collateral is away being minted or redeemed, a mintable pending-settlement base asset (PSBA) is deposited in a dedicated vault so the escrow’s lending market position stays healthy. It is minted at request time and burned at settlement or liquidation.
- Funds flow through per-user wallets. Each user has one deterministic wallet clone that holds and forwards funds for the tokenised asset platform interactions; see user wallets.
Compliance gating
Wind requests and liquidation-auction bids require a valid Keyring credential
for the market’s policy, checked explicitly by the contracts
(checkCredential in requestWind and submitBid). Unwind requests carry
no explicit check: they are gated implicitly, because the Euler cluster’s
vault hook credential-checks the operations the request performs against the
account’s owner. All checks resolve against the same KeyringCore registry
documented under
Connect; Unwind is a
consumer of Keyring credentials, not a separate compliance system.