Vault Optimization
For both gas efficiency and security reasons, Blizzard pools are created not by deploying individual pool contracts, but rather by instantiating hardcoded structs within the vault contract. As such, there is much lower overhead (i.e. no cross-contract calls required) to execute a swap. The core swap flow is detailed below:
flowchart TB subgraph Users u1(Alice) u2(Bob) end subgraph vc[Vault Contract] direction BT v[(User Balance Store)] p1{{Pool}} p2{{Pool}} end u1 --> |Conduct Swap| vc u2 --> |Conduct Withdraw| vc p1 -.- |Check price| v p2 -.- |Check price| v p1 --> |Routed Swap| p2 v --> |Update balance| v