KLAYswap
English
Search…
⌃K

Store

This contract has price information that reflects the amount and time weight of the tokens held by the LP. The priceACumulativeLast and priceBCumulativeLast you have are TWCP (Time-Weighted Cumulative Price), which is time weighted price information. The quantity and price information of this contract will be used in Price Oracle.

Address

Read-Only Functions

Events
Read-Only Functions

Events

Sync
event Sync(address pool, uint112 reserveA, uint112 reserveB);
  • Emitted each time reserves are updated.
  • Parameters
    • pool : Pool contract address of target pool
    • reserveA : TokenA liquidity amount
    • reserveB : TokenB liquidity amount

Read-Only Functions

reserveA
function reserveA(address pool) public view returns (uint112 _reserveA)
  • Amount of TokenA held by LP
reserveB
function reserveB(address pool) public view returns (uint112 _reserveB)
  • Amount of TokenB held by LP
priceACumulativeLast
function priceACumulativeLast(address pool) public view returns (uint112 _priceA)
  • Time-Weighted Cumulative Price of TokenA held by LP
priceBCumulativeLast
function priceBCumulativeLast(address pool) public view returns (uint112 _priceB)
  • Time-Weighted Cumulative Price of TokenB held by LP
getReserves
function getReserves(address pool) public view returns (uint112 _reserveA, uint112 _reserveB, uint32 _blockTimestampLast)
  • Amount of held by LP and TWCP information
  • Parameter
    • _reserveA : Amount of tokenA held by LP
    • _reserveB : Amount of tokenB held by LP
    • _blockTimestampLast : BlockTime at which LP was last calculated