Contract architecture
The engine owns assets and shares. A stateless lifecycle module executes pool operations in the engine’s context.
Mintware’s engine, hook and integration are unaudited testnet software. An upstream audit does not cover this composition.
The contract map
Hookless-pool wrapper. Rejects a nonzero pool hook.
Owned-pool wrapper. Validates the appraisal hook, adapter, factory mapping and pool identity.
Shares, deposits, withdrawals, NAV, adapter calls and lifecycle guards. Inherits pool identity, owner/guardian pause and reentrancy protection from MintwareV4PoolVault; ERC-20 provides the share ledger.
Fixed test mark, ratio-feed mark or appraisal hook. MWMarketValuation checks freshness and converts values.
Reads claims and capacity; deposits or recalls each underlying token. MWMarketShareMath converts value to shares.
Collect, add, remove, optional swap, or recenter. MWV4PositionEngine calls PoolManager.modifyLiquidity; swaps call PoolManager.swap. MWV4Settlement pays debts and takes receipts.
Stores pool state and the engine-owned LP position. Settles currency deltas. In an owned pool, calls MintwareRwaAppraisalHook for initialization, liquidity and swap checks.
Why a separate, pinned lifecycle module?
The module separates callback execution from the engine’s claim accounting. It has no asset or share ledger of its own. A delegatecall means its pool and token calls execute as the engine address; it returns liquidity and range results for the engine to persist.
That execution power makes module identity critical. Both concrete engine wrappers pass an expected runtime code hash to the core constructor. Construction rejects any module whose deployed runtime does not match that hash. The module address is immutable, with no module-upgrade setter. The pin covers exact compiled runtime bytes, including metadata where present; it is not merely a contract-name check.
Shared libraries and adapters
| Piece | Responsibility |
|---|---|
MWMarketShareMath | Bootstrap normalization, proportional deposit shares and partial-exit share burns. The engine supplies NAV; the library does not choose marks. |
MWMarketValuation | Fresh, nonzero, non-future mark checks and decimal-aware conversion into raw quote units. |
MWV4PositionEngine | Direct PoolManager liquidity mutations and measured token consumption/receipts during an active unlock. |
MWV4Settlement | sync/pay/settle/take plumbing. For an owned pool, funds the PermissionsAdapter with underlying, verifies exact funding, then wraps virtual units to PoolManager. |
MWV4PositionMath / MWV4TickSpacing | Liquidity and token-quantity calculations, quote orientation and tick alignment. |
IMarketAdapterBinding | IYieldAdapter plus asset() and vault(). The engine verifies token identity and dedicated engine binding before activation. |
MintwareIdleYieldAdapter | Holds tokens without yield. Only the bound vault supplies/withdraws. Its separate owner-adjustable deposit cap counts supplied principal, not donations. |
MintwareERC4626YieldAdapter | A source implementation over an external ERC-4626 vault. Reports fee-net redeemable assets, supplies within source capacity, and recalls subject to source liquidity and a per-block cap. Not the idle-only setup in current market records. |
Which parts come from whom?
Mintware supplies the engines, lifecycle module, appraisal hook, adapters and MW libraries above, plus registry verification and the app. Uniswap supplies PoolManager and v4 pool mechanics, the PermissionsAdapter and its factory, and permissioned routing infrastructure. The issuer supplies the asset, native token transfer policy, allowlist checker and appraisal observations; those issuer roles use test fixtures in the current RWA demonstration.
The owned engine keeps a direct pooled position, with its own non-transferable shares. It does not use the permissioned PositionManager’s NFT ownership or recovery mechanism. For permission and custody details, continue to RWAs and owned pools.
Source reference
Behavior above follows these files in the Mintware repository. Deployment records describe recorded state, not a fresh chain read.
contracts-v4/src/vaults/MintwareMarketEngine.solcontracts-v4/src/vaults/MintwareMarketEngineCore.solcontracts-v4/src/vaults/MintwareOwnedPoolMarketEngine.solcontracts-v4/src/vaults/MintwareMarketLifecycleModule.solcontracts-v4/src/vaults/MintwareV4PoolVault.solcontracts-v4/src/vaults/IMarketAdapterBinding.solcontracts-v4/src/vaults/MintwareIdleYieldAdapter.solcontracts-v4/src/vaults/MintwareERC4626YieldAdapter.solcontracts-v4/src/lib/MWMarketShareMath.solcontracts-v4/src/lib/MWMarketValuation.solcontracts-v4/src/lib/MWV4PositionEngine.solcontracts-v4/src/lib/MWV4Settlement.solconfig/deployments.json