Structures

Data Structures used in VirtuSwap DEX contracts

VirtualPoolModel

struct VirtualPoolModel {
    uint24 fee;
    address token0;
    address token1;
    uint256 balance0;
    uint256 balance1;
    address commonToken;
    address jkPair;
    address ikPair;
}

A structure representing a virtual pool.

Contains the following members:

  • fee - the fee in the Reference Pool

  • token0 - the token that can be sold to the virtual pool

  • token1 - the token that can be bought from the virtual pool

  • balance0, balance1 - the balances of the two tokens in the virtual pool

  • commonToken - the token that is common between the Active Pool and the Reference Pool that construct the Virtual Pool

  • jkPair - address of the Active Pool

  • ikPair - address of the Reference Pool

The structure is returned from vPoolManager.getVirtualPool and vPoolManager.getVirtualPools methods

See Virtual Pools for more detail on VirtuSwap Virtual Pools.

Last updated