Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Uniswap V3 Price Feed #101

Merged
merged 35 commits into from
Oct 25, 2023
Merged

Add Uniswap V3 Price Feed #101

merged 35 commits into from
Oct 25, 2023

Commits on Mar 11, 2023

  1. Configuration menu
    Copy the full SHA
    ecb9fd1 View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2023

  1. Configuration menu
    Copy the full SHA
    65ee8ad View commit details
    Browse the repository at this point in the history
  2. feat(protocol): set UniswapV3Pool feed description dynamically in con…

    …structor
    
    perf(protocol): add minor gas optimizations to UniswapV3Pool
    feat(protocol): add "IUniswapV3PriceFeed__RefAssetNotInPool" error in UniswapV3PriceFeed.sol
    refactor(protocol): add UniswapV3PriceFeed interface
    docs(protocol): add missing "@inheritdoc" tags in UniswapV3PriceFeed.sol
    refactor(protocol): rename "getNormalizedPriceInternal" function into "getPriceInternal"
    scorpion9979 committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    e01b183 View commit details
    Browse the repository at this point in the history
  3. chore(protocol): add deployment script for UniswapV3PriceFeed

    chore(protocol): re-generate types
    scorpion9979 committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    f550472 View commit details
    Browse the repository at this point in the history
  4. chore(protocol): add missing uniswapV3PriceFeed import in "packages/p…

    …rotocol/tasks/deploy/index.ts"
    scorpion9979 committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    2ab3a07 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2023

  1. fix(protocol): loss of precision issue in "getPriceInternal" function

    chore(protocol): re-generate types
    scorpion9979 committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    70cec57 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2023

  1. feat(protocol): handle math edge cases in "getPriceInternal"

    perf(protocol): remove "basePrice" memory var from "getPriceInternal" function
    perf(protocol): use "1 << 192" instead of "2**192" for gas savings
    refactor(protocol): rename "normalizedPrice" to "price" in "getPriceInternal" function
    scorpion9979 committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    39c9ce1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    24993e3 View commit details
    Browse the repository at this point in the history
  3. perf(protocol): remove superfluous "mTwapInterval" memory var from "g…

    …etPriceInternal" function
    scorpion9979 committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    895f652 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2023

  1. test(protocol): setup unit tests for UniswapV3PriceFeed

    test(protocol): add UniswapV3PriceFeed deployer
    test(protocol): add UniswapV3PriceFeed fixture
    test(protocol): add UniswapV3Pool mock
    test(protocol): test "description" function in UniswapV3PriceFeed
    test(protocol): test "pool" function in UniswapV3PriceFeed
    test(protocol): test "refAsset" function in UniswapV3PriceFeed
    test(protocol): test "twapInterval" function in UniswapV3PriceFeed
    chore(protocol): re-generate types
    scorpion9979 committed Mar 16, 2023
    Configuration menu
    Copy the full SHA
    fb5eeb4 View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2023

  1. test(protocol): test "getRoundData" function in UniswapV3PriceFeed

    test(protocol): test "latestRoundData" function in UniswapV3PriceFeed
    scorpion9979 committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    9397f43 View commit details
    Browse the repository at this point in the history
  2. test(protocol): test "decimals" function in UniswapV3PriceFeed

    test(protocol): test "version" function in UniswapV3PriceFeed
    scorpion9979 committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    6ba8822 View commit details
    Browse the repository at this point in the history
  3. fix(protocol): handle missed edge case in "getPriceInternal" function

    test(protocol): add more unit tests for "getRoundData" and "latestRoundData" functions
    chore(protocol): re-generate types
    scorpion9979 committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    0157f02 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2023

  1. test(protocol): add GodModeUniswapV3PriceFeed test contract to modify…

    … immutable vars
    
    test(protocol): update unit tests to integrate GodModeUniswapV3PriceFeed
    chore(protocol): re-generate types
    scorpion9979 committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    9a99929 View commit details
    Browse the repository at this point in the history
  2. test(protocol): add "calculateTick" and "tickToTokenPrices" to mirror…

    …s.ts
    
    build(protocol): add "@uniswap/v3-sdk" dev dep
    feat(constants): add Uniswap V3 constants
    test(protocol): update unit tests for "getRoundData" function to reflect added mirrors
    test(protocol): update unit tests for "latestRoundData" function to reflect added mirrors
    chore(protocol): re-generate types
    scorpion9979 committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    35aa406 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2023

  1. refactor(protocol): re-implement "description" as a view function

    perf(protocol): add token{0,1} as immutable variables
    refactor(protocol): switch token{0,1}Decimals to uint8
    test(protocol): test both branches of "description" function in UniswapV3PriceFeed
    test(protocol): make UniswapV3PriceFeed unit tests more descriptive
    refactor(constants): rename "uniswap-v3.ts" to "oracles.ts"
    chore(protocol): re-generate types
    scorpion9979 committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    e5ac32e View commit details
    Browse the repository at this point in the history
  2. chore(protocol): add custom compiler settings for UniswapV3PriceFeed.sol

    chore(protocol): re-generate types
    scorpion9979 committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    baf1a9f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ac2aa67 View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2023

  1. Configuration menu
    Copy the full SHA
    9a1f6f2 View commit details
    Browse the repository at this point in the history
  2. chore(protocol): update solidity version to 0.8.4 in IUniswapV3Pool.s…

    …ol and related interfaces
    
    chore(protocol): disable solhint linter rules for "external" contract files
    scorpion9979 committed Mar 31, 2023
    Configuration menu
    Copy the full SHA
    98162ed View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2023

  1. feat(protocol): validate TWAP criteria in UniswapV3PriceFeed constructor

    feat(protocol): check provided pool address is not zero in UniswapV3PriceFeed constructor
    refactor(protocol): clean up IUniswapV3Pool
    scorpion9979 committed Apr 21, 2023
    Configuration menu
    Copy the full SHA
    9afe525 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    952add3 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2023

  1. test(protocol): fix "unitFixtureUniswapV3PriceFeed" test fixture

    chore(protocol): re-generate types
    scorpion9979 committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    1cc8b55 View commit details
    Browse the repository at this point in the history
  2. test(protocol): constructor in UniswapV3PriceFeed

    feat(errors): add oracle errors
    feat(constants): add "CARDINALITY" constant
    scorpion9979 committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    68a7c04 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2023

  1. Configuration menu
    Copy the full SHA
    c68636a View commit details
    Browse the repository at this point in the history
  2. feat(protocol): add "MINIMUM_CARDINALITY" constant in UniswapV3PriceFeed

    chore(protocol): re-generate types
    scorpion9979 committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    da7421e View commit details
    Browse the repository at this point in the history
  3. feat(protocol): add "baseAsset" state var to UniswapV3PriceFeed

    test(protocol): add unit test for "baseAsset"
    chore(protocol): re-generate types
    scorpion9979 committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    e391250 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2023

  1. refactor(protocol): rename "refAsset" to "quoteAsset" in UniswapV3Pri…

    …ceFeed
    
    chore(protocol): re-generate types
    scorpion9979 committed Apr 28, 2023
    Configuration menu
    Copy the full SHA
    80d6e1c View commit details
    Browse the repository at this point in the history
  2. fix(protocol): bug in TWAP interval calculation in UniswapV3PriceFeed…

    … constructor
    
    test(protocol): fix UniswapV3PriceFeed tests
    chore(protocol): re-generate types
    scorpion9979 committed Apr 28, 2023
    Configuration menu
    Copy the full SHA
    8bf1767 View commit details
    Browse the repository at this point in the history
  3. feat(protocol): remove redundant IUniswapV3PriceFeed__ZeroAddressPool…

    … error
    
    test(protocol): update UniswapV3PriceFeed tests
    chore(protocol): re-generate types
    scorpion9979 committed Apr 28, 2023
    Configuration menu
    Copy the full SHA
    3148fad View commit details
    Browse the repository at this point in the history
  4. docs(protocol): improve comments in UniswapV3PriceFeed

    test(protocol): remove unused import
    scorpion9979 committed Apr 28, 2023
    Configuration menu
    Copy the full SHA
    d3f88f9 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2023

  1. feat(protocol): calculate minimum cardinality instead of using const …

    …value
    
    docs(protocol): add comments to UniswapV3PriceFeed constructor
    feat(constants): change default oracle params to 30-minute TWAP
    refactor(constants): rename "CARDINALITY" to "DEFAULT_CARDINALITY"
    scorpion9979 committed Oct 11, 2023
    Configuration menu
    Copy the full SHA
    f0a7e0d View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2023

  1. feat(protocol): add a max price bound in UniswapV3PriceFeed

    feat(errors): add MAX_PRICE_LESS_THAN_OR_EQUAL_TO_ZERO
    test(protocol): add "setMaxPrice" unit test
    chore(protocol): re-generate types
    scorpion9979 committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    785636a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8d65cae View commit details
    Browse the repository at this point in the history
  3. feat(protocol): use "cardinalityNext" for TWAP criteria logic instead…

    … of "cardinality"
    
    chore(protocol): re-generate types
    scorpion9979 committed Oct 12, 2023
    Configuration menu
    Copy the full SHA
    6a01de9 View commit details
    Browse the repository at this point in the history