Skip to content

Commit

Permalink
fix: aggregate contract and concept docs updates (#518)
Browse files Browse the repository at this point in the history
  • Loading branch information
adjkant authored Dec 7, 2022
1 parent 5865cfc commit 2129b01
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 12 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ yarn-error.log*
package-lock.json

# For analytics testing
*.tgz
*.tgz

# VSCode
.vscode/
2 changes: 1 addition & 1 deletion docs/concepts/governance/02-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ To create a Governance Proposal:

1. Call the propose() function of the Governor Bravo to deploy your proposal.

Once the propose() function has been called, a seven day voting period will start. Ongoing discussion can take place in the gov.uniswap.org forum. If the proposal passes successfully, a two day timelock will follow before the proposed code is executed.
Once the propose() function has been called, a two day voting delay will start. After voting delay is finished a seven day voting period begins. Ongoing discussion can take place in the gov.uniswap.org forum. If the proposal passes successfully, a two day timelock will follow before the proposed code is executed.

## Soft governance

Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/protocol/concentrated-liquidity.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ As the price of an asset rises or falls, it may exit the price bounds that LPs h

As price moves in one direction, LPs gain more of the one asset as swappers demand the other, until their entire liquidity consists of only one asset. (In v2, we don't typically see this behavior because LPs rarely reach the upper or lower bound of the price of two assets, i.e., 0 and ∞). If the price ever reenters the interval, the liquidity becomes active again, and in-range LPs begin earning fees once more.

Importantly, LPs are free to create as many positions as they see fit, each with its own price interval. Concentrated liquidity serves as a mechanism to let the market decide what a sensible distribution of liquidity is, as rational LPs are incentivized to concentrate their liquidity while ensuring that their liquidity remains active.
Importantly, LPs are free to create as many positions as they see fit, each with its own price interval. Concentrated liquidity serves as a mechanism to let the market decide what a sensible distribution of liquidity is, as rational LPs are incentivize to concentrate their liquidity while ensuring that their liquidity remains active.

## Ticks

To achieve concentrated liquidity, the once continuous spectrum of price space has been partitioned with ticks.

Ticks are the boundaries between discrete areas in price space. Ticks are spaced such that an increase or decrease of 1 tick represents a 0.01% (1 basis point) increase or decrease in price at any point in price space.
Ticks are the boundaries between discrete areas in price space. Ticks are spaced such that an increase or decrease of 1 tick represents a 0.01% increase or decrease in price at any point in price space.

Ticks function as boundaries for liquidity positions. When a position is created, the provider must choose the lower and upper tick that will represent their position's borders.

Expand Down
2 changes: 1 addition & 1 deletion docs/contracts/v1/guides/03-trade-tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ For buy orders \(exact output\), the cost \(input\) is calculated:

```javascript
// Buy TokenB with ETH
const outputAmountB = userInputEthValue
const outputAmountB = userInputTokenBValue
const inputReserveB = web3.eth.getBalance(exchangeAddressB)
const outputReserveB = tokenContractB.methods.balanceOf(exchangeAddressB).call()

Expand Down
4 changes: 2 additions & 2 deletions docs/contracts/v3/guides/local-environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ contract SimpleSwap {
// Approve the router to spend WETH9.
TransferHelper.safeApprove(WETH9, address(swapRouter), amountIn);
// Note: To use this example, you should explicitly set slippage limits, omitting for simplicity
const minOut = /* Calculate min output */ 0;
const priceLimit = /* Calculate price limit */ 0;
uint256 minOut = /* Calculate min output */ 0;
uint160 priceLimit = /* Calculate price limit */ 0;
// Create the params that will be used to execute the swap
ISwapRouter.ExactInputSingleParams memory params =
ISwapRouter.ExactInputSingleParams({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,22 @@ a method does not exist, i.e. the pool is assumed to be initialized.

```solidity
function tokenURI(
uint256 tokenId
) public view returns (string)
```

Returns a URI describing a particular token ID

#### Parameters:

| Name | Type | Description |
| :-------- | :------ | :------------------------------------------------------- |
| `tokenId` | uint256 | The ID of the token that represents the minted position |

#### Return Values:

A base64 string with the URI data.

### baseURI

```solidity
Expand Down
12 changes: 7 additions & 5 deletions docs/contracts/v3/reference/periphery/libraries/OracleLibrary.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Provides functions to integrate with V3 pool oracle
function consult(
address pool,
uint32 period
) internal view returns (int24 timeWeightedAverageTick)
) internal view returns (int24 arithmeticMeanTick, uint128 harmonicMeanLiquidity)
```

Fetches time-weighted average tick using Uniswap V3 oracle
Calculates time-weighted means of tick and liquidity for a given Uniswap V3 pool

#### Parameters:

Expand All @@ -22,9 +22,11 @@ Fetches time-weighted average tick using Uniswap V3 oracle

#### Return Values:

| Name | Type | Description |
| :------------------------ | :------ | :-------------------------------------------------------------------------------- |
| `timeWeightedAverageTick` | int24 | The time-weighted average tick from (block.timestamp - period) to block.timestamp |
| Name | Type | Description |
| :------------------------ | :------ | :--------------------------------------------------------------------------------- |
| `arithmeticMeanTick` | int24 | The arithmetic mean tick from (block.timestamp - secondsAgo) to block.timestamp |
| `harmonicMeanLiquidity` | uint128 | The harmonic mean liquidity from (block.timestamp - secondsAgo) to block.timestamp |


### getQuoteAtTick

Expand Down

1 comment on commit 2129b01

@vercel
Copy link

@vercel vercel bot commented on 2129b01 Dec 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./

docs-git-main-uniswap.vercel.app
docs-uniswap.vercel.app
docs.uniswap.org

Please sign in to comment.