diff --git a/docs/apis/4-api-syntax.md b/docs/apis/4-api-syntax.md index b97b99d..4d59960 100644 --- a/docs/apis/4-api-syntax.md +++ b/docs/apis/4-api-syntax.md @@ -16,7 +16,7 @@ You input wallet addresses and get all the following: - Detailed breakdown of all app investment positions represented as app tokens owned by the wallet, such as Aave lending positions or Uniswap pools, valued in USD - Detailed breakdown of all app investment positions represented as contract positions that are not held on the wallet, such ve-locked or farming positions, valued in USD -On Zapper's frontend, all tokens that show up in the *Wallet* section of a portfoilo are returned in the [`v2/balances/tokens`](https://docs.zapper.xyz/docs/apis/api-syntax#v2balancestokens) endpoint. All values showing up in the *Apps* section of a portfolio are returned in the `v2/balances/apps` endpoint. +On Zapper's frontend, all tokens that show up in the *Wallet* section of a portfolio are returned in the [`v2/balances/tokens`](https://docs.zapper.xyz/docs/apis/api-syntax#v2balancestokens) endpoint. All values showing up in the *Apps* section of a portfolio are returned in the `v2/balances/apps` endpoint. For a list of all supported apps, see [this link](https://zapper.xyz/protocols). @@ -53,7 +53,7 @@ Parameters - `addresses[]`: **Required** | Addresses for which to retrieve balances, inputted as an array. Can handle up to 15 addresses - Note: to pass multiple addresses in, the right syntax is `https://api.zapper.xyz/v2/balances/apps?addresses%5B%5D=address_1&addresses%5B%5D=address_2` -- `networks[]`: networks for which to retrieve balances, inputted an array. Available values : ethereum, polygon, optimism, gnosis, binance-smart-chain, fantom, avalanche, arbitrum, celo, moonriver, bitcoin, aurora +- `networks[]`: networks for which to retrieve balances, inputted an array. Available values: ethereum, polygon, optimism, gnosis, binance-smart-chain, fantom, avalanche, arbitrum, celo, moonriver, bitcoin, aurora Response @@ -77,7 +77,7 @@ Response - `dataProps`: object containing data used for augmenting the token object with additional data properties. These properties can be used in other places in the application. This would include APY, liquidity in the positions, etc. [More details found here](https://docs.zapper.xyz/docs/concepts/app-tokens#what-are-data-props) - `displayProps`: object is used by Zapper Web and Zapper Mobile to render meaningful information to Zapper users about this token. This generally would include labels and decorators. [More details can be found here](https://docs.zapper.xyz/docs/concepts/app-tokens#what-are-display-props) - `balance`: balance of investment positioned owned by this wallet. Normalized for decimals - - `balanceRaw`: raw balance of investment in this postiion owned by this wallet. This has not been normalized with decimals yet; to get balanceRaw, you'd multiply this value by 10 ^ (decimals) value + - `balanceRaw`: raw balance of investment in this position owned by this wallet. This has not been normalized with decimals yet; to get balanceRaw, you'd multiply this value by 10 ^ (decimals) value - `balanceUSD`: value of `balance` position, converted to USD - `meta`: Information about balances that is not specifically balances. This value is developer defined, but examples are health factors and collateralization ratios (c-ratios) @@ -563,7 +563,7 @@ Response for GET You input wallet addresses and get all "base tokens" in the wallet. "Base tokens" are ERC20 tokens that are not invested by the user in an app, but instead sit in the wallet natively. Base tokens are often liquid and tradable, whereas app tokens are those invested in apps are illiquid and cannot be natively traded, like a Uniswap pool token. -On Zapper's frontend, all tokens that show up in the *Wallet* section of a portfoilo are returned in the `v2/balances/tokens` endpoint. All values showing up in the *Apps* section of a portfolio are returned in the [`v2/balances/apps`](https://docs.zapper.xyz/docs/apis/api-syntax#v2balancesapps) endpoint. +On Zapper's frontend, all tokens that show up in the *Wallet* section of a portfolio are returned in the `v2/balances/tokens` endpoint. All values showing up in the *Apps* section of a portfolio are returned in the [`v2/balances/apps`](https://docs.zapper.xyz/docs/apis/api-syntax#v2balancesapps) endpoint. Zapper supports over 15,000 base tokens (and counting). @@ -581,7 +581,7 @@ Points Cost For `v2/balances/tokens` Related Queries: Tips On Using This Endpoint Cost-Effectively: -- If you are querying a wallet for the first time, and it is a potentially popular wallet, there is a chance that a cached value already exists, and you can retrie it for only 0.25 points cost. Upon getting the results, you can check how stale the balances are based on the value retuend of `updatedAt` +- If you are querying a wallet for the first time, and it is a potentially popular wallet, there is a chance that a cached value already exists, and you can retrie it for only 0.25 points cost. Upon getting the results, you can check how stale the balances are based on the value returned of `updatedAt` - If you are certain you will want the most up-to-date balances for the wallet, you should call the POST [`v2/balances/apps`](https://docs.zapper.xyz/docs/apis/api-syntax#v2balancesapps) endpoint first, wait for the job to run after 10s, and then call GET [`v2/balances/apps`](https://docs.zapper.xyz/docs/apis/api-syntax#v2balancesapps) - If you are surfacing balances to users in real-time using this call, you can emulate what Zapper's frontend does by first calling GET [`v2/balances/apps`](https://docs.zapper.xyz/docs/apis/api-syntax#v2balancesapps) to get any cached balances, use these to create a skeleton to display to the user, and then call POST [`v2/balances/apps`](https://docs.zapper.xyz/docs/apis/api-syntax#v2balancesapps) to then refresh any stale values @@ -599,7 +599,7 @@ Parameters - `addresses[]`: **Required** | addresses for which to retrieve balances, inputted as an array. Can handle up to 15 addresses - Note: to pass multiple addresses in, the right syntax is `https://api.zapper.xyz/v2/balances/tokens?addresses%5B%5D=address_1&addresses%5B%5D=address_2` -- `networks[]`: networks for which to retrieve balances, inputted an array. Available values : ethereum, polygon, optimism, gnosis, binance-smart-chain, fantom, avalanche, arbitrum, celo, moonriver, bitcoin, aurora +- `networks[]`: networks for which to retrieve balances, inputted an array. Available values: ethereum, polygon, optimism, gnosis, binance-smart-chain, fantom, avalanche, arbitrum, celo, moonriver, bitcoin, aurora Response @@ -629,7 +629,7 @@ Response - `holdersEnabled`: internal designation as to whether Zapper index's the holders of this token - `marketCap`: estimated value of all the tradeable tokens - `balance`: balance of investment positioned owned by this wallet. Normalized for decimals - - `balanceRaw`: raw balance of investment in this postiion owned by this wallet. This has not been normalized with decimals yet; to get balanceRaw, you'd multiply this value by 10 ^ (decimals) value + - `balanceRaw`: raw balance of investment in this position owned by this wallet. This has not been normalized with decimals yet; to get balanceRaw, you'd multiply this value by 10 ^ (decimals) value - `balanceUSD`: value of `balance` position, converted to USD cURL for POST @@ -703,7 +703,7 @@ Use this endpoint to poll for the status of a job that is calculating app-relate When you call POST [`v2/balances/apps`](https://docs.zapper.xyz/docs/apis/api-syntax#v2balancesapps) or [`v2/balances/tokens`](https://docs.zapper.xyz/docs/apis/api-syntax#v2balancestokens), a re-calculation of the balances in that wallet is triggered, and the response to those calls will be a value `jobId`. You can then monitor the status of the re-computation job by passing `jobId` as a parameter into this endpoint, `v2/balances/job-status`. :::info -You are not required to poll for the status of the job via `v2/balances/job-status`; it is just a nice-to-have. Most POST [`v2/balances/apps`](https://docs.zapper.xyz/docs/apis/api-syntax#v2balancesapps) finish computing wihtin 10 seconds and POST [`v2/balances/tokens`](https://docs.zapper.xyz/docs/apis/api-syntax#v2balancestokens) finish within 2 seconds, so you could just insert a delay between your POST and GET commands of that time interval. +You are not required to poll for the status of the job via `v2/balances/job-status`; it is just a nice-to-have. Most POST [`v2/balances/apps`](https://docs.zapper.xyz/docs/apis/api-syntax#v2balancesapps) finish computing within 10 seconds and POST [`v2/balances/tokens`](https://docs.zapper.xyz/docs/apis/api-syntax#v2balancestokens) finish within 2 seconds, so you could just insert a delay between your POST and GET commands of that time interval. ::: Other things to know about this endpoint @@ -2472,7 +2472,7 @@ Parameters Returns -- `balance`: number of NFTs owned of a given type. If it's ERC_721, it will always be 1. If NFT is is ERC_1155, will be a count of how many NFTs are owned by this wallet +- `balance`: number of NFTs owned of a given type. If it's ERC_721, it will always be 1. If NFT is ERC_1155, will be a count of how many NFTs are owned by this wallet - `token`: contains details relating to this NFT, such as price and metadata - `id`: internal Zapper ID number for token - `name`: name of NFT @@ -2575,7 +2575,7 @@ Parameters Returns - `token`: object containing details about the individual NFT - - `balance`: number of NFTs owned of a given type. If it's ERC_721, it will always be 1. If NFT is is ERC_1155, will be a count of how many NFTs are owned by this wallet + - `balance`: number of NFTs owned of a given type. If it's ERC_721, it will always be 1. If NFT is ERC_1155, will be a count of how many NFTs are owned by this wallet - `name`: name of NFT - `tokenId`: ID of token within collection - `lastSaleEth`: price of last sale of this NFT @@ -2916,7 +2916,7 @@ Parameters Returns - `price`: Price of the sell token -- `value`: Token value assouciated with price +- `value`: Token value associated with price - `gas`: Gas limit of the transaction - `estimatedGas`: Gas required for the transaction - `gasPrice`: Gas price at the time of transaction @@ -3010,7 +3010,7 @@ Returns - `buyAmount`: Total quantity of buy token - `sellAmount`: Total quantity of sell token - `allowanceTarget`: Token address of token that is approved to sell -- `sources`: sources of liqudiity +- `sources`: sources of liquidity - `name`: source of swap route - `proportion`: proportion of tokens swapped by this source - `displayName`: display name of source diff --git a/docs/event-interpretation/event-interpretation.md b/docs/event-interpretation/event-interpretation.md index 7421004..cba01b8 100644 --- a/docs/event-interpretation/event-interpretation.md +++ b/docs/event-interpretation/event-interpretation.md @@ -63,12 +63,12 @@ For a lot of transactions, it can be a bit tricky to understand exactly what the However, if you're feeling adventurous, you can source popular, uninterpreted transactions from the [Curate page.](https://zapper.xyz/curate/events) --The `method` name is usually helpful in pointing you towards what action is taken. If the method name is `deposit`, its likely the user sent tokens away and deposited them in an app. HOWEVER, methods can also be misleading, so do not blindly trust them! Most smart contracts are forks of other contracts, where the devs copy the contract, and tweak it for their needs, but do not update the method names. This can lead to situations where a `withdraw` function is really a `claim` function, or a `deposit` is really `locked funds for 2 years`. Zapper's goal is to accurately and clearly describe the blockchain, so please do be aware of this in your submissions! +-The `method` name is usually helpful in pointing you towards what action is taken. If the method name is `deposit`, its likely the user sent tokens away and deposited them in an app. HOWEVER, methods can also be misleading, so do not blindly trust them! Most smart contracts are forks of other contracts, where the devs copy the contract, and tweak it for their needs, but do not update the method names. This can lead to situations where a `withdraw` function is really a `claim` function, or a `deposit` is really `locked funds for 2 years`. Zapper's goal is to accurately and clearly describe the blockchain, so please be aware of this in your submissions! -- It often helps to look up what app a contract in a transaction is associated with. If you find that the contract relates to Aave, its a good chance the methods relating to supplying and withdrawing funds from a lending protocol. The best way to find out what app an contract belongs to is to Google the TO address +- It often helps to look up what app a contract in a transaction is associated with. If you find that the contract relates to Aave, its a good chance the methods relating to supplying and withdrawing funds from a lending protocol. The best way to find out what app a contract belongs to is to Google the TO address ![Check out the search results and look for a link to an app's docs that includes the contract address](../../static/img/assets/google-contract.png) -- If that fails, another good way to investigate what app owns a contract is to search it on Github, and look if it is in an app's Github repository (or of anther app has added it and labelled it in their repo). Example search query: +- If that fails, another good way to investigate what app owns a contract is to search it on Github, and look if it is in an app's Github repository (or if another app has added it and labeled it in their repo). Example search query: ![Looks like this contract is in the scroll-tech repo, and is associated with Scroll chain on Defi Llama](../../static/img/assets/github-contract-lookup.png) ## Submission process diff --git a/docs/event-interpretation/inventives-round-one-event-interpretation.md b/docs/event-interpretation/inventives-round-one-event-interpretation.md index 94050e4..402001f 100644 --- a/docs/event-interpretation/inventives-round-one-event-interpretation.md +++ b/docs/event-interpretation/inventives-round-one-event-interpretation.md @@ -21,6 +21,6 @@ Curious what an "event interpretation" is, or how to submit one? [Check out our - 2 points are awarded for an event interpretation on the [Arbitrum](https://zapper.xyz/curate/events?trendingNetwork=arbitrum) or [Optimism](https://zapper.xyz/curate/events?trendingNetwork=optimism) networks. - 1 point awarded for event interpretations on [Ethereum](https://zapper.xyz/curate/events) and [Base](https://zapper.xyz/curate/events?trendingNetwork=base) networks. - Points will only be awarded for event interpretations *approved* by the Zapper team. When an event interpretation is approved, you will receive a notification. You can check the status of your submissions on your [My Submissions page](https://zapper.xyz/my-submissions). -- Spam submissions will not be approved; users who spam submissions run the risk fo being disqualified +- Spam submissions will not be approved; users who spam submissions run the risk of being disqualified - Only 1 submission per method per contract can be approved across all users. If we get multiple submissions for the same contract and method, we approve the earliest submission we received, and sadly have to reject the later ones. - The team may take a few days to work through the submissions made during the Round 1 time frame; your submission does not need to be approved by the end date of Round 1 to count towards your points total