vPoolManager
Helper contract for building and accessing VirtuSwap Virtual Pools
Last updated
Helper contract for building and accessing VirtuSwap Virtual Pools
Last updated
Returns a Virtual Pool constructed from a given Active Pool and a given Reference Pool. If a Virtual Pool pool cannot be constructed from the given pair of pools, an error occurs.
See for details on how Virtual Pools are constructed.
Parameters:
jkPair
address
Address of the Active Pool
ikPair
address
Address of the Reference Pool
Returns all Virtual Pools that are available between two given tokens.
Parameters:
token0
address
First token
token1
address
Second token
Parameters:
vPool
VirtualPoolModel
The Virtual Pool to be updated
balance0
uint256
Balance of asset0 in the Virtual Pool
balance1
uint256
Balance of asset1 in the Virtual Pool
See for details on how Virtual Pools are constructed.
Returns the instance.
Updates balances of a Virtual Pool. This function is called by swapNativeToReserve
and swapReserveToNative
methods of the contract after a trade is executed using the Virtual Pool. The goal is to make Virtual Pool behave exactly like a regular AMM pool would, i.e. that every trade immediately effects the liquidity of the pool.