Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Protocol Information
Pairs created can be gathered by indexing this topic from a factory contract:
Summary of Integration
Provide a brief overview of your integration:
Implementation Details
Execution Functions Required
Functions Implemented
get_amount_out()
get_amount_in()
get_apy()
get_tvl()
Dynamic States Required for AMM Calculations
token0_balance
- Obtained fromBrownFiVNPair.token0().balanceOf(address(BrownFiVNPair))
token1_balance
- Obtained fromBrownFiVNPair.token1().balanceOf(address(BrownFiVNPair))
price0
- Obtained fromBrownFiV2Factory.priceOf(token0, min_price_age)
where min_price_age is mostly 60 and/or obtainable fromBrownFiV2Factory.minPriceAge()
price1
- Obtained fromBrownFiV2Factory.priceOf(token1, min_price_age)
where min_price_age is mostly 60 and/or obtainable fromBrownFiV2Factory.minPriceAge()
k
- Obtained fromBrownFiVNPair.k()
lambda
- Obtained fromBrownFiVNPair.lambda()
fee
- Obtained fromBrownFiVNPair.fee()
reserve0
- Obtained fromBrownFiVNPair.getReserves()[0]
reserve1
- Obtained fromBrownFiVNPair.getReserves()[1]
total_supply
- Obtained fromBrownFiVNPair.totalSupply()
liquidity
- Obtained fromBrownFiVNPair.balanceOf(address(BrownFiVNPair))
fees_over_period
amount0
- token0 accrued as fees in the span of N daysamount1
- token1 accrued as fees in the span of N daysdays
- N days spanStatic States Required for AMM Calculations
token0_address
- Obtained fromBrownFiVNPair.token0()
token1_address
- Obtained fromBrownFiVNPair.token1()
lp_token_address
- Obtained fromaddress(BrownFiVNPair)
Dependencies
N/A
Other Requirements
Test Results
Click to view test results