Smart Contracts
Deployed Contracts (Polygon)
Contract
Address
Purpose
Tokens
Token
Address
Decimals
VAMMManager
Interface
interface IVAMMManager {
// Pool Management
function createPool(
PoolKey memory key,
IAprOracle aprOracle,
uint160 sqrtPriceX96
) external returns (int24 tick, bytes32 poolId);
function poolExists(PoolKey memory key) external view returns (bool exists);
// Trading
function swap(
PoolKey memory key,
SwapParams calldata params
) external returns (
int256 fixedTokenDelta,
int256 variableTokenDelta,
uint256 cumulativeFeeIncurred,
int256 fixedTokenDeltaUnbalanced,
uint256 positionMarginRequirement
);
// Liquidity
function mint(
PoolKey memory key,
AccountId calldata account,
int24 tickLower,
int24 tickUpper,
uint128 amount
) external returns (uint256 positionMarginRequirement);
function burn(
PoolKey memory key,
AccountId calldata account,
int24 tickLower,
int24 tickUpper,
uint128 amount
) external returns (uint256 positionMarginRequirement);
// View Functions
function getVAMMState(bytes32 poolId)
external view returns (int24 tick, uint160 sqrtPriceX96);
function computeGrowthInside(
bytes32 poolId,
int24 tickLower,
int24 tickUpper
) external view returns (
int256 fixedTokenGrowthInsideX128,
int256 variableTokenGrowthInsideX128,
uint256 feeGrowthInsideX128
);
}Data Structures
Events
CollateralEngine
Interface
Data Structures
Events
OracleHub
Interface
AprOracle
Interface
ABIs
Minimal ABIs for Integration
Source Code
Next Steps
Last updated