11// SPDX-License-Identifier: AGPL-3.0-only
2- pragma solidity 0.8.13 ;
2+ pragma solidity 0.8.19 ;
33
4- import "./PortfolioLib.sol " ;
4+ import "./libraries/ PortfolioLib.sol " ;
55import "./interfaces/IERC20.sol " ;
66import "./interfaces/IPortfolio.sol " ;
77import "./interfaces/IPortfolioRegistry.sol " ;
@@ -23,17 +23,6 @@ abstract contract Objective is IPortfolio {
2323 bool sellAsset
2424 ) internal virtual returns (bool success , int256 invariant );
2525
26- /**
27- * @dev Conditional check made before changing `pool.liquidity` and `position.freeLiquidity`.
28- * @param delta Signed quantity of liquidity in WAD units to change liquidity by.
29- * @return True if position liquidity can be changed by `delta` amount.
30- */
31- function checkPosition (
32- uint64 poolId ,
33- address owner ,
34- int256 delta
35- ) public view virtual returns (bool );
36-
3726 /**
3827 * @dev Conditional check before interacting with a pool.
3928 * @return True if pool exists and is ready to be interacted with.
@@ -74,14 +63,12 @@ abstract contract Objective is IPortfolio {
7463 uint256 price
7564 ) public view virtual returns (uint256 reserveX , uint256 reserveY );
7665
77- /**
78- * @dev Computes an amount of tokens out given an amount in, units are in the token's decimals.
79- * @param amountIn Quantity to swap in, in native decimals.
80- */
66+ /// @inheritdoc IPortfolioGetters
8167 function getAmountOut (
8268 uint64 poolId ,
8369 bool sellAsset ,
8470 uint256 amountIn ,
71+ int256 liquidityDelta ,
8572 address swapper
8673 )
8774 public
@@ -90,13 +77,8 @@ abstract contract Objective is IPortfolio {
9077 override (IPortfolioGetters)
9178 returns (uint256 output );
9279
93- /**
94- * @dev
95- * WARNING! Do not rely on this price value. This CAN be manipulated. It is also an estimate that has error.
96- * Estimates the `price` of a pool with `poolId` given the pool's reserves.
97- * @return price Estimated quantity of "Quote" tokens per "Asset" tokens in WAD units.
98- */
99- function getVirtualPrice (uint64 poolId )
80+ /// @inheritdoc IPortfolioGetters
81+ function getSpotPrice (uint64 poolId )
10082 public
10183 view
10284 virtual
0 commit comments