Factory
Last updated
Last updated
Factory is the central coordinator of Torch Finance, responsible for deploying all contracts, including Vaults, Pools, and LP Accounts.
Think of the Factory as the store manager of a supermarket, deciding which checkout counters (Vaults) should be set up, which cash registers (Pools) need to be activated to handle discounts and exchanges, and arranging for delivery services (LP Accounts) to gather all purchases and deliver them to the user in one trip, ensuring faster and more efficient transactions.
When a new asset enters the system, the Factory deploys a new Vault (checkout counter) to manage and store the asset, ensuring it has a dedicated space for handling.
If a new liquidity pool is needed, the Factory sets up the corresponding Pool (cash register), responsible for asset swaps, discount calculations, and transaction processing.
For different user needs, the Factory creates dedicated LP Accounts (delivery service), which wait until all purchases are complete before making a single, efficient delivery to the user, ensuring smoother and more streamlined transactions.
Whether deploying new liquidity pools or LP Accounts, the Factory swiftly allocates and deploys resources, keeping the Torch system running smoothly and ensuring seamless coordination between components.