Architecture Overview
Singleton structure for all kinds of interactions
Last updated
Singleton structure for all kinds of interactions
Last updated
For any kind of write function, the only thing you should be interacting with is 'Vault'.
Unlike previous solidly forks, there is no separate gauge address for each pool.
The structure of the Volatile pool (Constant product MM) and Stable pool (Wombat pool) is slightly different.
The pool (LP token) is the gauge for volatile pools.
Like an oridinary uniswap factories, volatile pool LP tokens are deployed from one factory contract(ConstantProductPoolFactory). LP tokens are themselves ERC20 and Gauge contract.
However, it's important to keep in mind that in Velocore, all tokens are stored in the Vault contract and the rest of the contracts only perform computations. The staking operations for LP tokens are done through gauge, but the tokens themselves are moved to the Vault contract to be staked.
There is an LP contract (ERC-1155), and a gauge contract is deployed for each token corresponding to each #Id. You should use pool address for swap operation and gauge address for stake operation.
Unlike volatile pools, wombat pool doesn't have a factory. Each LP is ERC-1155 and deployed one by one. Instead, they are registered to Register contract(WombatRegistry) as a list for easy tracking.
There can be any number of tokens that make up a Wombat pool, and they are given incremental id in ERC-1155 standard.