Skip to main content

Architecture

NOTE: These docs are under active development ๐Ÿ‘ทโ€โ™€๏ธ๐Ÿ‘ท

MarketCore.sol

This contract contains all the core logic related to the market: such as minting and redeeming, the value transfer between pools and calculating funding. This is the most important contract in Float Arctic.

Since a single contract was too large for deployment, the market contract is split into 2 parts. MarketCore is the core logic of the system. It doubles as a proxy (via an EIP-1967 proxy) and contains all the functions for initialization and administrator functionality like adding new pools. This enables the flexibility of an UUPS upgrade pattern without increasing gas costs of the common/core contract functions.

MarketExtended.sol

This contract contains non-core market functions that are rarely used, like intial pool setup and parameter configuration, enabling lower gas costs.

market contract structureFigure: structure of the market contracts prepared for the Float Arctic audit.

OracleManager.sol

This contract validates that the oracle IDs passed in for execution/upkeep are valid then returns the prices for executing the value change. Any attempt to manipulate this contract or bypass its check could result in an erroneous value transfer.

MarketLiquidityManagerSimple.sol

This is a very simple contract. It just holds all the collateral.

PoolToken.sol

This is a modified ERC20 token contract to create a tokenised vault.