Sub-systems
The FCT platform is constructed from a core sub-system and some modular / replaceable / extendable sub-systems as follows:
FCT Core
Holds contracts that are responsible for management and execution of FCTs. It allows to register engine and economy contracts, route execution to the right engine version, ens services and provides an authentication service for the runner in order to make sure engine being used is genuine.
Contracts
FCT_Authenticator.sol FCT_Auth_FlashLoan.sol FCT_Auth_Vault.sol FCT_Auth_SecureStorage.sol FCT_Controller.sol FCT_ENS.sol
Interfaces
IFCT_Authenticator.sol IFCT_Controller.sol IFCT_Engine.sol IFCT_ENS.sol IFCT_Runner.sol IFCT_RunnerOptional.sol
FCT Engines
FCT Engines hold the logic for executing FCTs. They are recognized by their interface and version number. The FCT Core subsystem makes sure only signal engine interface + version, exist in the system. It also makes sure, once engine was registred in the system it is immutable.
Contracts
FCT_BatchMultiSig.sol FCT_Constants.sol FCT_Helpers.sol
FCT Economy
FCT Economy contracts implements the tokenomics as defined on the whitepaper. It supports multi tokenomics contracts, allowing the runners to decide on which one they are willing to support. This also eliminate the need for assets migrations of the "gas station" (FCT_Actuator) assets in case of upgrades of the tokenomics logic. Older tokenomics cannot be deleted, making the FCT system future proof, allowing the runners to keep working with an older and battle tested tokenomics.
Contracts
FCT_Actuator.sol FCT_ActuatorCore.sol FCT_ActuatorStorage.sol FCT_Arch.sol FCT_Tokenomics.sol FCT_Funding.sol
Interfaces
IFCT_Tokenomics.sol IFCT_Actuator.sol IFCT_Funding.sol
FCT Libraries
FCT Libraries are special contracts that are executed by the runners via delegate calls. They can be considered as an "internal" extensions of the FCT system. In order to use an official library there is a need to use "library@<name>" as ens_name along with the contract address for extra safety. Furthermore, those ens addresses are FCT internal and added only by the FCT system owners.
Because the security concern of using delegate calls, it is recommended to use only official libraries
Contracts
FCT_Lib_MultiCall.sol FCT_Lib_UniswapV2.sol
FCT Extensions
FCT Extensions are stand alone contracts that perform generic actions, eg. math, storage, etc. They are used on an FCT message just like any other existing protocol. The generic nature of this contracts combined with the ability to use return values as variables for calls, extends the capabilities of the FCT platform.
Contracts
Decimals.sol FCT_Ext_SecureStorage.sol FCT_Ext_SignersValidator.sol FCT_Ext_TokensSafeMath.sol FCT_Ext_TokensValidator.sol
Smart Wallet (FCT Runner)
Smart wallet is implementation of a smart account, supporting backup and inheritance functionality. FCT_Runner interface also implemented, making smart wallet capable of execution FCTs.
Contracts
Activator.sol ActivatorBase.sol Backupable.sol Factory.sol FactoryProxy.sol Heritable.sol Proxy.sol ProxyLatest.sol SmartOracle.sol SmartWallet.sol SmartWalletCore.sol Storage.sol StorageBase.sol
Interfaces
IBackupable.sol ICreator.sol IFactory.sol IGasReturn.sol IHeritable.sol Interface.sol IOracle.sol ITokenEconomy.sol IWallet.sol
Flash Loans Executors
Flash loans are special contracts that act both as activators and runners. They work with the economy contracts in order to execute FCTs after a flash loan was given and make sure it was returned at the end of the execution. They also holds the flash load assets, giving the ability to set special calls inside an FCT, that move this assets to one of the participants or directly to other protocols. It extends that capabilities of both, flash loan protocols and the FCT system, allowing spreading the flash loan among different protocols and runners during the execution process.
Contracts
FCT_FlashLoan.sol FCT_FlashSwap_Uniswap_v2.sol FCT_FlashLoan_Aave_v2.sol FCT_FlashLoan_Aave_v3.sol
Last updated