What is an LP Token?
LP tokens are often distributed by DeFi protocols upon depositing into them and represent a claim to underlying asset(s).
LP tokens, like Basic tokens, conform to the ERC20 standard and are composed of other LP tokens, Basic tokens, or Native tokens. Some of these include:
- Pool tokens (e.g. Curve LP like the 3CRV (DAI/USDT/USDC) pool )
- Vault (Yield aggregator) tokens (e.g. Yearn yvTokens like the yvWBTC vault),
- Lending tokens (e.g. Aave aTokens like aDAI or Compound cTokens like cDAI),
- Liquid staking derivatives (LSDs) (e.g. Lido stETH)
- Yield tokens (e.g. Convex cvxCRV)
The Portals API facilitates swapping among these types of tokens seamlessly without exiting or unwrapping them into Basic or Native tokens first via Portals
Any token that is not categorized as a Native or Basic by the Portals API is considered an LP token. LP tokens have a unique Platform associated with them.
Properties of an LP Token
The object shown below is an example of a response for an LP token returned by the the Portals API.
|A unique key identifying this token|
|The formatted name of the token|
|The number of decimal places the token uses|
|The symbol of the token|
|An array of images representing this token and it's underlying tokens|
|The current USD price of the token|
|The current USD market cap of the token|
|APY and volume metrics for the token|
|An array of underlying tokens belonging to this token. See below for more details|
|The platform the token belongs to|
|The address of the token|
|The address of the pool that is associated with the token|
|An object containing the addresses of the token on other networks|
|The network this token exists on|
|The date and time of the last update for this token|
liquidityprop refers to the USD value of the pool's reserves (i.e the
priceof the underlying token * the quantity of the underlying token in the pool).
imagesprop includes the
platform'simage at index 0 and it's underling tokens beginning at index 1
poolAddressprop may be returned in cases where the
addressprop is different from the pool's address (e.g. some Curve pools). If a
poolAddressdoes not exist, this prop is undefined.
metricsobject may be empty if APY and/or volume data is not available for the token.