interface IBondingCurve {
	/// @notice Lets `msg.sender` buy tokens (ANGLE tokens normally) against an allowed token (a stablecoin normally)
	/// @param _agToken Reference to the agToken used, that is the stablecoin used to buy the token associated to this
	/// bonding curve
	/// @param maxAmountToPayInAgToken Maximum amount to pay in agTokens that the user is willing to pay to buy the
	/// `targetSoldTokenQuantity`
	function buySoldToken(
		IAgToken _agToken,
		uint256 targetSoldTokenQuantity,
		uint256 maxAmountToPayInAgToken
	) external;

	/// @dev More generally than the expression used, the value of the price is:
	/// `startPrice/(1-tokensSoldInTx/tokensToSellInTotal)^power` with `power = 2`
	/// @dev The precision of this function is not that important as it is a view function anyone can query
	/// @notice Returns the current price of the token (expressed in reference)
	function getCurrentPrice() external view returns (uint256);

	/// @return The quantity of governance tokens that are still to be sold
	function getQuantityLeftToSell() external view returns (uint256);

	/// @param targetQuantity Quantity of ANGLE tokens to buy
	/// @dev This is an utility function that can be queried before buying tokens
	/// @return The amount to pay for the desired amount of ANGLE to buy
	function computePriceFromQuantity(uint256 targetQuantity) external view returns (uint256);
}
/// @notice Interface for the `BondingCurve` contract
/// @dev This contract allows people to buy ANGLE governance tokens using the protocol's stablecoins
/// @dev It is with high certainty not going to be distributed directly at launch
function buySoldToken(
	IAgToken _agToken,
	uint256 targetSoldTokenQuantity,
	uint256 maxAmountToPayInAgToken
) external;

/// @notice Lets `msg.sender` buy tokens (ANGLE tokens normally) against an allowed token (a stablecoin normally)
/// @param _agToken Reference to the agToken used, that is the stablecoin used to buy the token associated to this
/// bonding curve
/// @param maxAmountToPayInAgToken Maximum amount to pay in agTokens that the user is willing to pay to buy the
/// `targetSoldTokenQuantity`