Skip to content

Commit

Permalink
v4 docs: UI enhancements, broken links, lowercase letters fixes and c…
Browse files Browse the repository at this point in the history
…ontent updates (#854)

Co-authored-by: Roman Brodetski <Roman.Brodetski@gmail.com>
  • Loading branch information
ocandocrypto and RomanBrodetski authored Jan 22, 2025
1 parent 1816330 commit 3e35d4a
Show file tree
Hide file tree
Showing 38 changed files with 292 additions and 145 deletions.
6 changes: 3 additions & 3 deletions docs/api/subgraph/guides/subgraph-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 3

# Subgraph Query Examples

This doc will teach you how to query Uniswap V3 analytics by writing GraphQL queries on the subgraph. You can fetch data points like :
This doc will teach you how to query Uniswap v3 analytics by writing GraphQL queries on the subgraph. You can fetch data points like :

- [collected fees for a position](#general-position-data)
- [current liquidity](#pool-data) of a pool
Expand All @@ -16,7 +16,7 @@ and much more. Below are some example queries. To run a query copy and paste it

## Global Data

Global data refers to data points about the Uniswap v3 protocol as a whole. Some examples of global data points are total value locked in the protocol, total pools deployed, or total transaction counts. Thus, to query global data you must pass in the Uniswap V3 Factory address `0x1F98431c8aD98523631AE4a59f267346ea31F984` and select the desired fields. Reference the full [factory schema](https://github.com/Uniswap/v3-subgraph/blob/main/schema.graphql#L1) to see all possible fields.
Global data refers to data points about the Uniswap v3 protocol as a whole. Some examples of global data points are total value locked in the protocol, total pools deployed, or total transaction counts. Thus, to query global data you must pass in the Uniswap v3 Factory address `0x1F98431c8aD98523631AE4a59f267346ea31F984` and select the desired fields. Reference the full [factory schema](https://github.com/Uniswap/v3-subgraph/blob/main/schema.graphql#L1) to see all possible fields.

### Current Global Data

Expand Down Expand Up @@ -226,7 +226,7 @@ swaps(orderBy: timestamp, orderDirection: desc, where:

## Token Data

Input the the token contract address to fetch token data. Any token that exists in at least one Uniswap V3 pool can be queried. The output will aggregate data across all v3 pools that include the token.
Input the the token contract address to fetch token data. Any token that exists in at least one Uniswap v3 pool can be queried. The output will aggregate data across all v3 pools that include the token.

### General Token Data

Expand Down
2 changes: 1 addition & 1 deletion docs/api/subgraph/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Each version of Uniswap has its own dedicated subgraph, and governance contracts

Each subgraph has a dedicated endpoint for querying data, as well as a page on [The Graph explorer](https://thegraph.com/explorer) that exposes the schema and available fields to query.

##### V3 (Mainnet)
##### v3 (Mainnet)

- [Subgraph](https://thegraph.com/explorer/subgraphs/5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV?view=Query&chain=arbitrum-one)
- Graphql Endpoint: `https://gateway.thegraph.com/api/<YOUR_API_KEY_HERE>/subgraphs/id/5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: changelog
title: Changelog
hidden: true
---

| Date | Abstract | Transaction | Sybil Reference |
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ Digital assets that are stored in a Uniswap pool contract, and are able to be tr

## Mid Price

The price between the available buy and sell prices. In Uniswap V1 and V2, this is the ratio of the two ERC20 token reserves. In V3, this is the ratio of the two ERC20 token reserves available within the current active tick.
The price between the available buy and sell prices. In Uniswap v1 and v2, this is the ratio of the two ERC20 token reserves. In V3, this is the ratio of the two ERC20 token reserves available within the current active tick.

## Observation

An instance of historical price and liquidity data of a given pair.

## Pair

A smart contract deployed from a Uniswap V1 or V2 factory contract that enables trading between two ERC20 tokens. Pair contracts are now called Pools in V3.
A smart contract deployed from a Uniswap v1 or v2 factory contract that enables trading between two ERC20 tokens. Pair contracts are now called Pools in v3.

## Periphery

Expand Down
4 changes: 4 additions & 0 deletions docs/concepts/governance/01-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ title: Overview

[`governance`](https://github.com/Uniswap/governance)

<!--
## Documentation
For reference material on the Uniswap Governance system please see [Governance Reference](../../../contracts/v3/reference/governance/overview.md).
-->

## UNI Address

`UNI` is deployed at `0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984` on the Ethereum [mainnet](https://etherscan.io/address/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984), and the [Ropsten](https://ropsten.etherscan.io/address/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984), [Rinkeby](https://rinkeby.etherscan.io/address/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984), [Görli](https://goerli.etherscan.io/address/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984), and [Kovan](https://kovan.etherscan.io/address/0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984) testnets. It was built from commit [ab22c08](https://github.com/Uniswap/governance/commit/ab22c084bacb2636a1aebf9759890063eb6e4946).
Expand Down
26 changes: 4 additions & 22 deletions docs/concepts/governance/02-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Uniswap Governance takes place in several venues. Each serves its own particular

A Discourse-hosted forum for governance-related discussion. Community members must register for an account before sharing or liking posts. New members must read 4 topics and a combined 15 posts over the course of at least 10 minutes before they may post themselves.

2. [_Snapshot_](https://snapshot.org/#/uniswapgovernance.eth)
2. [_Snapshot_](https://snapshot.box/#/s:uniswapgovernance.eth)

A simple voting interface that allows users to signal sentiment off-chain. Votes on Snapshot are weighted by the number of UNI delegated to the address used to vote.

Expand Down Expand Up @@ -42,7 +42,7 @@ _Timeframe_: 5 days

_Quorum_: 10M UNI

_Form_: [Snapshot Poll](https://snapshot.org/#/uniswapgovernance.eth)
_Form_: [Snapshot Poll](https://snapshot.box/#/s:uniswapgovernance.eth)

The purpose of the Temperature Check is to signal community sentiment on a proposal prior to moving towards an onchain vote.

Expand All @@ -52,7 +52,7 @@ To create a Temperature Check:

2. Create and post this version of the proposal in the [Governance Forum](https://gov.uniswap.org/) with the title “Temperature Check — [Your Title Here]”. Include a link to the RFC post. You will update the post to include a link to the Snapshot poll after you’ve posted that.

3. Create a [Snapshot poll](https://snapshot.org/#/uniswap). The voting options should consist of those which have gained support in the RFC Phase. This poll can be either binary or multiple choice but must include a `No change` option. Set the poll duration to 5 days. Include a link to the Forum Temperature Check post.
3. Create a [Snapshot poll](https://snapshot.box/#/s:uniswapgovernance.eth). The voting options should consist of those which have gained support in the RFC Phase. This poll can be either binary or multiple choice but must include a `No change` option. Set the poll duration to 5 days. Include a link to the Forum Temperature Check post.

4. Update the Forum post with a link to the Snapshot Poll.

Expand Down Expand Up @@ -90,26 +90,8 @@ Timeframe: 7 days

_Quorum_: 40M UNI

Form: [Snapshot Poll](https://snapshot.org/#/uniswap)
Form: [Snapshot Poll](https://snapshot.box/#/s:uniswapgovernance.eth)

In the future, the community governance process above may need to undergo additional changes to continue to meet the needs of the Uniswap community. While an onchain vote is not required to change the majority of this process, a clear display of community support and acceptance is important for process changes to have legitimacy.

Thus, changes to all off-chain community governance processes should be voted on through an off-chain Snapshot vote. There should be a 7-day voting period and 40M UNI quorum.

## Governance Glossary

- **UNI:** An ERC-20 token that designates the weight of a user's voting rights. The more UNI a user has in their wallet, the more weight their delegation or vote on a proposal holds.

- **Delegation:** UNI holders cannot vote or create proposals until they delegate their voting rights to an address. A UNI holder can delegate to one address at a time, including their own address. Note that delegation does not lock tokens; it simply adds votes to the chosen delegation address.

- **Proposal:** A proposal is executable code that modifies the governance contract or treasury and how they work. To create a proposal, a user must have at least 0.10% (1M UNI) of all UNI delegated to their address. Proposals are stored in the "proposals" mapping of the Governor smart contract. All proposals are subject to a ~7-day voting period. If the proposer does not maintain their vote weight balance throughout the voting period, anyone may cancel the proposal.

- **Threshold:** The amount of UNI that must be delegated to an address to take a given action. Currently, the only action with a threshold is posting an onchain vote.

- **Quorum:** In order for a vote to pass, 4% of all UNI (40M) must vote in favor. Votes against and abstentions do not count towards a quorum. The purpose of the quorum is to ensure that the only measures that pass have adequate voter participation.

- **Voting:** Users can vote for or against single proposals once they have voting rights delegated to their address. Votes can be cast while a proposal is in the "Active" state. Votes can be submitted immediately using "castVote" or submitted later with "castVoteBySig" (For more info on castVoteBySig and offline signatures, see EIP-712). If the majority of votes (and a 4% quorum of UNI) vote for a proposal, the proposal may be queued in the Timelock.

- **Voting Period:** Once a proposal has been created, Uniswap community members will have a seven day period (the Voting Period) to cast their votes.

- **Timelock:** All governance proposals must sit in the Timelock for a minimum of 2 days, after which they can be executed.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/concepts/protocol/range-orders.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Customizable liquidity positions, along with single-sided asset provisioning, al

In typical order book markets, anyone can easily set a limit order: to buy or sell an asset at a specific predetermined price, allowing the order to be filled at an indeterminate time in the future.

With Uniswap V3, one can approximate a limit order by providing a single asset as liquidity within a specific range. Like traditional limit orders, range orders may be set with the expectation they will execute at some point in the future, with the target asset available for withdrawal after the spot price has crossed the full range of the order.
With Uniswap v3, one can approximate a limit order by providing a single asset as liquidity within a specific range. Like traditional limit orders, range orders may be set with the expectation they will execute at some point in the future, with the target asset available for withdrawal after the spot price has crossed the full range of the order.

Unlike some markets where limit orders may incur fees, the range order maker generates fees while the order is filled. This is due to the range order technically being a form of liquidity provisioning rather than a typical swap.

Expand All @@ -32,7 +32,7 @@ The nature of AMM design makes some styles of limit orders possible, while other

> The Current price of a DAI / ETH pool is 1,500 DAI / ETH. You expect that ETH will rebound after it drops to 1,000 at the next market downturn, so you would like to place a range order swapping DAI to ETH at the price of 1,000 DAI / ETH. This is possible, as the price space below the spot price is denominated in the lower-priced asset, DAI. You can provide DAI at the price of 1,000 DAI / ETH, which will be swapped for ETH when the spot price of ETH drops past 1,000 DAI / ETH.
As the above examples show, in Uniswap V3, the two paired assets in a given pool are separated above and below the spot price, with the higher price asset available above the spot price and the lower-priced asset below.
As the above examples show, in Uniswap v3, the two paired assets in a given pool are separated above and below the spot price, with the higher price asset available above the spot price and the lower-priced asset below.

The following examples show limit order styles that are unable to be replicated due to the separation of assets in price space.

Expand Down
Loading

0 comments on commit 3e35d4a

Please sign in to comment.