Skip to main content

State

Queries the state of a VLP contract.

query Vlp($contract: String!) {
vlp(contract: $contract) {
state {
pair {
token_1
token_2
}
router
vcoin
fee {
lp_fee_bps
euclid_fee_bps
recipient {
chain_uid
address
}
}
last_updated
total_lp_tokens
admin
}
}
}

Example

curl --request POST \
--header 'content-type: application/json' \
--url 'https://api.euclidprotocol.com/graphql' \
--data '{"query":"query Vlp($contract: String!) {\n vlp(contract: $contract) {\n state {\n pair {\n token_1\n token_2\n }\n router\n vcoin\n fee {\n lp_fee_bps\n euclid_fee_bps\n recipient {\n chain_uid\n address\n }\n }\n last_updated\n total_lp_tokens\n admin\n }\n }\n}","variables":{"contract":"nibi1m4ns69zvkk2zv0946mw298tlky5ckvu08rtxggtg29p784kc5sxqa9u8ly"}}'

Open in Playground

Arguments

  • contract (String!): The contract address of the VLP to query.

Return Fields

FieldTypeDescription
pairPairThe token pair of the VLP.
routerStringThe router contract address used by the VLP.
vcoinStringThe contract address of the Virtual Balance contract used by the VLP.
feeFeeThe fee structure of the VLP.
last_updatedStringThe timestamp of the last update to the VLP state.
total_lp_tokensUint128The total amount of LP tokens in the VLP.
adminStringThe admin address of the VLP.

Fee

pub struct Fee {
pub lp_fee_bps: u64,
pub euclid_fee_bps: u64,
pub recipient: CrossChainUser,
}

NameTypeDescription
lp_fee_bpsu64Fee for liquidity providers, in basis points. Can be set to a maximum of 10%.
euclid_fee_bpsu64Fee for Euclid treasury, distributed among stakers and other Euclid-related rewards, in basis points e. 1 = 0.01% 10000 = 100%. Can be set to a maximum of 10%.
recipientCrossChainUserThe recipient for the fee. Can be an address on any chain.