High Level Architecture

Arkis delivers upgradable smart contract infrastructure, enabling a dynamic, secure, and efficient way to deploy new features faster. Arkis actively leverages two key concepts: proxies and diamonds. To deploy an Agreement or a Margin Account, the Arkis DMA uses the Arkis Agreement Factory and the Arkis Account Factory, respectively. Each factory maintains a pool of pre-deployed contracts to minimise transaction costs. When a contract is no longer in use, it is returned to the pool for future reuse.
Dispatcher
ERC2535
Register MA triggered by borrower to initiate MA allocation. Borrower either uses a predeployed MA or a new instance is deployed if not available. Borrower has to provide collateral so Arkis can allocate MA once the registered event is received.
Allocate MA and transfer funds from pool to Asset Managers' margin account according to terms of agreement
Close MA and return funds from Asset Managers' margin account to pool
Liquidator
ERC2535
Liquidate MA to close all opened positions, and swap to borrowed asset, return funds to pool and retain remaining balance in Arkis treasury for further investigation
Withdraw MA triggered by Arkis Security Officer to initiate withdrawal from MA to external address for overcollateralised trading
Account Factory
ERC2535
Beacon Propxy
Create margin account linked to agreement
Maintain available MAs for reuse (deploy new if necessary)
Contain Margin Account implementation
Margin Account
Beacon Proxy
Provide trading interface to Asset Managers based on whitelisted operations registered in compliance module and governed by the terms of agreement
Agreement Factory
Beacon Proxy
ERC1967
ERC1167
Create agreement between counterparties on fix terms
Maintain pool of available MAs for reuse (deploy new if necessary)
Contain Margin Account implementation
Agreement
Beacon Proxy
ERC4626
Account accrued interest for Liquidity Provider
Provide funds to the Asset Manager accordingly to agreement
Expose terms of agreement to enquirer
Compliance
ERC2535
Maintain master-set of Arkis whitelists
Ensure trading instruction compliant with terms of agreement (tenant-set of Arkis whitelist)
Compiler
ERC2535
Compile Arkis DSL into executable EVM commands
Pauser
ERC1967
Pause / Unpause other Arkis smart contracts atomically
Last updated