LP Tokens
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
tip
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.
Prop | Example | Description |
---|---|---|
key | "ethereum:0x117a0bab81f25e60900787d98061ccfae023560c" | A unique key identifying this token |
name | "Curve.fi FRAX/USDC Convex Deposit" | The formatted name of the token |
decimals | 18 | The number of decimal places the token uses |
symbol | "cvxcrvFRAX" | The symbol of the token |
images | ["https://assets.coingecko.com/coins/images/15585/large/convex.png", "..."] | An array of images representing this token and it's underlying tokens |
price | 1.0011709453684463 | The current USD price of the token |
liquidity | 681822400.2612257 | The current USD market cap of the token |
metrics | {"apy": 2.09039, "volumeUsd1d":..., "volumeUsd7d":...} | APY and volume metrics for the token |
tokens | ["0x3175df0976dfa876431c2e9ee6bc45b65d3473cc"] | An array of underlying tokens belonging to this token. See below for more details |
platform | "convex" | The platform the token belongs to |
address | "0x117a0bab81f25e60900787d98061ccfae023560c" | The address of the token |
poolAddress | "0x117a0bab81f25e60900787d98061ccfae023560c" | The address of the pool that is associated with the token |
addresses | {"ethereum": "0x117a0bab81f25e60900787d98061ccfae023560c"} | An object containing the addresses of the token on other networks |
network | "ethereum" | The network this token exists on |
updatedAt | "2022-10-21T10:39:30.243Z" | The date and time of the last update for this token |
Additional considerations
- The
liquidity
prop refers to the USD value of the pool's reserves (i.e theprice
of the underlying token * the quantity of the underlying token in the pool). - The
images
prop includes theplatform's
image at index 0 and it's underling tokens beginning at index 1 - A
poolAddress
prop may be returned in cases where theaddress
prop is different from the pool's address (e.g. some Curve pools). If apoolAddress
does not exist, this prop is undefined. - The
metrics
object may be empty if APY and/or volume data is not available for the token.