Aspis Smart Contracts Documentation
Aspis Smart Contracts
This document describes the architecture of the smart-contracts of Aspis protocol.
Here are the major smart-contracts of the system:
- AspisRegistry.sol - the main configuration contract of the system.
- AspisPoolFactory.sol - the factory contract to create new Aspis vaults.
- AspisPool.sol - the main “vault” contract.
- AspisConfiguration.sol - the contract that is deployed for each vault and stores it’s parameters.
- AspisGuardian.sol - an access control smart-contract. Required for some critical actions.
- AspisLiquidityCalculatorV3.sol - The upgraded version of
AspisLiquidityCalculator, which now delegates oracle interactions to separate adapters (Redstone, Chainlink, Uniswap). It retains the core functionality of price fetching, scaling, and conversions, but the logic is now modularized for easier updates and maintenance.
- Oracle Adapters:
- contracts/aspis/oracle-abstraction/adapters/base/BaseAdapter.sol
- contracts/aspis/oracle-abstraction/adapters/base/PullAdapter.sol
- contracts/aspis/oracle-abstraction/adapters/base/PushAdapter.sol
- contracts/aspis/oracle-abstraction/adapters/ChainlinkAdapter.sol
- contracts/aspis/oracle-abstraction/adapters/RedstonePullAdapter.sol
- contracts/aspis/oracle-abstraction/adapters/UniswapAdapter.sol
- Decoders - OdosV2Decoder.sol, OneInchV6Decoder.sol and UniswapUniversalDecoder.sol - help vaults to interact with exchanges.
- Aspis Upgrade: Comparing with the previous
AspisLiquidityCalculatorV2 we’ve abstracted away adapters to make adding new oracles easier and standartized
- Legacy - contains
AspisLiquidityCalculatorV2 which was upgraded to AspisLiquidityCalculatorV3
AspisRegistry
AspisPoolFactory
AspisConfiguration
AspisPool
AspisGuardian
AspisLiquidityCalculatorV3