From a719723b21991cd44a5c0fe34272ee19b08e31e6 Mon Sep 17 00:00:00 2001 From: Ivan Zhelyazkov Date: Wed, 15 Nov 2023 18:24:07 +0200 Subject: [PATCH 01/10] carbon pol eth conversion - contracts --- contracts/pol/CarbonPOL.sol | 166 +++++++++++++++++++++--- contracts/pol/interfaces/ICarbonPOL.sol | 34 ++++- 2 files changed, 178 insertions(+), 22 deletions(-) diff --git a/contracts/pol/CarbonPOL.sol b/contracts/pol/CarbonPOL.sol index 6f3f3b90..161137a0 100644 --- a/contracts/pol/CarbonPOL.sol +++ b/contracts/pol/CarbonPOL.sol @@ -8,7 +8,7 @@ import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; import { IVersioned } from "../utility/interfaces/IVersioned.sol"; import { ICarbonPOL } from "./interfaces/ICarbonPOL.sol"; import { Upgradeable } from "../utility/Upgradeable.sol"; -import { Token } from "../token/Token.sol"; +import { Token, NATIVE_TOKEN } from "../token/Token.sol"; import { Utils } from "../utility/Utils.sol"; import { MathEx } from "../utility/MathEx.sol"; import { ExpDecayMath } from "../utility/ExpDecayMath.sol"; @@ -21,6 +21,9 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils using Address for address payable; using SafeCast for uint256; + // bnt token address + Token private immutable _bnt; + // initial starting price multiplier for the dutch auction uint32 private _marketPriceMultiply; @@ -33,13 +36,17 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils // token to initial price mapping mapping(Token token => Price initialPrice) private _initialPrice; + // initial and current eth sale amount - for ETH->BNT trades + EthSaleAmount private _ethSaleAmount; + // upgrade forward-compatibility storage gap - uint256[MAX_GAP - 3] private __gap; + uint256[MAX_GAP - 4] private __gap; /** * @dev used to initialize the implementation */ - constructor() { + constructor(Token bntInit) { + _bnt = bntInit; // initialize implementation initialize(); } @@ -71,6 +78,8 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils _setMarketPriceMultiply(2); // set price decay half-life to 10 days _setPriceDecayHalfLife(10 days); + // set initial eth sale amount to 100 eth + _setEthSaleAmount(100 ether); } /** @@ -98,7 +107,7 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils * @inheritdoc Upgradeable */ function version() public pure override(IVersioned, Upgradeable) returns (uint16) { - return 1; + return 2; } /** @@ -128,18 +137,47 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils } /** - * @notice enable trading for a token and set the initial price + * @notice sets the eth sale amount + * + * requirements: + * + * - the caller must be the admin of the contract + */ + function setEthSaleAmount(uint128 newEthSaleAmount) external onlyAdmin greaterThanZero(newEthSaleAmount) { + _setEthSaleAmount(newEthSaleAmount); + } + + /** + * @notice enable trading for TKN->ETH and set the initial price * * requirements: * * - the caller must be the admin of the contract + * - can only enable trading for non-native tokens */ function enableTrading(Token token, Price memory price) external onlyAdmin validPrice(price) { + if (token == NATIVE_TOKEN) { + revert InvalidToken(); + } _tradingStartTimes[token] = uint32(block.timestamp); _initialPrice[token] = price; emit TradingEnabled(token, price); } + /** + * @notice enable trading for ETH->BNT and set the initial price + * + * requirements: + * + * - the caller must be the admin of the contract + */ + function enableTradingETH(Price memory price) external onlyAdmin validPrice(price) { + _tradingStartTimes[NATIVE_TOKEN] = uint32(block.timestamp); + _initialPrice[NATIVE_TOKEN] = price; + _ethSaleAmount.current = _ethSaleAmount.initial; + emit TradingEnabled(NATIVE_TOKEN, price); + } + /** * @inheritdoc ICarbonPOL */ @@ -154,6 +192,20 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils return _priceDecayHalfLife; } + /** + * @inheritdoc ICarbonPOL + */ + function ethSaleAmount() external view returns (uint128) { + return _ethSaleAmount.initial; + } + + /** + * @inheritdoc ICarbonPOL + */ + function currentEthSaleAmount() external view returns (uint128) { + return _ethSaleAmount.current; + } + /** * @inheritdoc ICarbonPOL */ @@ -170,8 +222,10 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils _validPrice(currentPrice); // multiply the token amount by the eth amount / total eth amount ratio to get the actual tokens received uint128 tokenAmount = MathEx.mulDivF(currentPrice.tokenAmount, ethAmount, currentPrice.ethAmount).toUint128(); + // check available balance + uint128 amountToCheck = token == NATIVE_TOKEN ? ethAmount : tokenAmount; // revert if not enough token balance - if (tokenAmount > token.balanceOf(address(this))) { + if (amountToCheck > token.balanceOf(address(this))) { revert InsufficientTokenBalance(); } return tokenAmount; @@ -182,14 +236,19 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils */ function expectedTradeInput(Token token, uint128 tokenAmount) public view validToken(token) returns (uint128) { // revert if not enough token balance for trade - if (tokenAmount > token.balanceOf(address(this))) { + if (token != NATIVE_TOKEN && tokenAmount > token.balanceOf(address(this))) { revert InsufficientTokenBalance(); } Price memory currentPrice = tokenPrice(token); // revert if current price is not valid _validPrice(currentPrice); // multiply the eth amount by the token amount / total token amount ratio to get the actual eth to send - return MathEx.mulDivF(currentPrice.ethAmount, tokenAmount, currentPrice.tokenAmount).toUint128(); + uint128 ethAmount = MathEx.mulDivF(currentPrice.ethAmount, tokenAmount, currentPrice.tokenAmount).toUint128(); + // check if enough token balance + if (token == NATIVE_TOKEN && ethAmount > token.balanceOf(address(this))) { + revert InsufficientTokenBalance(); + } + return ethAmount; } /** @@ -202,14 +261,22 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils if (tradingStartTime == 0) { revert TradingDisabled(); } - // get initial price as set by enableTrading - Price memory price = _initialPrice[token]; - // calculate the actual price by multiplying the eth amount by the factor - price.ethAmount *= _marketPriceMultiply; // get time elapsed since trading was enabled uint32 timeElapsed = uint32(block.timestamp) - tradingStartTime; - // get the current price by adjusting the eth amount with the exp decay formula - price.ethAmount = ExpDecayMath.calcExpDecay(price.ethAmount, timeElapsed, _priceDecayHalfLife).toUint128(); + // get initial price as set by enableTrading + Price memory price = _initialPrice[token]; + // get the price token or eth amount for applying the exp decay formula to + uint128 amount = token == NATIVE_TOKEN ? price.tokenAmount : price.ethAmount; + // calculate the actual price by multiplying the amount by the factor + amount *= _marketPriceMultiply; + // get the current price by adjusting the amount with the exp decay formula + amount = ExpDecayMath.calcExpDecay(amount, timeElapsed, _priceDecayHalfLife).toUint128(); + // update the price + if (token == NATIVE_TOKEN) { + price.tokenAmount = amount; + } else { + price.ethAmount = amount; + } // return the price return price; } @@ -221,6 +288,16 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils Token token, uint128 amount ) external payable nonReentrant validToken(token) greaterThanZero(amount) { + uint128 ethAmount; + if (token == NATIVE_TOKEN) { + ethAmount = _sellETHForBNT(amount); + } else { + ethAmount = _sellTokenForETH(token, amount); + } + emit TokenTraded(msg.sender, token, amount, ethAmount); + } + + function _sellTokenForETH(Token token, uint128 amount) private returns (uint128) { uint128 ethRequired = expectedTradeInput(token, amount); // revert if trade requires 0 eth if (ethRequired == 0) { @@ -238,8 +315,40 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils payable(msg.sender).sendValue(msg.value - ethRequired); } - // emit event - emit TokenTraded(msg.sender, token, amount, ethRequired); + return ethRequired; + } + + function _sellETHForBNT(uint128 amount) private returns (uint128) { + uint128 ethAmountRequired = expectedTradeInput(NATIVE_TOKEN, amount); + if (_ethSaleAmount.current < ethAmountRequired) { + revert InsufficientEthForSale(); + } + // revert if trade requires 0 eth + if (ethAmountRequired == 0) { + revert InvalidTrade(); + } + // transfer the tokens from the user + _bnt.safeTransferFrom(msg.sender, address(this), amount); + + // transfer the eth to the user + payable(msg.sender).sendValue(ethAmountRequired); + + // update the available eth sale amount + _ethSaleAmount.current -= ethAmountRequired; + + // check if below 10% of the initial eth sale amount + if (_ethSaleAmount.current < _ethSaleAmount.initial / 10) { + // top up the eth sale amount + _ethSaleAmount.current = _ethSaleAmount.initial; + // reset the price to double the current one + Price memory price = tokenPrice(NATIVE_TOKEN); + price.tokenAmount *= _marketPriceMultiply; + _initialPrice[NATIVE_TOKEN] = price; + // emit price updated event + emit PriceUpdated(NATIVE_TOKEN, price); + } + + return ethAmountRequired; } /** @@ -274,14 +383,31 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils emit PriceDecayHalfLifeUpdated(prevPriceDecayHalfLife, newPriceDecayHalfLife); } + /** + * @dev set eth sale amount helper + */ + function _setEthSaleAmount(uint128 newEthSaleAmount) private { + uint128 prevEthSaleAmount = _ethSaleAmount.initial; + + // return if the eth sale amount is the same + if (prevEthSaleAmount == newEthSaleAmount) { + return; + } + + _ethSaleAmount.initial = newEthSaleAmount; + + // check if the new sale amount is below the current available eth sale amount + if (newEthSaleAmount < _ethSaleAmount.current) { + _ethSaleAmount.current = newEthSaleAmount; + } + + emit EthSaleAmountUpdated(prevEthSaleAmount, newEthSaleAmount); + } + /** * @dev validate token helper */ function _validToken(Token token) private view { - // validate token is not the native token - if (token.isNative()) { - revert InvalidToken(); - } // validate trading is enabled for token if (!_tradingEnabled(token)) { revert TradingDisabled(); diff --git a/contracts/pol/interfaces/ICarbonPOL.sol b/contracts/pol/interfaces/ICarbonPOL.sol index 6e79bf5a..c62d556c 100644 --- a/contracts/pol/interfaces/ICarbonPOL.sol +++ b/contracts/pol/interfaces/ICarbonPOL.sol @@ -14,22 +14,33 @@ interface ICarbonPOL is IUpgradeable { error TradingDisabled(); error InsufficientNativeTokenSent(); error InsufficientTokenBalance(); + error InsufficientEthForSale(); struct Price { uint128 ethAmount; uint128 tokenAmount; } + struct EthSaleAmount { + uint128 initial; + uint128 current; + } + /** * @notice triggered when trading is enabled for a token */ event TradingEnabled(Token indexed token, Price price); /** - * @notice triggered after a successful trade is executed + * @notice triggered after a successful trade TKN->ETH or ETH->BNT is executed */ event TokenTraded(address indexed caller, Token indexed token, uint128 amount, uint128 ethReceived); + /** + * @notice triggered after an eth sale leaves less than 10% of the initial eth sale amount + */ + event PriceUpdated(Token indexed token, Price price); + /** * @notice triggered when the market price multiplier is updated */ @@ -40,6 +51,11 @@ interface ICarbonPOL is IUpgradeable { */ event PriceDecayHalfLifeUpdated(uint32 prevPriceDecayHalfLife, uint32 newPriceDecayHalfLife); + /** + * @notice triggered when the eth sale amount is updated + */ + event EthSaleAmountUpdated(uint128 prevEthSaleAmount, uint128 newEthSaleAmount); + /** * @notice returns the market price multiplier */ @@ -50,6 +66,16 @@ interface ICarbonPOL is IUpgradeable { */ function priceDecayHalfLife() external view returns (uint32); + /** + * @notice returns the initial eth sale amount + */ + function ethSaleAmount() external view returns (uint128); + + /** + * @notice returns the current eth sale amount + */ + function currentEthSaleAmount() external view returns (uint128); + /** * @notice returns true if trading is enabled for token */ @@ -57,21 +83,25 @@ interface ICarbonPOL is IUpgradeable { /** * @notice returns the expected trade output (tokens received) given an eth amount sent for a token + * @notice if token == ETH, return how much bnt will be sent given an eth amount received */ function expectedTradeReturn(Token token, uint128 ethAmount) external view returns (uint128 tokenAmount); /** - * @notice returns the expected trade input (how much eth to send) given an token amount received + * @notice returns the expected trade input (how much eth to send) given a token amount received + * @notice if token == ETH, return how much eth will be received given a bnt amount sent */ function expectedTradeInput(Token token, uint128 tokenAmount) external view returns (uint128 ethAmount); /** * @notice returns the current token price (ETH / TKN) + * @notice if token == ETH, returns ETH / BNT price */ function tokenPrice(Token token) external view returns (Price memory price); /** * @notice trades ETH for *amount* of token based on the current token price (trade by target amount) + * @notice if token == ETH, trades *amount* of ETH for BNT based on the current token price (trade by source amount) */ function trade(Token token, uint128 amount) external payable; } From 3cd359e073197244c50fa0e8de63e969fc02f3f3 Mon Sep 17 00:00:00 2001 From: Ivan Zhelyazkov Date: Wed, 15 Nov 2023 18:24:47 +0200 Subject: [PATCH 02/10] carbon pol eth conversion - tests --- test/forge/CarbonPOL.t.sol | 691 +++- test/forge/POLTestCaseParser.t.sol | 7 +- test/forge/TestFixture.t.sol | 4 +- test/helpers/data/polPricingTestDataEth.json | 3084 ++++++++++++++++++ 4 files changed, 3743 insertions(+), 43 deletions(-) create mode 100644 test/helpers/data/polPricingTestDataEth.json diff --git a/test/forge/CarbonPOL.t.sol b/test/forge/CarbonPOL.t.sol index c73c72ca..b1c3ac6f 100644 --- a/test/forge/CarbonPOL.t.sol +++ b/test/forge/CarbonPOL.t.sol @@ -7,7 +7,6 @@ import { TestFixture } from "./TestFixture.t.sol"; import { POLTestCaseParser } from "./POLTestCaseParser.t.sol"; import { AccessDenied, ZeroValue } from "../../contracts/utility/Utils.sol"; -import { ExpDecayMath } from "../../contracts/utility/ExpDecayMath.sol"; import { Token, NATIVE_TOKEN } from "../../contracts/token/Token.sol"; import { TestReenterCarbonPOL } from "../../contracts/helpers/TestReenterCarbonPOL.sol"; @@ -25,6 +24,9 @@ contract CarbonPOLTest is TestFixture { uint32 private constant PRICE_DECAY_HALFLIFE_DEFAULT = 10 days; uint32 private constant PRICE_DECAY_HALFLIFE_UPDATED = 15 days; + uint128 private constant ETH_SALE_AMOUNT_DEFAULT = 100 ether; + uint128 private constant ETH_SALE_AMOUNT_UPDATED = 150 ether; + // Events /** @@ -37,6 +39,11 @@ contract CarbonPOLTest is TestFixture { */ event TokenTraded(address indexed caller, Token indexed token, uint128 amount, uint128 ethReceived); + /** + * @notice triggered after an eth sale leaves less than 10% of the initial eth sale amount + */ + event PriceUpdated(Token indexed token, ICarbonPOL.Price price); + /** * @notice triggered when the market price multiplier is updated */ @@ -47,6 +54,11 @@ contract CarbonPOLTest is TestFixture { */ event PriceDecayHalfLifeUpdated(uint32 prevPriceDecayHalfLife, uint32 newPriceDecayHalfLife); + /** + * @notice triggered when the eth sale amount is updated + */ + event EthSaleAmountUpdated(uint128 prevEthSaleAmount, uint128 newEthSaleAmount); + /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. @@ -69,7 +81,7 @@ contract CarbonPOLTest is TestFixture { function testShouldBeInitialized() public { uint16 version = carbonPOL.version(); - assertEq(version, 1); + assertEq(version, 2); } function testShouldntBeAbleToReinitialize() public { @@ -130,7 +142,7 @@ contract CarbonPOLTest is TestFixture { } /// @dev test that setPriceDecayHalfLife should revert when a setting to an invalid value - function testShouldRevertSettingTheRewardsPPMWithAnInvalidFee() public { + function testShouldRevertSettingThePriceDecayHalfLifeWithAnInvalidFee() public { vm.prank(admin); vm.expectRevert(ZeroValue.selector); carbonPOL.setPriceDecayHalfLife(0); @@ -159,6 +171,72 @@ contract CarbonPOLTest is TestFixture { vm.stopPrank(); } + /** + * @dev eth sale amount tests + */ + + /// @dev test that setEthSaleAmount should revert when a non admin calls it + function testShouldRevertWhenNonAdminAttemptsToSetTheEthSaleAmount() public { + vm.prank(user1); + vm.expectRevert(AccessDenied.selector); + carbonPOL.setEthSaleAmount(ETH_SALE_AMOUNT_UPDATED); + } + + /// @dev test that setEthSaleAmount should revert when setting to an invalid value + function testShouldRevertSettingTheEthSaleAmountWithAnInvalidFee() public { + vm.prank(admin); + vm.expectRevert(ZeroValue.selector); + carbonPOL.setEthSaleAmount(0); + } + + /// @dev test that setEthSaleAmount with the same value should be ignored + function testFailShouldIgnoreSettingTheSameEthSaleAmount() public { + vm.prank(admin); + vm.expectEmit(false, false, false, false); + emit EthSaleAmountUpdated(ETH_SALE_AMOUNT_DEFAULT, ETH_SALE_AMOUNT_DEFAULT); + carbonPOL.setEthSaleAmount(ETH_SALE_AMOUNT_DEFAULT); + } + + /// @dev test that admin should be able to update the eth sale amount + function testShouldBeAbleToSetAndUpdateTheEthSaleAmount() public { + vm.startPrank(admin); + uint128 ethSaleAmount = carbonPOL.ethSaleAmount(); + assertEq(ethSaleAmount, ETH_SALE_AMOUNT_DEFAULT); + + vm.expectEmit(); + emit EthSaleAmountUpdated(ETH_SALE_AMOUNT_DEFAULT, ETH_SALE_AMOUNT_UPDATED); + carbonPOL.setEthSaleAmount(ETH_SALE_AMOUNT_UPDATED); + + ethSaleAmount = carbonPOL.ethSaleAmount(); + assertEq(ethSaleAmount, ETH_SALE_AMOUNT_UPDATED); + vm.stopPrank(); + } + + /// @dev test that setting the eth sale amount to an amount below the current eth sale amount reset the current amount + function testCurrentEthSaleAmountIsUpdatedWhenAboveTheNewEthSaleAmount() public { + vm.startPrank(admin); + uint128 ethSaleAmount = carbonPOL.ethSaleAmount(); + assertEq(ethSaleAmount, ETH_SALE_AMOUNT_DEFAULT); + + // enable trading to set the current eth sale amount + ICarbonPOL.Price memory price = ICarbonPOL.Price({ ethAmount: 100, tokenAmount: 10000 }); + carbonPOL.enableTradingETH(price); + + // assert current and max amounts are equal + uint128 currentEthSaleAmount = carbonPOL.currentEthSaleAmount(); + assertEq(currentEthSaleAmount, ethSaleAmount); + + // set the new amount to amount / 2 + uint128 newSaleAmount = ETH_SALE_AMOUNT_DEFAULT / 2; + carbonPOL.setEthSaleAmount(newSaleAmount); + + // assert both amounts are updated + ethSaleAmount = carbonPOL.ethSaleAmount(); + currentEthSaleAmount = carbonPOL.currentEthSaleAmount(); + assertEq(ethSaleAmount, currentEthSaleAmount); + vm.stopPrank(); + } + /** * @dev trading tests */ @@ -166,9 +244,9 @@ contract CarbonPOLTest is TestFixture { /// @dev test trading should be disabled initially for all tokens function testTradingShouldBeDisabledInitially(uint256 i) public { // pick one of these tokens to test - Token[3] memory tokens = [token1, token2, bnt]; + Token[4] memory tokens = [token1, token2, bnt, NATIVE_TOKEN]; // pick a random number from 0 to 2 for the tokens - i = bound(i, 0, 2); + i = bound(i, 0, 3); // assert trading is disabled assertFalse(carbonPOL.tradingEnabled(tokens[i])); } @@ -185,6 +263,14 @@ contract CarbonPOLTest is TestFixture { carbonPOL.enableTrading(tokens[i], ICarbonPOL.Price({ ethAmount: 100, tokenAmount: 10000 })); } + /// @dev test non admin shouldn't be able to enable eth trading + function testNonAdminShouldntBeAbleToEnableTradingETH() public { + // enable trading + vm.prank(user1); + vm.expectRevert(AccessDenied.selector); + carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 100, tokenAmount: 10000 })); + } + /// @dev test admin should be able to enable trading for token function testAdminShouldBeAbleToEnableTradingForToken(uint256 i) public { // pick one of these tokens to test @@ -198,6 +284,17 @@ contract CarbonPOLTest is TestFixture { assertTrue(carbonPOL.tradingEnabled(tokens[i])); } + /// @dev test admin should be able to enable eth trading + function testAdminShouldBeAbleToEnableTradingETH() public { + // enable trading + vm.prank(admin); + carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 100, tokenAmount: 10000 })); + // assert trading is enabled + assertTrue(carbonPOL.tradingEnabled(NATIVE_TOKEN)); + // check current eth sale amount is set to the initial eth sale amount + assertEq(carbonPOL.ethSaleAmount(), carbonPOL.currentEthSaleAmount()); + } + /// @dev test enabling trading for a token should emit an event function testEnablingTradingForTokenShouldEmitAnEvent(uint256 i) public { // pick one of these tokens to test @@ -213,6 +310,17 @@ contract CarbonPOLTest is TestFixture { carbonPOL.enableTrading(tokens[i], price); } + /// @dev test enabling trading for eth should emit an event + function testEnablingTradingForETHShouldEmitAnEvent() public { + ICarbonPOL.Price memory price = ICarbonPOL.Price({ ethAmount: 100, tokenAmount: 10000 }); + vm.prank(admin); + // expect event to be emitted + vm.expectEmit(); + emit TradingEnabled(NATIVE_TOKEN, price); + // enable trading + carbonPOL.enableTradingETH(price); + } + /// @dev test should revert when setting invalid price for a token function testShouldRevertWhenSettingInvalidPriceForToken(uint256 i) public { // pick one of these tokens to test @@ -230,6 +338,28 @@ contract CarbonPOLTest is TestFixture { carbonPOL.enableTrading(tokens[i], ICarbonPOL.Price({ ethAmount: 0, tokenAmount: 0 })); } + /// @dev test should revert when setting invalid price for the native token + function testShouldRevertWhenSettingInvalidPriceForNativeToken() public { + // enable trading + vm.startPrank(admin); + // setting any of ethAmount or tokenAmount to 0 results in invalid price error + vm.expectRevert(ICarbonPOL.InvalidPrice.selector); + carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 0, tokenAmount: 10000 })); + vm.expectRevert(ICarbonPOL.InvalidPrice.selector); + carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 100000, tokenAmount: 0 })); + vm.expectRevert(ICarbonPOL.InvalidPrice.selector); + carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 0, tokenAmount: 0 })); + } + + /// @dev test should revert when enabling trading for the native token using enableTrading + function testShouldRevertWhenEnablingTradingForNativeTokenUsingEnableTrading() public { + // enable trading + vm.startPrank(admin); + // attempting to enable trading using enable trading for native token should revert + vm.expectRevert(ICarbonPOL.InvalidToken.selector); + carbonPOL.enableTrading(NATIVE_TOKEN, ICarbonPOL.Price({ ethAmount: 100, tokenAmount: 10000 })); + } + /// @dev test should properly return price for enabled tokens as time passes function testShouldProperlyReturnPriceAsTimePasses(uint128 ethAmount, uint128 tokenAmount, uint256 i) public { // pick one of these tokens to test @@ -268,6 +398,81 @@ contract CarbonPOLTest is TestFixture { assertEq(price.ethAmount, ethAmount / 2); } + /// @dev test should properly return price for native token as time passes + function testShouldProperlyReturnNativeTokenPriceAsTimePasses(uint128 ethAmount, uint128 tokenAmount) public { + // enable trading and set price for token + vm.prank(admin); + Token token = NATIVE_TOKEN; + + ethAmount = uint128(bound(ethAmount, 10, 1e30)); + tokenAmount = uint128(bound(tokenAmount, 10, 1e30)); + + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: ethAmount, tokenAmount: tokenAmount }); + carbonPOL.enableTradingETH(initialPrice); + + // set timestamp to 1 + vm.warp(1); + + ICarbonPOL.Price memory price = carbonPOL.tokenPrice(token); + // price should be exactly 2x the market price at start + assertEq(price.tokenAmount, tokenAmount * MARKET_PRICE_MULTIPLY_DEFAULT); + + // set timestamp to 10 days (half-life time) + vm.warp(10 days + 1); + + // price should be equal market price at half-life + price = carbonPOL.tokenPrice(token); + assertEq(price.tokenAmount, tokenAmount); + + // set timestamp to 20 days + vm.warp(20 days + 1); + + // price should be equal to half the market price at 2x half-life + price = carbonPOL.tokenPrice(token); + assertEq(price.tokenAmount, tokenAmount / 2); + } + + /// @dev test should properly return price for native token as time passes + function testShouldProperlyReturnNativeTokenPriceAfterBigSale(uint128 ethAmount, uint128 tokenAmount) public { + // enable trading and set price for token + vm.prank(admin); + Token token = NATIVE_TOKEN; + + ethAmount = uint128(bound(ethAmount, 1e17, 1 * 1e18)); + tokenAmount = uint128(bound(tokenAmount, 1000 * 1e18, 4000 * 1e18)); + + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: ethAmount, tokenAmount: tokenAmount }); + carbonPOL.enableTradingETH(initialPrice); + + vm.startPrank(user1); + + // set timestamp to 1 + vm.warp(1); + + // set timestamp to 10 days + vm.warp(10 days + 1); + + // trade 95% of the eth sale amount + uint128 currentEthSaleAmount = uint128(carbonPOL.currentEthSaleAmount()); + uint128 ethTradeAmount = (currentEthSaleAmount * 95) / 100; + uint128 tradeAmount = carbonPOL.expectedTradeReturn(token, ethTradeAmount); + bnt.safeApprove(address(carbonPOL), tradeAmount); + carbonPOL.trade(token, tradeAmount); + + // price has been reset at this point + + // get price after reset + ICarbonPOL.Price memory price = carbonPOL.tokenPrice(token); + + // set timestamp to 20 days (half-life time) + vm.warp(20 days + 1); + + ICarbonPOL.Price memory newPrice = carbonPOL.tokenPrice(token); + // new price should be exactly equal to the prev price / 2 after the update + assertEq(price.ethAmount, newPrice.ethAmount); + assertEq(price.tokenAmount, newPrice.tokenAmount * carbonPOL.marketPriceMultiply()); + } + /// @dev test correct prices retrieved by tokenPrice with different initial prices and different timestamps function testPricesAtTimestamps() public { // test the following timestamps, ethAmounts and tokenAmounts @@ -312,7 +517,7 @@ contract CarbonPOLTest is TestFixture { Token token = token1; // get test cases from the pol test case parser - POLTestCaseParser.TestCase[] memory testCases = testCaseParser.getTestCases(); + POLTestCaseParser.TestCase[] memory testCases = testCaseParser.getTestCases(false); // go through each of the eth amounts, token amounts and timestamps to verify token price output matches test data for (uint256 i = 0; i < ethAmounts.length; ++i) { @@ -348,8 +553,78 @@ contract CarbonPOLTest is TestFixture { } } - /// @dev test trading should emit an event - function testTradingShouldEmitAnEvent() public { + /// @dev test correct prices for ETH retrieved by tokenPrice with different initial prices and different timestamps + function testETHPricesAtTimestamps() public { + // test the following timestamps, ethAmounts and tokenAmounts + uint24[10] memory timestamps = [ + 1, + 1 days, + 2 days, + 5 days, + 10 days, + 20 days, + 30 days, + 40 days, + 50 days, + 100 days + ]; + uint72[5] memory ethAmounts = [100, 1e18, 100e18, 10e18, 1000e18]; + uint80[11] memory tokenAmounts = [ + 100, + 1e18, + 10e18, + 100e18, + 1000e18, + 1200e18, + 1500e18, + 2000e18, + 2400e18, + 3000e18, + 10000e18 + ]; + // enable trading and set price for token + vm.startPrank(admin); + Token token = NATIVE_TOKEN; + + // get test cases from the pol test case parser + POLTestCaseParser.TestCase[] memory testCases = testCaseParser.getTestCases(true); + + // go through each of the eth amounts, token amounts and timestamps to verify token price output matches test data + for (uint256 i = 0; i < ethAmounts.length; ++i) { + for (uint256 j = 0; j < tokenAmounts.length; ++j) { + vm.warp(1); + uint128 ethAmount = uint128(ethAmounts[i]); + uint128 tokenAmount = uint128(tokenAmounts[j]); + ICarbonPOL.Price memory price = ICarbonPOL.Price({ ethAmount: ethAmount, tokenAmount: tokenAmount }); + carbonPOL.enableTradingETH(price); + // get the correct test case for this price + POLTestCaseParser.TestCase memory currentCase; + for (uint256 t = 0; t < testCases.length; ++t) { + if ( + testCases[t].initialPrice.ethAmount == ethAmount && + testCases[t].initialPrice.tokenAmount == tokenAmount + ) { + currentCase = testCases[t]; + } + } + for (uint256 k = 0; k < timestamps.length; ++k) { + // set timestamp + vm.warp(timestamps[k]); + // get token price at this timestamp + price = carbonPOL.tokenPrice(token); + // get test data for this timestamp + POLTestCaseParser.PriceAtTimestamp memory priceAtTimestamp = currentCase.pricesAtTimestamp[k]; + // assert test data matches the actual token price data + assertEq(priceAtTimestamp.timestamp, timestamps[k]); + assertEq(priceAtTimestamp.ethAmount, price.ethAmount); + assertEq(priceAtTimestamp.tokenAmount, price.tokenAmount); + } + } + } + } + + /// @dev test trading tokens should emit an event + function testTradingTokensShouldEmitAnEvent() public { // enable trading and set price for token1 vm.prank(admin); Token token = token1; @@ -374,6 +649,35 @@ contract CarbonPOLTest is TestFixture { vm.stopPrank(); } + /// @dev test trading eth should emit an event + function testTradingETHShouldEmitAnEvent() public { + // enable trading and set price for the native token + vm.prank(admin); + Token token = NATIVE_TOKEN; + + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: 1000000, tokenAmount: 100000000000 }); + carbonPOL.enableTradingETH(initialPrice); + + vm.startPrank(user1); + + // set timestamp to 10 days + vm.warp(10 days); + + // expected trade input + uint128 tradeAmount = 100000000; + uint128 expectedTradeInput = carbonPOL.expectedTradeInput(token, tradeAmount); + + // approve bnt for eth -> bnt trades + bnt.safeApprove(address(carbonPOL), tradeAmount); + + // trade + vm.expectEmit(); + emit TokenTraded(user1, token, tradeAmount, expectedTradeInput); + carbonPOL.trade{ value: expectedTradeInput }(token, tradeAmount); + + vm.stopPrank(); + } + /// @dev test trading should refund excess eth function testTradingShouldRefundExcessETH() public { // enable trading and set price for token1 @@ -464,29 +768,250 @@ contract CarbonPOLTest is TestFixture { vm.stopPrank(); } + /// @dev test trading eth should send eth to user + function testTradingETHShouldSendETHToUser() public { + // enable trading and set price for the native token + vm.prank(admin); + Token token = NATIVE_TOKEN; + + // set 1 eth = 2000 bnt as initial price + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: 1e18, tokenAmount: 2000 * 1e18 }); + carbonPOL.enableTradingETH(initialPrice); + + vm.startPrank(user1); + + // set timestamp to 10 days + vm.warp(10 days); + + // expected trade input + uint128 tradeAmount = 1000e18; + uint128 expectedEthReceived = carbonPOL.expectedTradeInput(token, tradeAmount); + + uint256 ethBalanceBefore = user1.balance; + + // approve bnt for eth -> bnt trades + bnt.safeApprove(address(carbonPOL), tradeAmount); + + // trade + carbonPOL.trade(token, tradeAmount); + + uint256 ethBalanceAfter = user1.balance; + + assertEq(ethBalanceAfter - ethBalanceBefore, expectedEthReceived); + + vm.stopPrank(); + } + + /// @dev test trading should increase the contract's bnt balance + function testTradingETHShouldIncreaseContractBNTBalance() public { + // enable trading and set price for the native token + vm.prank(admin); + Token token = NATIVE_TOKEN; + + // set 1 eth = 2000 bnt as initial price + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: 1e18, tokenAmount: 2000 * 1e18 }); + carbonPOL.enableTradingETH(initialPrice); + + vm.startPrank(user1); + + // set timestamp to 10 days + vm.warp(10 days); + + // expected trade input + uint128 tradeAmount = 1000 * 1e18; + uint128 expectedTradeInput = carbonPOL.expectedTradeInput(token, tradeAmount); + + uint256 bntBalanceBefore = bnt.balanceOf(address(carbonPOL)); + + // approve bnt for eth -> bnt trades + bnt.safeApprove(address(carbonPOL), tradeAmount); + + // trade + carbonPOL.trade{ value: expectedTradeInput }(token, tradeAmount); + + uint256 bntBalanceAfter = bnt.balanceOf(address(carbonPOL)); + + assertEq(bntBalanceAfter - bntBalanceBefore, tradeAmount); + + vm.stopPrank(); + } + + /// @dev test trading eth should decrease the current eth sale amount + function testTradingETHShouldDecreaseCurrentEthSaleAmount() public { + // enable trading and set price for the native token + vm.prank(admin); + Token token = NATIVE_TOKEN; + + // set 1 eth = 2000 bnt as initial price + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: 1e18, tokenAmount: 2000 * 1e18 }); + carbonPOL.enableTradingETH(initialPrice); + + vm.startPrank(user1); + + // set timestamp to 10 days + vm.warp(10 days); + + // expected trade input + uint128 tradeAmount = 4000 * 1e18; + uint128 expectedEthReceived = carbonPOL.expectedTradeInput(token, tradeAmount); + + uint128 saleAmountBefore = carbonPOL.currentEthSaleAmount(); + + // approve bnt for eth -> bnt trades + bnt.safeApprove(address(carbonPOL), tradeAmount); + + // trade + carbonPOL.trade(token, tradeAmount); + + uint128 saleAmountAfter = carbonPOL.currentEthSaleAmount(); + + assertEq(saleAmountBefore - saleAmountAfter, expectedEthReceived); + + vm.stopPrank(); + } + + /// @dev test trading eth below the 10% * sale amount threshold should reset the price and current eth amount + function testTradingETHBelowTheSaleThreshholdShouldResetThePriceAndCurrentEthAmount() public { + // enable trading and set price for the native token + vm.prank(admin); + Token token = NATIVE_TOKEN; + + // set 1 eth = 2000 bnt as initial price + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: 1e18, tokenAmount: 2000 * 1e18 }); + carbonPOL.enableTradingETH(initialPrice); + + vm.startPrank(user1); + + // set timestamp to 10 days + vm.warp(10 days); + + // trade 85% of the sale amount + uint128 initialSaleAmount = carbonPOL.ethSaleAmount(); + uint128 currentSaleAmount = carbonPOL.currentEthSaleAmount(); + + // assert current and initial eth sale amount are equal + assertEq(initialSaleAmount, currentSaleAmount); + + uint128 amountToSell = uint128((initialSaleAmount * 85) / 100); + + uint128 tradeAmount = carbonPOL.expectedTradeReturn(token, amountToSell); + uint128 ethSale = carbonPOL.expectedTradeInput(token, tradeAmount); + + // assert that the expected eth sale for the bnt amount is equal to 85% of the initialSaleAmount + assertEq(ethSale, amountToSell); + + // approve bnt for eth -> bnt trades + bnt.safeApprove(address(carbonPOL), MAX_SOURCE_AMOUNT); + + // trade + carbonPOL.trade(token, tradeAmount); + + // assert we have 15% available eth for sale + currentSaleAmount = carbonPOL.currentEthSaleAmount(); + assertEq(currentSaleAmount, initialSaleAmount - ethSale); + + // get the price before the threshold trade + ICarbonPOL.Price memory prevPrice = carbonPOL.tokenPrice(NATIVE_TOKEN); + + // trade 10% more (so that we go below 10% of the max sale amount) + amountToSell = uint128((initialSaleAmount * 10) / 100); + tradeAmount = carbonPOL.expectedTradeReturn(token, amountToSell); + carbonPOL.trade(token, tradeAmount); + + // assert initial sale amount is the same + assertEq(initialSaleAmount, carbonPOL.ethSaleAmount()); + + // assert new current eth sale amount is equal to the initial (we have topped up the amount) + currentSaleAmount = carbonPOL.currentEthSaleAmount(); + assertEq(currentSaleAmount, initialSaleAmount); + + vm.warp(block.timestamp + 1); + // get the price after the threshold trade + ICarbonPOL.Price memory newPrice = carbonPOL.tokenPrice(NATIVE_TOKEN); + + // assert new price is twice the price before the trade + assertEq(newPrice.ethAmount, prevPrice.ethAmount); + assertEq(newPrice.tokenAmount, prevPrice.tokenAmount * carbonPOL.marketPriceMultiply()); + + vm.stopPrank(); + } + + /// @dev test trading eth below the 10% * sale amount threshold should emit price updated event + function testTradingETHBelowTheSaleThreshholdShouldEmitEvent() public { + // enable trading and set price for the native token + vm.prank(admin); + Token token = NATIVE_TOKEN; + + // set 1 eth = 2000 bnt as initial price + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: 1e18, tokenAmount: 2000 * 1e18 }); + carbonPOL.enableTradingETH(initialPrice); + + vm.startPrank(user1); + + // set timestamp to 10 days + vm.warp(10 days); + + // trade 95% of the sale amount + uint128 initialSaleAmount = carbonPOL.ethSaleAmount(); + uint128 currentSaleAmount = carbonPOL.currentEthSaleAmount(); + + // assert current and initial eth sale amount are equal + assertEq(initialSaleAmount, currentSaleAmount); + + uint128 amountToSell = uint128((initialSaleAmount * 95) / 100); + + uint128 tradeAmount = carbonPOL.expectedTradeReturn(token, amountToSell); + uint128 ethSale = carbonPOL.expectedTradeInput(token, tradeAmount); + + // assert that the expected eth sale for the bnt amount is equal to 85% of the initialSaleAmount + assertEq(ethSale, amountToSell); + + // approve bnt for eth -> bnt trades + bnt.safeApprove(address(carbonPOL), MAX_SOURCE_AMOUNT); + + // get the price before the threshold trade + ICarbonPOL.Price memory prevPrice = carbonPOL.tokenPrice(NATIVE_TOKEN); + + uint128 newExpectedTokenAmount = prevPrice.tokenAmount * carbonPOL.marketPriceMultiply(); + ICarbonPOL.Price memory newExpectedPrice = ICarbonPOL.Price({ + ethAmount: prevPrice.ethAmount, + tokenAmount: newExpectedTokenAmount + }); + + // trade + vm.expectEmit(); + emit PriceUpdated(token, newExpectedPrice); + carbonPOL.trade(token, tradeAmount); + + vm.stopPrank(); + } + /// @dev test should revert getting price for tokens for which trading is disabled - function testShouldRevertTokenPriceIfTradingIsDisabled() public { + function testShouldRevertTokenPriceIfTradingIsDisabled(bool isNativeToken) public { + Token token = isNativeToken ? NATIVE_TOKEN : token1; // expect for a revert with trading disabled vm.expectRevert(ICarbonPOL.TradingDisabled.selector); - carbonPOL.tokenPrice(token1); + carbonPOL.tokenPrice(token); } /// @dev test should revert expected input for tokens for which trading is disabled - function testShouldRevertExpectedTradeInputIfTradingIsDisabled(uint128 amount) public { + function testShouldRevertExpectedTradeInputIfTradingIsDisabled(bool isNativeToken, uint128 amount) public { + Token token = isNativeToken ? NATIVE_TOKEN : token1; // assert trading is disabled for token - assertFalse(carbonPOL.tradingEnabled(token1)); + assertFalse(carbonPOL.tradingEnabled(token)); // expect for a revert with trading disabled vm.expectRevert(ICarbonPOL.TradingDisabled.selector); - carbonPOL.expectedTradeInput(token1, amount); + carbonPOL.expectedTradeInput(token, amount); } /// @dev test should revert expected return for tokens for which trading is disabled - function testShouldRevertExpectedTradeReturnIfTradingIsDisabled(uint128 amount) public { + function testShouldRevertExpectedTradeReturnIfTradingIsDisabled(bool isNativeToken, uint128 amount) public { + Token token = isNativeToken ? NATIVE_TOKEN : token1; // assert trading is disabled for token - assertFalse(carbonPOL.tradingEnabled(token1)); + assertFalse(carbonPOL.tradingEnabled(token)); // expect for a revert with trading disabled vm.expectRevert(ICarbonPOL.TradingDisabled.selector); - carbonPOL.expectedTradeReturn(token1, amount); + carbonPOL.expectedTradeReturn(token, amount); } /// @dev test should return invalid price for expected return for tokens if eth amount in price goes to zero @@ -500,6 +1025,19 @@ contract CarbonPOLTest is TestFixture { carbonPOL.expectedTradeReturn(token1, amount); } + /// @dev test should return invalid price for expected return for native token if eth amount in price goes to zero + function testShouldReturnInvalidPriceForExpectedTradeReturnForNativeTokenIfEthAmountGoesToZero( + uint128 amount + ) public { + vm.prank(admin); + // enable token to test + carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 1, tokenAmount: 1 })); + vm.warp(20 days); + // expect for a revert with invalid price + vm.expectRevert(ICarbonPOL.InvalidPrice.selector); + carbonPOL.expectedTradeReturn(NATIVE_TOKEN, amount); + } + /// @dev test should revert expected input if not enough token balance function testShouldRevertExpectedTradeInputIfNotEnoughTokenBalanceForTrade() public { vm.prank(admin); @@ -514,6 +1052,21 @@ contract CarbonPOLTest is TestFixture { carbonPOL.expectedTradeInput(token1, amount); } + /// @dev test should revert expected input for native token if not enough token balance + function testShouldRevertExpectedTradeInputIfNotEnoughNativeTokenBalanceForTrade() public { + vm.prank(admin); + // enable native token to test + carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 10000, tokenAmount: 100000000 })); + // set timestamp to 5 days + vm.warp(5 days); + uint256 ethBalance = NATIVE_TOKEN.balanceOf(address(carbonPOL)); + uint128 maxTokenAmount = carbonPOL.expectedTradeReturn(NATIVE_TOKEN, uint128(ethBalance)); + uint128 amount = maxTokenAmount + 1e18; + // get expected trade input + vm.expectRevert(ICarbonPOL.InsufficientTokenBalance.selector); + carbonPOL.expectedTradeInput(NATIVE_TOKEN, amount); + } + /// @dev test should revert expected return if not enough token balance function testShouldRevertExpectedReturnIfNotEnoughTokenBalanceForTrade() public { vm.prank(admin); @@ -531,10 +1084,25 @@ contract CarbonPOLTest is TestFixture { carbonPOL.expectedTradeReturn(token1, amount); } + /// @dev test should revert expected return if not enough token balance + function testShouldRevertExpectedReturnIfNotEnoughNativeTokenBalanceForTrade() public { + vm.prank(admin); + // enable token to test + carbonPOL.enableTrading(token1, ICarbonPOL.Price({ ethAmount: 10000, tokenAmount: 100000000 })); + // set timestamp to 5 days + vm.warp(5 days); + // get token balance + uint256 tokenBalance = token1.balanceOf(address(carbonPOL)); + uint128 amount = uint128(tokenBalance) + 1; + // expect revert + vm.expectRevert(ICarbonPOL.InsufficientTokenBalance.selector); + carbonPOL.expectedTradeReturn(token1, amount); + } + /// @dev test should revert if attempting to trade tokens for which trading is disabled - function testShouldRevertTradingTokensForWhichTradingIsDisabled() public { + function testShouldRevertTradingTokensForWhichTradingIsDisabled(bool isNativeToken) public { vm.prank(user1); - Token token = token1; + Token token = isNativeToken ? NATIVE_TOKEN : token1; uint128 amount = 1e18; // assert trading is disabled for token assertFalse(carbonPOL.tradingEnabled(token)); @@ -543,23 +1111,26 @@ contract CarbonPOLTest is TestFixture { carbonPOL.trade(token, amount); } - /// @dev test should revert if attempting to trade eth - function testShouldRevertTradingETH() public { + /// @dev test should revert if attempting to trade with zero amount + function testShouldRevertTradingWithZeroAmount() public { + Token token = token1; + uint128 amount = 0; + vm.prank(admin); + // enable token to test + carbonPOL.enableTrading(token, ICarbonPOL.Price({ ethAmount: 1, tokenAmount: 1 })); vm.prank(user1); - Token token = NATIVE_TOKEN; - uint128 amount = 1e18; // expect trade to revert - vm.expectRevert(ICarbonPOL.InvalidToken.selector); + vm.expectRevert(ZeroValue.selector); carbonPOL.trade(token, amount); } - /// @dev test should revert if attempting to trade with zero amount - function testShouldRevertTradingWithZeroAmount() public { - Token token = token1; + /// @dev test should revert if attempting to trade native token with zero amount + function testShouldRevertTradingNativeTokenWithZeroAmount() public { + Token token = NATIVE_TOKEN; uint128 amount = 0; vm.prank(admin); // enable token to test - carbonPOL.enableTrading(token, ICarbonPOL.Price({ ethAmount: 1, tokenAmount: 1 })); + carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 1, tokenAmount: 1 })); vm.prank(user1); // expect trade to revert vm.expectRevert(ZeroValue.selector); @@ -585,6 +1156,59 @@ contract CarbonPOLTest is TestFixture { vm.stopPrank(); } + /// @dev test should revert trading eth if BNT to send is equal to 0 + function testShouldRevertTradingETHForZeroTokenValue() public { + Token token = NATIVE_TOKEN; + // trade 999 tokens + uint128 amount = 999; + vm.prank(admin); + // enable token to test + carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 1, tokenAmount: 1000 })); + vm.startPrank(user1); + // set block.timestamp to 1000 + vm.warp(1000); + // expect eth required to be 0 + assertEq(carbonPOL.expectedTradeInput(token, amount), 0); + // expect trade to revert + vm.expectRevert(ICarbonPOL.InvalidTrade.selector); + carbonPOL.trade(token, amount); + vm.stopPrank(); + } + + /// @dev test should revert trading eth if the trade amount is above the current eth sale amount + function testShouldRevertTradingETHIfTradeAmountIsAboveCurrentEthSaleAmount() public { + Token token = NATIVE_TOKEN; + vm.prank(admin); + // enable token to test + carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 1e18, tokenAmount: 2000 * 1e18 })); + + // assert that available eth amount is exactly 100 ether + assertEq(carbonPOL.currentEthSaleAmount(), 100 ether); + + vm.startPrank(user1); + + // check 100 eth trade passes successfully + uint128 maxTradeTokenAmount = carbonPOL.expectedTradeReturn(token, 100 ether); + bnt.safeApprove(address(carbonPOL), maxTradeTokenAmount); + carbonPOL.trade(token, maxTradeTokenAmount); + + // set block.timestamp to 1000 + vm.warp(1000); + // trade a bit over 100 eth + uint128 ethAmount = 100 ether + 2; + uint128 tokenAmount = carbonPOL.expectedTradeReturn(token, ethAmount); + + // assert that the eth amount for *tokenAmount* is exactly 1 wei above 100 eth and should revert the trade + uint128 expectedEthAmount = carbonPOL.expectedTradeInput(token, tokenAmount); + assertEq(expectedEthAmount, 100 ether + 1); + assertGt(expectedEthAmount, carbonPOL.currentEthSaleAmount()); + + // expect trade to revert + vm.expectRevert(ICarbonPOL.InsufficientEthForSale.selector); + carbonPOL.trade(token, tokenAmount); + vm.stopPrank(); + } + /// @dev test should revert trading if not enough eth has been sent function testShouldRevertTradingIfNotEnoughETHSent() public { Token token = token1; @@ -630,17 +1254,4 @@ contract CarbonPOLTest is TestFixture { testReentrancy.tryReenterCarbonPOL{ value: ethRequired + 1 }(amount); vm.stopPrank(); } - - /// @dev helper function to get expected eth amount in price for a token at the current time - function getExpectedETHAmount(uint128 ethAmount) private view returns (uint128) { - // calculate the actual price by multiplying the eth amount by the factor - ethAmount *= carbonPOL.marketPriceMultiply(); - uint32 tradingStartTime = 1; - // get time elapsed since trading was enabled - uint32 timeElapsed = uint32(block.timestamp) - tradingStartTime; - uint32 priceDecayHalfLife = carbonPOL.priceDecayHalfLife(); - // get the current eth amount by adjusting the eth amount with the exp decay formula - ethAmount = uint128(ExpDecayMath.calcExpDecay(ethAmount, timeElapsed, priceDecayHalfLife)); - return ethAmount; - } } diff --git a/test/forge/POLTestCaseParser.t.sol b/test/forge/POLTestCaseParser.t.sol index 951da34c..b83d2910 100644 --- a/test/forge/POLTestCaseParser.t.sol +++ b/test/forge/POLTestCaseParser.t.sol @@ -31,8 +31,11 @@ contract POLTestCaseParser is Test { /** * @dev helper function to get test cases by parsing test data json */ - function getTestCases() public returns (TestCase[] memory testCases) { - string memory json = vm.readFile("./test/helpers/data/polPricingTestData.json"); + function getTestCases(bool forNativeToken) public returns (TestCase[] memory testCases) { + string memory path = "./test/helpers/data/"; + string memory filename = forNativeToken ? "polPricingTestDataETH.json" : "polPricingTestData.json"; + path = string.concat(path, filename); + string memory json = vm.readFile(path); testCases = parseTestCases(json, "testCase"); return testCases; diff --git a/test/forge/TestFixture.t.sol b/test/forge/TestFixture.t.sol index e553c0b5..edd0570e 100644 --- a/test/forge/TestFixture.t.sol +++ b/test/forge/TestFixture.t.sol @@ -192,7 +192,7 @@ contract TestFixture is Test { vm.startPrank(admin); // Deploy Carbon POL - carbonPOL = new CarbonPOL(); + carbonPOL = new CarbonPOL(bnt); bytes memory polInitData = abi.encodeWithSelector(carbonPOL.initialize.selector); // Deploy Carbon POL proxy @@ -250,6 +250,8 @@ contract TestFixture is Test { token1.safeTransfer(address(carbonPOL), MAX_SOURCE_AMOUNT * 2); token2.safeTransfer(address(carbonPOL), MAX_SOURCE_AMOUNT * 2); bnt.safeTransfer(address(carbonPOL), MAX_SOURCE_AMOUNT * 5); + // transfer eth + vm.deal(address(carbonPOL), MAX_SOURCE_AMOUNT); vm.stopPrank(); } } diff --git a/test/helpers/data/polPricingTestDataEth.json b/test/helpers/data/polPricingTestDataEth.json new file mode 100644 index 00000000..8a87725c --- /dev/null +++ b/test/helpers/data/polPricingTestDataEth.json @@ -0,0 +1,3084 @@ +{ + "testCase": [ + { + "initialPriceEthAmount": "100", + "initialPriceTokenAmount": "100", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100", + "tokenAmount": "200" + }, + { + "timestamp": "86400", + "ethAmount": "100", + "tokenAmount": "186" + }, + { + "timestamp": "172800", + "ethAmount": "100", + "tokenAmount": "174" + }, + { + "timestamp": "432000", + "ethAmount": "100", + "tokenAmount": "141" + }, + { + "timestamp": "864000", + "ethAmount": "100", + "tokenAmount": "100" + }, + { + "timestamp": "1728000", + "ethAmount": "100", + "tokenAmount": "50" + }, + { + "timestamp": "2592000", + "ethAmount": "100", + "tokenAmount": "25" + }, + { + "timestamp": "3456000", + "ethAmount": "100", + "tokenAmount": "12" + }, + { + "timestamp": "4320000", + "ethAmount": "100", + "tokenAmount": "6" + }, + { + "timestamp": "8640000", + "ethAmount": "100", + "tokenAmount": "0" + } + ] + }, + { + "initialPriceEthAmount": "100", + "initialPriceTokenAmount": "1000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100", + "tokenAmount": "2000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100", + "tokenAmount": "1866067480132519632" + }, + { + "timestamp": "172800", + "ethAmount": "100", + "tokenAmount": "1741102523397596730" + }, + { + "timestamp": "432000", + "ethAmount": "100", + "tokenAmount": "1414214696931586572" + }, + { + "timestamp": "864000", + "ethAmount": "100", + "tokenAmount": "1000000802254003009" + }, + { + "timestamp": "1728000", + "ethAmount": "100", + "tokenAmount": "500000401127001504" + }, + { + "timestamp": "2592000", + "ethAmount": "100", + "tokenAmount": "250000200563500752" + }, + { + "timestamp": "3456000", + "ethAmount": "100", + "tokenAmount": "125000100281750376" + }, + { + "timestamp": "4320000", + "ethAmount": "100", + "tokenAmount": "62500050140875188" + }, + { + "timestamp": "8640000", + "ethAmount": "100", + "tokenAmount": "1953126566902349" + } + ] + }, + { + "initialPriceEthAmount": "100", + "initialPriceTokenAmount": "10000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100", + "tokenAmount": "20000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100", + "tokenAmount": "18660674801325196320" + }, + { + "timestamp": "172800", + "ethAmount": "100", + "tokenAmount": "17411025233975967307" + }, + { + "timestamp": "432000", + "ethAmount": "100", + "tokenAmount": "14142146969315865725" + }, + { + "timestamp": "864000", + "ethAmount": "100", + "tokenAmount": "10000008022540030092" + }, + { + "timestamp": "1728000", + "ethAmount": "100", + "tokenAmount": "5000004011270015046" + }, + { + "timestamp": "2592000", + "ethAmount": "100", + "tokenAmount": "2500002005635007523" + }, + { + "timestamp": "3456000", + "ethAmount": "100", + "tokenAmount": "1250001002817503761" + }, + { + "timestamp": "4320000", + "ethAmount": "100", + "tokenAmount": "625000501408751880" + }, + { + "timestamp": "8640000", + "ethAmount": "100", + "tokenAmount": "19531265669023496" + } + ] + }, + { + "initialPriceEthAmount": "100", + "initialPriceTokenAmount": "100000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100", + "tokenAmount": "200000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100", + "tokenAmount": "186606748013251963208" + }, + { + "timestamp": "172800", + "ethAmount": "100", + "tokenAmount": "174110252339759673075" + }, + { + "timestamp": "432000", + "ethAmount": "100", + "tokenAmount": "141421469693158657253" + }, + { + "timestamp": "864000", + "ethAmount": "100", + "tokenAmount": "100000080225400300921" + }, + { + "timestamp": "1728000", + "ethAmount": "100", + "tokenAmount": "50000040112700150460" + }, + { + "timestamp": "2592000", + "ethAmount": "100", + "tokenAmount": "25000020056350075230" + }, + { + "timestamp": "3456000", + "ethAmount": "100", + "tokenAmount": "12500010028175037615" + }, + { + "timestamp": "4320000", + "ethAmount": "100", + "tokenAmount": "6250005014087518807" + }, + { + "timestamp": "8640000", + "ethAmount": "100", + "tokenAmount": "195312656690234962" + } + ] + }, + { + "initialPriceEthAmount": "100", + "initialPriceTokenAmount": "1000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100", + "tokenAmount": "2000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100", + "tokenAmount": "1866067480132519632088" + }, + { + "timestamp": "172800", + "ethAmount": "100", + "tokenAmount": "1741102523397596730750" + }, + { + "timestamp": "432000", + "ethAmount": "100", + "tokenAmount": "1414214696931586572533" + }, + { + "timestamp": "864000", + "ethAmount": "100", + "tokenAmount": "1000000802254003009210" + }, + { + "timestamp": "1728000", + "ethAmount": "100", + "tokenAmount": "500000401127001504605" + }, + { + "timestamp": "2592000", + "ethAmount": "100", + "tokenAmount": "250000200563500752302" + }, + { + "timestamp": "3456000", + "ethAmount": "100", + "tokenAmount": "125000100281750376151" + }, + { + "timestamp": "4320000", + "ethAmount": "100", + "tokenAmount": "62500050140875188075" + }, + { + "timestamp": "8640000", + "ethAmount": "100", + "tokenAmount": "1953126566902349627" + } + ] + }, + { + "initialPriceEthAmount": "100", + "initialPriceTokenAmount": "1200000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100", + "tokenAmount": "2400000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100", + "tokenAmount": "2239280976159023558506" + }, + { + "timestamp": "172800", + "ethAmount": "100", + "tokenAmount": "2089323028077116076900" + }, + { + "timestamp": "432000", + "ethAmount": "100", + "tokenAmount": "1697057636317903887040" + }, + { + "timestamp": "864000", + "ethAmount": "100", + "tokenAmount": "1200000962704803611053" + }, + { + "timestamp": "1728000", + "ethAmount": "100", + "tokenAmount": "600000481352401805526" + }, + { + "timestamp": "2592000", + "ethAmount": "100", + "tokenAmount": "300000240676200902763" + }, + { + "timestamp": "3456000", + "ethAmount": "100", + "tokenAmount": "150000120338100451381" + }, + { + "timestamp": "4320000", + "ethAmount": "100", + "tokenAmount": "75000060169050225690" + }, + { + "timestamp": "8640000", + "ethAmount": "100", + "tokenAmount": "2343751880282819552" + } + ] + }, + { + "initialPriceEthAmount": "100", + "initialPriceTokenAmount": "1500000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100", + "tokenAmount": "3000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100", + "tokenAmount": "2799101220198779448133" + }, + { + "timestamp": "172800", + "ethAmount": "100", + "tokenAmount": "2611653785096395096126" + }, + { + "timestamp": "432000", + "ethAmount": "100", + "tokenAmount": "2121322045397379858800" + }, + { + "timestamp": "864000", + "ethAmount": "100", + "tokenAmount": "1500001203381004513816" + }, + { + "timestamp": "1728000", + "ethAmount": "100", + "tokenAmount": "750000601690502256908" + }, + { + "timestamp": "2592000", + "ethAmount": "100", + "tokenAmount": "375000300845251128454" + }, + { + "timestamp": "3456000", + "ethAmount": "100", + "tokenAmount": "187500150422625564227" + }, + { + "timestamp": "4320000", + "ethAmount": "100", + "tokenAmount": "93750075211312782113" + }, + { + "timestamp": "8640000", + "ethAmount": "100", + "tokenAmount": "2929689850353524441" + } + ] + }, + { + "initialPriceEthAmount": "100", + "initialPriceTokenAmount": "2000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100", + "tokenAmount": "4000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100", + "tokenAmount": "3732134960265039264177" + }, + { + "timestamp": "172800", + "ethAmount": "100", + "tokenAmount": "3482205046795193461501" + }, + { + "timestamp": "432000", + "ethAmount": "100", + "tokenAmount": "2828429393863173145067" + }, + { + "timestamp": "864000", + "ethAmount": "100", + "tokenAmount": "2000001604508006018421" + }, + { + "timestamp": "1728000", + "ethAmount": "100", + "tokenAmount": "1000000802254003009210" + }, + { + "timestamp": "2592000", + "ethAmount": "100", + "tokenAmount": "500000401127001504605" + }, + { + "timestamp": "3456000", + "ethAmount": "100", + "tokenAmount": "250000200563500752302" + }, + { + "timestamp": "4320000", + "ethAmount": "100", + "tokenAmount": "125000100281750376151" + }, + { + "timestamp": "8640000", + "ethAmount": "100", + "tokenAmount": "3906253133804699254" + } + ] + }, + { + "initialPriceEthAmount": "100", + "initialPriceTokenAmount": "2400000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100", + "tokenAmount": "4800000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100", + "tokenAmount": "4478561952318047117012" + }, + { + "timestamp": "172800", + "ethAmount": "100", + "tokenAmount": "4178646056154232153801" + }, + { + "timestamp": "432000", + "ethAmount": "100", + "tokenAmount": "3394115272635807774080" + }, + { + "timestamp": "864000", + "ethAmount": "100", + "tokenAmount": "2400001925409607222106" + }, + { + "timestamp": "1728000", + "ethAmount": "100", + "tokenAmount": "1200000962704803611053" + }, + { + "timestamp": "2592000", + "ethAmount": "100", + "tokenAmount": "600000481352401805526" + }, + { + "timestamp": "3456000", + "ethAmount": "100", + "tokenAmount": "300000240676200902763" + }, + { + "timestamp": "4320000", + "ethAmount": "100", + "tokenAmount": "150000120338100451381" + }, + { + "timestamp": "8640000", + "ethAmount": "100", + "tokenAmount": "4687503760565639105" + } + ] + }, + { + "initialPriceEthAmount": "100", + "initialPriceTokenAmount": "3000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100", + "tokenAmount": "6000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100", + "tokenAmount": "5598202440397558896266" + }, + { + "timestamp": "172800", + "ethAmount": "100", + "tokenAmount": "5223307570192790192252" + }, + { + "timestamp": "432000", + "ethAmount": "100", + "tokenAmount": "4242644090794759717600" + }, + { + "timestamp": "864000", + "ethAmount": "100", + "tokenAmount": "3000002406762009027632" + }, + { + "timestamp": "1728000", + "ethAmount": "100", + "tokenAmount": "1500001203381004513816" + }, + { + "timestamp": "2592000", + "ethAmount": "100", + "tokenAmount": "750000601690502256908" + }, + { + "timestamp": "3456000", + "ethAmount": "100", + "tokenAmount": "375000300845251128454" + }, + { + "timestamp": "4320000", + "ethAmount": "100", + "tokenAmount": "187500150422625564227" + }, + { + "timestamp": "8640000", + "ethAmount": "100", + "tokenAmount": "5859379700707048882" + } + ] + }, + { + "initialPriceEthAmount": "100", + "initialPriceTokenAmount": "10000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100", + "tokenAmount": "20000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100", + "tokenAmount": "18660674801325196320886" + }, + { + "timestamp": "172800", + "ethAmount": "100", + "tokenAmount": "17411025233975967307506" + }, + { + "timestamp": "432000", + "ethAmount": "100", + "tokenAmount": "14142146969315865725336" + }, + { + "timestamp": "864000", + "ethAmount": "100", + "tokenAmount": "10000008022540030092109" + }, + { + "timestamp": "1728000", + "ethAmount": "100", + "tokenAmount": "5000004011270015046054" + }, + { + "timestamp": "2592000", + "ethAmount": "100", + "tokenAmount": "2500002005635007523027" + }, + { + "timestamp": "3456000", + "ethAmount": "100", + "tokenAmount": "1250001002817503761513" + }, + { + "timestamp": "4320000", + "ethAmount": "100", + "tokenAmount": "625000501408751880756" + }, + { + "timestamp": "8640000", + "ethAmount": "100", + "tokenAmount": "19531265669023496273" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000", + "initialPriceTokenAmount": "100", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000", + "tokenAmount": "200" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000", + "tokenAmount": "186" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000", + "tokenAmount": "174" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000", + "tokenAmount": "141" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000", + "tokenAmount": "100" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000", + "tokenAmount": "50" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000", + "tokenAmount": "25" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000", + "tokenAmount": "12" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000", + "tokenAmount": "6" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000", + "tokenAmount": "0" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000", + "initialPriceTokenAmount": "1000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000", + "tokenAmount": "2000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000", + "tokenAmount": "1866067480132519632" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000", + "tokenAmount": "1741102523397596730" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000", + "tokenAmount": "1414214696931586572" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000", + "tokenAmount": "1000000802254003009" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000", + "tokenAmount": "500000401127001504" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000", + "tokenAmount": "250000200563500752" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000", + "tokenAmount": "125000100281750376" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000", + "tokenAmount": "62500050140875188" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000", + "tokenAmount": "1953126566902349" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000", + "initialPriceTokenAmount": "10000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000", + "tokenAmount": "20000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000", + "tokenAmount": "18660674801325196320" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000", + "tokenAmount": "17411025233975967307" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000", + "tokenAmount": "14142146969315865725" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000", + "tokenAmount": "10000008022540030092" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000", + "tokenAmount": "5000004011270015046" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000", + "tokenAmount": "2500002005635007523" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000", + "tokenAmount": "1250001002817503761" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000", + "tokenAmount": "625000501408751880" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000", + "tokenAmount": "19531265669023496" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000", + "initialPriceTokenAmount": "100000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000", + "tokenAmount": "200000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000", + "tokenAmount": "186606748013251963208" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000", + "tokenAmount": "174110252339759673075" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000", + "tokenAmount": "141421469693158657253" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000", + "tokenAmount": "100000080225400300921" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000", + "tokenAmount": "50000040112700150460" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000", + "tokenAmount": "25000020056350075230" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000", + "tokenAmount": "12500010028175037615" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000", + "tokenAmount": "6250005014087518807" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000", + "tokenAmount": "195312656690234962" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000", + "initialPriceTokenAmount": "1000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000", + "tokenAmount": "2000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000", + "tokenAmount": "1866067480132519632088" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000", + "tokenAmount": "1741102523397596730750" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000", + "tokenAmount": "1414214696931586572533" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000", + "tokenAmount": "1000000802254003009210" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000", + "tokenAmount": "500000401127001504605" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000", + "tokenAmount": "250000200563500752302" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000", + "tokenAmount": "125000100281750376151" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000", + "tokenAmount": "62500050140875188075" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000", + "tokenAmount": "1953126566902349627" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000", + "initialPriceTokenAmount": "1200000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000", + "tokenAmount": "2400000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000", + "tokenAmount": "2239280976159023558506" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000", + "tokenAmount": "2089323028077116076900" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000", + "tokenAmount": "1697057636317903887040" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000", + "tokenAmount": "1200000962704803611053" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000", + "tokenAmount": "600000481352401805526" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000", + "tokenAmount": "300000240676200902763" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000", + "tokenAmount": "150000120338100451381" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000", + "tokenAmount": "75000060169050225690" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000", + "tokenAmount": "2343751880282819552" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000", + "initialPriceTokenAmount": "1500000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000", + "tokenAmount": "3000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000", + "tokenAmount": "2799101220198779448133" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000", + "tokenAmount": "2611653785096395096126" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000", + "tokenAmount": "2121322045397379858800" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000", + "tokenAmount": "1500001203381004513816" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000", + "tokenAmount": "750000601690502256908" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000", + "tokenAmount": "375000300845251128454" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000", + "tokenAmount": "187500150422625564227" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000", + "tokenAmount": "93750075211312782113" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000", + "tokenAmount": "2929689850353524441" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000", + "initialPriceTokenAmount": "2000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000", + "tokenAmount": "4000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000", + "tokenAmount": "3732134960265039264177" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000", + "tokenAmount": "3482205046795193461501" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000", + "tokenAmount": "2828429393863173145067" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000", + "tokenAmount": "2000001604508006018421" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000", + "tokenAmount": "1000000802254003009210" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000", + "tokenAmount": "500000401127001504605" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000", + "tokenAmount": "250000200563500752302" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000", + "tokenAmount": "125000100281750376151" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000", + "tokenAmount": "3906253133804699254" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000", + "initialPriceTokenAmount": "2400000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000", + "tokenAmount": "4800000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000", + "tokenAmount": "4478561952318047117012" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000", + "tokenAmount": "4178646056154232153801" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000", + "tokenAmount": "3394115272635807774080" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000", + "tokenAmount": "2400001925409607222106" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000", + "tokenAmount": "1200000962704803611053" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000", + "tokenAmount": "600000481352401805526" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000", + "tokenAmount": "300000240676200902763" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000", + "tokenAmount": "150000120338100451381" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000", + "tokenAmount": "4687503760565639105" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000", + "initialPriceTokenAmount": "3000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000", + "tokenAmount": "6000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000", + "tokenAmount": "5598202440397558896266" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000", + "tokenAmount": "5223307570192790192252" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000", + "tokenAmount": "4242644090794759717600" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000", + "tokenAmount": "3000002406762009027632" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000", + "tokenAmount": "1500001203381004513816" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000", + "tokenAmount": "750000601690502256908" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000", + "tokenAmount": "375000300845251128454" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000", + "tokenAmount": "187500150422625564227" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000", + "tokenAmount": "5859379700707048882" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000", + "initialPriceTokenAmount": "10000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000", + "tokenAmount": "20000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000", + "tokenAmount": "18660674801325196320886" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000", + "tokenAmount": "17411025233975967307506" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000", + "tokenAmount": "14142146969315865725336" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000", + "tokenAmount": "10000008022540030092109" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000", + "tokenAmount": "5000004011270015046054" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000", + "tokenAmount": "2500002005635007523027" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000", + "tokenAmount": "1250001002817503761513" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000", + "tokenAmount": "625000501408751880756" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000", + "tokenAmount": "19531265669023496273" + } + ] + }, + { + "initialPriceEthAmount": "10000000000000000000", + "initialPriceTokenAmount": "100", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "10000000000000000000", + "tokenAmount": "200" + }, + { + "timestamp": "86400", + "ethAmount": "10000000000000000000", + "tokenAmount": "186" + }, + { + "timestamp": "172800", + "ethAmount": "10000000000000000000", + "tokenAmount": "174" + }, + { + "timestamp": "432000", + "ethAmount": "10000000000000000000", + "tokenAmount": "141" + }, + { + "timestamp": "864000", + "ethAmount": "10000000000000000000", + "tokenAmount": "100" + }, + { + "timestamp": "1728000", + "ethAmount": "10000000000000000000", + "tokenAmount": "50" + }, + { + "timestamp": "2592000", + "ethAmount": "10000000000000000000", + "tokenAmount": "25" + }, + { + "timestamp": "3456000", + "ethAmount": "10000000000000000000", + "tokenAmount": "12" + }, + { + "timestamp": "4320000", + "ethAmount": "10000000000000000000", + "tokenAmount": "6" + }, + { + "timestamp": "8640000", + "ethAmount": "10000000000000000000", + "tokenAmount": "0" + } + ] + }, + { + "initialPriceEthAmount": "10000000000000000000", + "initialPriceTokenAmount": "1000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "10000000000000000000", + "tokenAmount": "2000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "10000000000000000000", + "tokenAmount": "1866067480132519632" + }, + { + "timestamp": "172800", + "ethAmount": "10000000000000000000", + "tokenAmount": "1741102523397596730" + }, + { + "timestamp": "432000", + "ethAmount": "10000000000000000000", + "tokenAmount": "1414214696931586572" + }, + { + "timestamp": "864000", + "ethAmount": "10000000000000000000", + "tokenAmount": "1000000802254003009" + }, + { + "timestamp": "1728000", + "ethAmount": "10000000000000000000", + "tokenAmount": "500000401127001504" + }, + { + "timestamp": "2592000", + "ethAmount": "10000000000000000000", + "tokenAmount": "250000200563500752" + }, + { + "timestamp": "3456000", + "ethAmount": "10000000000000000000", + "tokenAmount": "125000100281750376" + }, + { + "timestamp": "4320000", + "ethAmount": "10000000000000000000", + "tokenAmount": "62500050140875188" + }, + { + "timestamp": "8640000", + "ethAmount": "10000000000000000000", + "tokenAmount": "1953126566902349" + } + ] + }, + { + "initialPriceEthAmount": "10000000000000000000", + "initialPriceTokenAmount": "10000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "10000000000000000000", + "tokenAmount": "20000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "10000000000000000000", + "tokenAmount": "18660674801325196320" + }, + { + "timestamp": "172800", + "ethAmount": "10000000000000000000", + "tokenAmount": "17411025233975967307" + }, + { + "timestamp": "432000", + "ethAmount": "10000000000000000000", + "tokenAmount": "14142146969315865725" + }, + { + "timestamp": "864000", + "ethAmount": "10000000000000000000", + "tokenAmount": "10000008022540030092" + }, + { + "timestamp": "1728000", + "ethAmount": "10000000000000000000", + "tokenAmount": "5000004011270015046" + }, + { + "timestamp": "2592000", + "ethAmount": "10000000000000000000", + "tokenAmount": "2500002005635007523" + }, + { + "timestamp": "3456000", + "ethAmount": "10000000000000000000", + "tokenAmount": "1250001002817503761" + }, + { + "timestamp": "4320000", + "ethAmount": "10000000000000000000", + "tokenAmount": "625000501408751880" + }, + { + "timestamp": "8640000", + "ethAmount": "10000000000000000000", + "tokenAmount": "19531265669023496" + } + ] + }, + { + "initialPriceEthAmount": "10000000000000000000", + "initialPriceTokenAmount": "100000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "10000000000000000000", + "tokenAmount": "200000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "10000000000000000000", + "tokenAmount": "186606748013251963208" + }, + { + "timestamp": "172800", + "ethAmount": "10000000000000000000", + "tokenAmount": "174110252339759673075" + }, + { + "timestamp": "432000", + "ethAmount": "10000000000000000000", + "tokenAmount": "141421469693158657253" + }, + { + "timestamp": "864000", + "ethAmount": "10000000000000000000", + "tokenAmount": "100000080225400300921" + }, + { + "timestamp": "1728000", + "ethAmount": "10000000000000000000", + "tokenAmount": "50000040112700150460" + }, + { + "timestamp": "2592000", + "ethAmount": "10000000000000000000", + "tokenAmount": "25000020056350075230" + }, + { + "timestamp": "3456000", + "ethAmount": "10000000000000000000", + "tokenAmount": "12500010028175037615" + }, + { + "timestamp": "4320000", + "ethAmount": "10000000000000000000", + "tokenAmount": "6250005014087518807" + }, + { + "timestamp": "8640000", + "ethAmount": "10000000000000000000", + "tokenAmount": "195312656690234962" + } + ] + }, + { + "initialPriceEthAmount": "10000000000000000000", + "initialPriceTokenAmount": "1000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "10000000000000000000", + "tokenAmount": "2000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "10000000000000000000", + "tokenAmount": "1866067480132519632088" + }, + { + "timestamp": "172800", + "ethAmount": "10000000000000000000", + "tokenAmount": "1741102523397596730750" + }, + { + "timestamp": "432000", + "ethAmount": "10000000000000000000", + "tokenAmount": "1414214696931586572533" + }, + { + "timestamp": "864000", + "ethAmount": "10000000000000000000", + "tokenAmount": "1000000802254003009210" + }, + { + "timestamp": "1728000", + "ethAmount": "10000000000000000000", + "tokenAmount": "500000401127001504605" + }, + { + "timestamp": "2592000", + "ethAmount": "10000000000000000000", + "tokenAmount": "250000200563500752302" + }, + { + "timestamp": "3456000", + "ethAmount": "10000000000000000000", + "tokenAmount": "125000100281750376151" + }, + { + "timestamp": "4320000", + "ethAmount": "10000000000000000000", + "tokenAmount": "62500050140875188075" + }, + { + "timestamp": "8640000", + "ethAmount": "10000000000000000000", + "tokenAmount": "1953126566902349627" + } + ] + }, + { + "initialPriceEthAmount": "10000000000000000000", + "initialPriceTokenAmount": "1200000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "10000000000000000000", + "tokenAmount": "2400000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "10000000000000000000", + "tokenAmount": "2239280976159023558506" + }, + { + "timestamp": "172800", + "ethAmount": "10000000000000000000", + "tokenAmount": "2089323028077116076900" + }, + { + "timestamp": "432000", + "ethAmount": "10000000000000000000", + "tokenAmount": "1697057636317903887040" + }, + { + "timestamp": "864000", + "ethAmount": "10000000000000000000", + "tokenAmount": "1200000962704803611053" + }, + { + "timestamp": "1728000", + "ethAmount": "10000000000000000000", + "tokenAmount": "600000481352401805526" + }, + { + "timestamp": "2592000", + "ethAmount": "10000000000000000000", + "tokenAmount": "300000240676200902763" + }, + { + "timestamp": "3456000", + "ethAmount": "10000000000000000000", + "tokenAmount": "150000120338100451381" + }, + { + "timestamp": "4320000", + "ethAmount": "10000000000000000000", + "tokenAmount": "75000060169050225690" + }, + { + "timestamp": "8640000", + "ethAmount": "10000000000000000000", + "tokenAmount": "2343751880282819552" + } + ] + }, + { + "initialPriceEthAmount": "10000000000000000000", + "initialPriceTokenAmount": "1500000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "10000000000000000000", + "tokenAmount": "3000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "10000000000000000000", + "tokenAmount": "2799101220198779448133" + }, + { + "timestamp": "172800", + "ethAmount": "10000000000000000000", + "tokenAmount": "2611653785096395096126" + }, + { + "timestamp": "432000", + "ethAmount": "10000000000000000000", + "tokenAmount": "2121322045397379858800" + }, + { + "timestamp": "864000", + "ethAmount": "10000000000000000000", + "tokenAmount": "1500001203381004513816" + }, + { + "timestamp": "1728000", + "ethAmount": "10000000000000000000", + "tokenAmount": "750000601690502256908" + }, + { + "timestamp": "2592000", + "ethAmount": "10000000000000000000", + "tokenAmount": "375000300845251128454" + }, + { + "timestamp": "3456000", + "ethAmount": "10000000000000000000", + "tokenAmount": "187500150422625564227" + }, + { + "timestamp": "4320000", + "ethAmount": "10000000000000000000", + "tokenAmount": "93750075211312782113" + }, + { + "timestamp": "8640000", + "ethAmount": "10000000000000000000", + "tokenAmount": "2929689850353524441" + } + ] + }, + { + "initialPriceEthAmount": "10000000000000000000", + "initialPriceTokenAmount": "2000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "10000000000000000000", + "tokenAmount": "4000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "10000000000000000000", + "tokenAmount": "3732134960265039264177" + }, + { + "timestamp": "172800", + "ethAmount": "10000000000000000000", + "tokenAmount": "3482205046795193461501" + }, + { + "timestamp": "432000", + "ethAmount": "10000000000000000000", + "tokenAmount": "2828429393863173145067" + }, + { + "timestamp": "864000", + "ethAmount": "10000000000000000000", + "tokenAmount": "2000001604508006018421" + }, + { + "timestamp": "1728000", + "ethAmount": "10000000000000000000", + "tokenAmount": "1000000802254003009210" + }, + { + "timestamp": "2592000", + "ethAmount": "10000000000000000000", + "tokenAmount": "500000401127001504605" + }, + { + "timestamp": "3456000", + "ethAmount": "10000000000000000000", + "tokenAmount": "250000200563500752302" + }, + { + "timestamp": "4320000", + "ethAmount": "10000000000000000000", + "tokenAmount": "125000100281750376151" + }, + { + "timestamp": "8640000", + "ethAmount": "10000000000000000000", + "tokenAmount": "3906253133804699254" + } + ] + }, + { + "initialPriceEthAmount": "10000000000000000000", + "initialPriceTokenAmount": "2400000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "10000000000000000000", + "tokenAmount": "4800000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "10000000000000000000", + "tokenAmount": "4478561952318047117012" + }, + { + "timestamp": "172800", + "ethAmount": "10000000000000000000", + "tokenAmount": "4178646056154232153801" + }, + { + "timestamp": "432000", + "ethAmount": "10000000000000000000", + "tokenAmount": "3394115272635807774080" + }, + { + "timestamp": "864000", + "ethAmount": "10000000000000000000", + "tokenAmount": "2400001925409607222106" + }, + { + "timestamp": "1728000", + "ethAmount": "10000000000000000000", + "tokenAmount": "1200000962704803611053" + }, + { + "timestamp": "2592000", + "ethAmount": "10000000000000000000", + "tokenAmount": "600000481352401805526" + }, + { + "timestamp": "3456000", + "ethAmount": "10000000000000000000", + "tokenAmount": "300000240676200902763" + }, + { + "timestamp": "4320000", + "ethAmount": "10000000000000000000", + "tokenAmount": "150000120338100451381" + }, + { + "timestamp": "8640000", + "ethAmount": "10000000000000000000", + "tokenAmount": "4687503760565639105" + } + ] + }, + { + "initialPriceEthAmount": "10000000000000000000", + "initialPriceTokenAmount": "3000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "10000000000000000000", + "tokenAmount": "6000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "10000000000000000000", + "tokenAmount": "5598202440397558896266" + }, + { + "timestamp": "172800", + "ethAmount": "10000000000000000000", + "tokenAmount": "5223307570192790192252" + }, + { + "timestamp": "432000", + "ethAmount": "10000000000000000000", + "tokenAmount": "4242644090794759717600" + }, + { + "timestamp": "864000", + "ethAmount": "10000000000000000000", + "tokenAmount": "3000002406762009027632" + }, + { + "timestamp": "1728000", + "ethAmount": "10000000000000000000", + "tokenAmount": "1500001203381004513816" + }, + { + "timestamp": "2592000", + "ethAmount": "10000000000000000000", + "tokenAmount": "750000601690502256908" + }, + { + "timestamp": "3456000", + "ethAmount": "10000000000000000000", + "tokenAmount": "375000300845251128454" + }, + { + "timestamp": "4320000", + "ethAmount": "10000000000000000000", + "tokenAmount": "187500150422625564227" + }, + { + "timestamp": "8640000", + "ethAmount": "10000000000000000000", + "tokenAmount": "5859379700707048882" + } + ] + }, + { + "initialPriceEthAmount": "10000000000000000000", + "initialPriceTokenAmount": "10000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "10000000000000000000", + "tokenAmount": "20000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "10000000000000000000", + "tokenAmount": "18660674801325196320886" + }, + { + "timestamp": "172800", + "ethAmount": "10000000000000000000", + "tokenAmount": "17411025233975967307506" + }, + { + "timestamp": "432000", + "ethAmount": "10000000000000000000", + "tokenAmount": "14142146969315865725336" + }, + { + "timestamp": "864000", + "ethAmount": "10000000000000000000", + "tokenAmount": "10000008022540030092109" + }, + { + "timestamp": "1728000", + "ethAmount": "10000000000000000000", + "tokenAmount": "5000004011270015046054" + }, + { + "timestamp": "2592000", + "ethAmount": "10000000000000000000", + "tokenAmount": "2500002005635007523027" + }, + { + "timestamp": "3456000", + "ethAmount": "10000000000000000000", + "tokenAmount": "1250001002817503761513" + }, + { + "timestamp": "4320000", + "ethAmount": "10000000000000000000", + "tokenAmount": "625000501408751880756" + }, + { + "timestamp": "8640000", + "ethAmount": "10000000000000000000", + "tokenAmount": "19531265669023496273" + } + ] + }, + { + "initialPriceEthAmount": "100000000000000000000", + "initialPriceTokenAmount": "100", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100000000000000000000", + "tokenAmount": "200" + }, + { + "timestamp": "86400", + "ethAmount": "100000000000000000000", + "tokenAmount": "186" + }, + { + "timestamp": "172800", + "ethAmount": "100000000000000000000", + "tokenAmount": "174" + }, + { + "timestamp": "432000", + "ethAmount": "100000000000000000000", + "tokenAmount": "141" + }, + { + "timestamp": "864000", + "ethAmount": "100000000000000000000", + "tokenAmount": "100" + }, + { + "timestamp": "1728000", + "ethAmount": "100000000000000000000", + "tokenAmount": "50" + }, + { + "timestamp": "2592000", + "ethAmount": "100000000000000000000", + "tokenAmount": "25" + }, + { + "timestamp": "3456000", + "ethAmount": "100000000000000000000", + "tokenAmount": "12" + }, + { + "timestamp": "4320000", + "ethAmount": "100000000000000000000", + "tokenAmount": "6" + }, + { + "timestamp": "8640000", + "ethAmount": "100000000000000000000", + "tokenAmount": "0" + } + ] + }, + { + "initialPriceEthAmount": "100000000000000000000", + "initialPriceTokenAmount": "1000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100000000000000000000", + "tokenAmount": "2000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100000000000000000000", + "tokenAmount": "1866067480132519632" + }, + { + "timestamp": "172800", + "ethAmount": "100000000000000000000", + "tokenAmount": "1741102523397596730" + }, + { + "timestamp": "432000", + "ethAmount": "100000000000000000000", + "tokenAmount": "1414214696931586572" + }, + { + "timestamp": "864000", + "ethAmount": "100000000000000000000", + "tokenAmount": "1000000802254003009" + }, + { + "timestamp": "1728000", + "ethAmount": "100000000000000000000", + "tokenAmount": "500000401127001504" + }, + { + "timestamp": "2592000", + "ethAmount": "100000000000000000000", + "tokenAmount": "250000200563500752" + }, + { + "timestamp": "3456000", + "ethAmount": "100000000000000000000", + "tokenAmount": "125000100281750376" + }, + { + "timestamp": "4320000", + "ethAmount": "100000000000000000000", + "tokenAmount": "62500050140875188" + }, + { + "timestamp": "8640000", + "ethAmount": "100000000000000000000", + "tokenAmount": "1953126566902349" + } + ] + }, + { + "initialPriceEthAmount": "100000000000000000000", + "initialPriceTokenAmount": "10000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100000000000000000000", + "tokenAmount": "20000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100000000000000000000", + "tokenAmount": "18660674801325196320" + }, + { + "timestamp": "172800", + "ethAmount": "100000000000000000000", + "tokenAmount": "17411025233975967307" + }, + { + "timestamp": "432000", + "ethAmount": "100000000000000000000", + "tokenAmount": "14142146969315865725" + }, + { + "timestamp": "864000", + "ethAmount": "100000000000000000000", + "tokenAmount": "10000008022540030092" + }, + { + "timestamp": "1728000", + "ethAmount": "100000000000000000000", + "tokenAmount": "5000004011270015046" + }, + { + "timestamp": "2592000", + "ethAmount": "100000000000000000000", + "tokenAmount": "2500002005635007523" + }, + { + "timestamp": "3456000", + "ethAmount": "100000000000000000000", + "tokenAmount": "1250001002817503761" + }, + { + "timestamp": "4320000", + "ethAmount": "100000000000000000000", + "tokenAmount": "625000501408751880" + }, + { + "timestamp": "8640000", + "ethAmount": "100000000000000000000", + "tokenAmount": "19531265669023496" + } + ] + }, + { + "initialPriceEthAmount": "100000000000000000000", + "initialPriceTokenAmount": "100000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100000000000000000000", + "tokenAmount": "200000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100000000000000000000", + "tokenAmount": "186606748013251963208" + }, + { + "timestamp": "172800", + "ethAmount": "100000000000000000000", + "tokenAmount": "174110252339759673075" + }, + { + "timestamp": "432000", + "ethAmount": "100000000000000000000", + "tokenAmount": "141421469693158657253" + }, + { + "timestamp": "864000", + "ethAmount": "100000000000000000000", + "tokenAmount": "100000080225400300921" + }, + { + "timestamp": "1728000", + "ethAmount": "100000000000000000000", + "tokenAmount": "50000040112700150460" + }, + { + "timestamp": "2592000", + "ethAmount": "100000000000000000000", + "tokenAmount": "25000020056350075230" + }, + { + "timestamp": "3456000", + "ethAmount": "100000000000000000000", + "tokenAmount": "12500010028175037615" + }, + { + "timestamp": "4320000", + "ethAmount": "100000000000000000000", + "tokenAmount": "6250005014087518807" + }, + { + "timestamp": "8640000", + "ethAmount": "100000000000000000000", + "tokenAmount": "195312656690234962" + } + ] + }, + { + "initialPriceEthAmount": "100000000000000000000", + "initialPriceTokenAmount": "1000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100000000000000000000", + "tokenAmount": "2000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100000000000000000000", + "tokenAmount": "1866067480132519632088" + }, + { + "timestamp": "172800", + "ethAmount": "100000000000000000000", + "tokenAmount": "1741102523397596730750" + }, + { + "timestamp": "432000", + "ethAmount": "100000000000000000000", + "tokenAmount": "1414214696931586572533" + }, + { + "timestamp": "864000", + "ethAmount": "100000000000000000000", + "tokenAmount": "1000000802254003009210" + }, + { + "timestamp": "1728000", + "ethAmount": "100000000000000000000", + "tokenAmount": "500000401127001504605" + }, + { + "timestamp": "2592000", + "ethAmount": "100000000000000000000", + "tokenAmount": "250000200563500752302" + }, + { + "timestamp": "3456000", + "ethAmount": "100000000000000000000", + "tokenAmount": "125000100281750376151" + }, + { + "timestamp": "4320000", + "ethAmount": "100000000000000000000", + "tokenAmount": "62500050140875188075" + }, + { + "timestamp": "8640000", + "ethAmount": "100000000000000000000", + "tokenAmount": "1953126566902349627" + } + ] + }, + { + "initialPriceEthAmount": "100000000000000000000", + "initialPriceTokenAmount": "1200000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100000000000000000000", + "tokenAmount": "2400000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100000000000000000000", + "tokenAmount": "2239280976159023558506" + }, + { + "timestamp": "172800", + "ethAmount": "100000000000000000000", + "tokenAmount": "2089323028077116076900" + }, + { + "timestamp": "432000", + "ethAmount": "100000000000000000000", + "tokenAmount": "1697057636317903887040" + }, + { + "timestamp": "864000", + "ethAmount": "100000000000000000000", + "tokenAmount": "1200000962704803611053" + }, + { + "timestamp": "1728000", + "ethAmount": "100000000000000000000", + "tokenAmount": "600000481352401805526" + }, + { + "timestamp": "2592000", + "ethAmount": "100000000000000000000", + "tokenAmount": "300000240676200902763" + }, + { + "timestamp": "3456000", + "ethAmount": "100000000000000000000", + "tokenAmount": "150000120338100451381" + }, + { + "timestamp": "4320000", + "ethAmount": "100000000000000000000", + "tokenAmount": "75000060169050225690" + }, + { + "timestamp": "8640000", + "ethAmount": "100000000000000000000", + "tokenAmount": "2343751880282819552" + } + ] + }, + { + "initialPriceEthAmount": "100000000000000000000", + "initialPriceTokenAmount": "1500000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100000000000000000000", + "tokenAmount": "3000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100000000000000000000", + "tokenAmount": "2799101220198779448133" + }, + { + "timestamp": "172800", + "ethAmount": "100000000000000000000", + "tokenAmount": "2611653785096395096126" + }, + { + "timestamp": "432000", + "ethAmount": "100000000000000000000", + "tokenAmount": "2121322045397379858800" + }, + { + "timestamp": "864000", + "ethAmount": "100000000000000000000", + "tokenAmount": "1500001203381004513816" + }, + { + "timestamp": "1728000", + "ethAmount": "100000000000000000000", + "tokenAmount": "750000601690502256908" + }, + { + "timestamp": "2592000", + "ethAmount": "100000000000000000000", + "tokenAmount": "375000300845251128454" + }, + { + "timestamp": "3456000", + "ethAmount": "100000000000000000000", + "tokenAmount": "187500150422625564227" + }, + { + "timestamp": "4320000", + "ethAmount": "100000000000000000000", + "tokenAmount": "93750075211312782113" + }, + { + "timestamp": "8640000", + "ethAmount": "100000000000000000000", + "tokenAmount": "2929689850353524441" + } + ] + }, + { + "initialPriceEthAmount": "100000000000000000000", + "initialPriceTokenAmount": "2000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100000000000000000000", + "tokenAmount": "4000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100000000000000000000", + "tokenAmount": "3732134960265039264177" + }, + { + "timestamp": "172800", + "ethAmount": "100000000000000000000", + "tokenAmount": "3482205046795193461501" + }, + { + "timestamp": "432000", + "ethAmount": "100000000000000000000", + "tokenAmount": "2828429393863173145067" + }, + { + "timestamp": "864000", + "ethAmount": "100000000000000000000", + "tokenAmount": "2000001604508006018421" + }, + { + "timestamp": "1728000", + "ethAmount": "100000000000000000000", + "tokenAmount": "1000000802254003009210" + }, + { + "timestamp": "2592000", + "ethAmount": "100000000000000000000", + "tokenAmount": "500000401127001504605" + }, + { + "timestamp": "3456000", + "ethAmount": "100000000000000000000", + "tokenAmount": "250000200563500752302" + }, + { + "timestamp": "4320000", + "ethAmount": "100000000000000000000", + "tokenAmount": "125000100281750376151" + }, + { + "timestamp": "8640000", + "ethAmount": "100000000000000000000", + "tokenAmount": "3906253133804699254" + } + ] + }, + { + "initialPriceEthAmount": "100000000000000000000", + "initialPriceTokenAmount": "2400000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100000000000000000000", + "tokenAmount": "4800000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100000000000000000000", + "tokenAmount": "4478561952318047117012" + }, + { + "timestamp": "172800", + "ethAmount": "100000000000000000000", + "tokenAmount": "4178646056154232153801" + }, + { + "timestamp": "432000", + "ethAmount": "100000000000000000000", + "tokenAmount": "3394115272635807774080" + }, + { + "timestamp": "864000", + "ethAmount": "100000000000000000000", + "tokenAmount": "2400001925409607222106" + }, + { + "timestamp": "1728000", + "ethAmount": "100000000000000000000", + "tokenAmount": "1200000962704803611053" + }, + { + "timestamp": "2592000", + "ethAmount": "100000000000000000000", + "tokenAmount": "600000481352401805526" + }, + { + "timestamp": "3456000", + "ethAmount": "100000000000000000000", + "tokenAmount": "300000240676200902763" + }, + { + "timestamp": "4320000", + "ethAmount": "100000000000000000000", + "tokenAmount": "150000120338100451381" + }, + { + "timestamp": "8640000", + "ethAmount": "100000000000000000000", + "tokenAmount": "4687503760565639105" + } + ] + }, + { + "initialPriceEthAmount": "100000000000000000000", + "initialPriceTokenAmount": "3000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100000000000000000000", + "tokenAmount": "6000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100000000000000000000", + "tokenAmount": "5598202440397558896266" + }, + { + "timestamp": "172800", + "ethAmount": "100000000000000000000", + "tokenAmount": "5223307570192790192252" + }, + { + "timestamp": "432000", + "ethAmount": "100000000000000000000", + "tokenAmount": "4242644090794759717600" + }, + { + "timestamp": "864000", + "ethAmount": "100000000000000000000", + "tokenAmount": "3000002406762009027632" + }, + { + "timestamp": "1728000", + "ethAmount": "100000000000000000000", + "tokenAmount": "1500001203381004513816" + }, + { + "timestamp": "2592000", + "ethAmount": "100000000000000000000", + "tokenAmount": "750000601690502256908" + }, + { + "timestamp": "3456000", + "ethAmount": "100000000000000000000", + "tokenAmount": "375000300845251128454" + }, + { + "timestamp": "4320000", + "ethAmount": "100000000000000000000", + "tokenAmount": "187500150422625564227" + }, + { + "timestamp": "8640000", + "ethAmount": "100000000000000000000", + "tokenAmount": "5859379700707048882" + } + ] + }, + { + "initialPriceEthAmount": "100000000000000000000", + "initialPriceTokenAmount": "10000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "100000000000000000000", + "tokenAmount": "20000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "100000000000000000000", + "tokenAmount": "18660674801325196320886" + }, + { + "timestamp": "172800", + "ethAmount": "100000000000000000000", + "tokenAmount": "17411025233975967307506" + }, + { + "timestamp": "432000", + "ethAmount": "100000000000000000000", + "tokenAmount": "14142146969315865725336" + }, + { + "timestamp": "864000", + "ethAmount": "100000000000000000000", + "tokenAmount": "10000008022540030092109" + }, + { + "timestamp": "1728000", + "ethAmount": "100000000000000000000", + "tokenAmount": "5000004011270015046054" + }, + { + "timestamp": "2592000", + "ethAmount": "100000000000000000000", + "tokenAmount": "2500002005635007523027" + }, + { + "timestamp": "3456000", + "ethAmount": "100000000000000000000", + "tokenAmount": "1250001002817503761513" + }, + { + "timestamp": "4320000", + "ethAmount": "100000000000000000000", + "tokenAmount": "625000501408751880756" + }, + { + "timestamp": "8640000", + "ethAmount": "100000000000000000000", + "tokenAmount": "19531265669023496273" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000000", + "initialPriceTokenAmount": "100", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000000", + "tokenAmount": "200" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000000", + "tokenAmount": "186" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000000", + "tokenAmount": "174" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "141" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "100" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "50" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "25" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "12" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "6" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "0" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000000", + "initialPriceTokenAmount": "1000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000000", + "tokenAmount": "2000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000000", + "tokenAmount": "1866067480132519632" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000000", + "tokenAmount": "1741102523397596730" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "1414214696931586572" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "1000000802254003009" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "500000401127001504" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "250000200563500752" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "125000100281750376" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "62500050140875188" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "1953126566902349" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000000", + "initialPriceTokenAmount": "10000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000000", + "tokenAmount": "20000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000000", + "tokenAmount": "18660674801325196320" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000000", + "tokenAmount": "17411025233975967307" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "14142146969315865725" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "10000008022540030092" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "5000004011270015046" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "2500002005635007523" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "1250001002817503761" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "625000501408751880" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "19531265669023496" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000000", + "initialPriceTokenAmount": "100000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000000", + "tokenAmount": "200000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000000", + "tokenAmount": "186606748013251963208" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000000", + "tokenAmount": "174110252339759673075" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "141421469693158657253" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "100000080225400300921" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "50000040112700150460" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "25000020056350075230" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "12500010028175037615" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "6250005014087518807" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "195312656690234962" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000000", + "initialPriceTokenAmount": "1000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000000", + "tokenAmount": "2000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000000", + "tokenAmount": "1866067480132519632088" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000000", + "tokenAmount": "1741102523397596730750" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "1414214696931586572533" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "1000000802254003009210" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "500000401127001504605" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "250000200563500752302" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "125000100281750376151" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "62500050140875188075" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "1953126566902349627" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000000", + "initialPriceTokenAmount": "1200000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000000", + "tokenAmount": "2400000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000000", + "tokenAmount": "2239280976159023558506" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000000", + "tokenAmount": "2089323028077116076900" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "1697057636317903887040" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "1200000962704803611053" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "600000481352401805526" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "300000240676200902763" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "150000120338100451381" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "75000060169050225690" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "2343751880282819552" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000000", + "initialPriceTokenAmount": "1500000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000000", + "tokenAmount": "3000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000000", + "tokenAmount": "2799101220198779448133" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000000", + "tokenAmount": "2611653785096395096126" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "2121322045397379858800" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "1500001203381004513816" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "750000601690502256908" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "375000300845251128454" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "187500150422625564227" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "93750075211312782113" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "2929689850353524441" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000000", + "initialPriceTokenAmount": "2000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000000", + "tokenAmount": "4000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000000", + "tokenAmount": "3732134960265039264177" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000000", + "tokenAmount": "3482205046795193461501" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "2828429393863173145067" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "2000001604508006018421" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "1000000802254003009210" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "500000401127001504605" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "250000200563500752302" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "125000100281750376151" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "3906253133804699254" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000000", + "initialPriceTokenAmount": "2400000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000000", + "tokenAmount": "4800000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000000", + "tokenAmount": "4478561952318047117012" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000000", + "tokenAmount": "4178646056154232153801" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "3394115272635807774080" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "2400001925409607222106" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "1200000962704803611053" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "600000481352401805526" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "300000240676200902763" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "150000120338100451381" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "4687503760565639105" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000000", + "initialPriceTokenAmount": "3000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000000", + "tokenAmount": "6000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000000", + "tokenAmount": "5598202440397558896266" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000000", + "tokenAmount": "5223307570192790192252" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "4242644090794759717600" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "3000002406762009027632" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "1500001203381004513816" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "750000601690502256908" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "375000300845251128454" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "187500150422625564227" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "5859379700707048882" + } + ] + }, + { + "initialPriceEthAmount": "1000000000000000000000", + "initialPriceTokenAmount": "10000000000000000000000", + "tokenPriceAtTimestamps": [ + { + "timestamp": "1", + "ethAmount": "1000000000000000000000", + "tokenAmount": "20000000000000000000000" + }, + { + "timestamp": "86400", + "ethAmount": "1000000000000000000000", + "tokenAmount": "18660674801325196320886" + }, + { + "timestamp": "172800", + "ethAmount": "1000000000000000000000", + "tokenAmount": "17411025233975967307506" + }, + { + "timestamp": "432000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "14142146969315865725336" + }, + { + "timestamp": "864000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "10000008022540030092109" + }, + { + "timestamp": "1728000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "5000004011270015046054" + }, + { + "timestamp": "2592000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "2500002005635007523027" + }, + { + "timestamp": "3456000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "1250001002817503761513" + }, + { + "timestamp": "4320000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "625000501408751880756" + }, + { + "timestamp": "8640000", + "ethAmount": "1000000000000000000000", + "tokenAmount": "19531265669023496273" + } + ] + } + ] +} From f105c11d575acbce3792d3bba0b83c0feb5ed0e9 Mon Sep 17 00:00:00 2001 From: Ivan Zhelyazkov Date: Wed, 15 Nov 2023 18:36:54 +0200 Subject: [PATCH 03/10] carbon pol eth conversion - deployment scripts --- deploy/scripts/0009-CarbonPOL-upgrade.ts | 17 ++++++++++++ deploy/tests/0009-carbon-pol.ts | 33 ++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 deploy/scripts/0009-CarbonPOL-upgrade.ts create mode 100644 deploy/tests/0009-carbon-pol.ts diff --git a/deploy/scripts/0009-CarbonPOL-upgrade.ts b/deploy/scripts/0009-CarbonPOL-upgrade.ts new file mode 100644 index 00000000..27fbee08 --- /dev/null +++ b/deploy/scripts/0009-CarbonPOL-upgrade.ts @@ -0,0 +1,17 @@ +import { upgradeProxy, InstanceName, setDeploymentMetadata } from '../../utils/Deploy'; +import { DeployFunction } from 'hardhat-deploy/types'; +import { HardhatRuntimeEnvironment } from 'hardhat/types'; + +const func: DeployFunction = async ({ getNamedAccounts }: HardhatRuntimeEnvironment) => { + const { deployer, bnt } = await getNamedAccounts(); + + await upgradeProxy({ + name: InstanceName.CarbonPOL, + from: deployer, + args: [bnt] + }); + + return true; +}; + +export default setDeploymentMetadata(__filename, func); diff --git a/deploy/tests/0009-carbon-pol.ts b/deploy/tests/0009-carbon-pol.ts new file mode 100644 index 00000000..0924b727 --- /dev/null +++ b/deploy/tests/0009-carbon-pol.ts @@ -0,0 +1,33 @@ +import { CarbonPOL, ProxyAdmin } from '../../components/Contracts'; +import { DeployedContracts } from '../../utils/Deploy'; +import { describeDeployment } from '../../utils/helpers/Deploy'; +import { expect } from 'chai'; +import { ethers } from 'hardhat'; + +describeDeployment(__filename, () => { + let proxyAdmin: ProxyAdmin; + let carbonPOL: CarbonPOL; + + beforeEach(async () => { + proxyAdmin = await DeployedContracts.ProxyAdmin.deployed(); + carbonPOL = await DeployedContracts.CarbonPOL.deployed(); + }); + + it('should deploy and configure the carbon pol contract', async () => { + expect(await proxyAdmin.getProxyAdmin(carbonPOL.address)).to.equal(proxyAdmin.address); + expect(await carbonPOL.version()).to.equal(2); + + // check market price multiply is configured correctly + expect(await carbonPOL.marketPriceMultiply()).to.equal(2); + // check price decay half-life is configured correctly + expect(await carbonPOL.priceDecayHalfLife()).to.equal(864000); + }); + + it('carbon pol implementation should be initialized', async () => { + const implementationAddress = await proxyAdmin.getProxyImplementation(carbonPOL.address); + const carbonPOLImpl: CarbonPOL = await ethers.getContractAt('CarbonPOL', implementationAddress); + // hardcoding gas limit to avoid gas estimation attempts (which get rejected instead of reverted) + const tx = await carbonPOLImpl.initialize({ gasLimit: 6000000 }); + await expect(tx.wait()).to.be.reverted; + }); +}); From 4a87decae276a926837cd093d3c094d2ce4fa56c Mon Sep 17 00:00:00 2001 From: Ivan Zhelyazkov Date: Wed, 15 Nov 2023 19:45:37 +0200 Subject: [PATCH 04/10] minor comment fix --- contracts/pol/interfaces/ICarbonPOL.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/pol/interfaces/ICarbonPOL.sol b/contracts/pol/interfaces/ICarbonPOL.sol index c62d556c..b0b80702 100644 --- a/contracts/pol/interfaces/ICarbonPOL.sol +++ b/contracts/pol/interfaces/ICarbonPOL.sol @@ -101,7 +101,7 @@ interface ICarbonPOL is IUpgradeable { /** * @notice trades ETH for *amount* of token based on the current token price (trade by target amount) - * @notice if token == ETH, trades *amount* of ETH for BNT based on the current token price (trade by source amount) + * @notice if token == ETH, trades *amount* of BNT for ETH based on the current token price (trade by target amount) */ function trade(Token token, uint128 amount) external payable; } From c43e5e777d4258d3854c7a3e7b2d9f46b6e6d6ec Mon Sep 17 00:00:00 2001 From: Ivan Zhelyazkov Date: Wed, 15 Nov 2023 19:49:00 +0200 Subject: [PATCH 05/10] minor test fix --- test/forge/POLTestCaseParser.t.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/forge/POLTestCaseParser.t.sol b/test/forge/POLTestCaseParser.t.sol index b83d2910..69718298 100644 --- a/test/forge/POLTestCaseParser.t.sol +++ b/test/forge/POLTestCaseParser.t.sol @@ -33,7 +33,7 @@ contract POLTestCaseParser is Test { */ function getTestCases(bool forNativeToken) public returns (TestCase[] memory testCases) { string memory path = "./test/helpers/data/"; - string memory filename = forNativeToken ? "polPricingTestDataETH.json" : "polPricingTestData.json"; + string memory filename = forNativeToken ? "polPricingTestDataEth.json" : "polPricingTestData.json"; path = string.concat(path, filename); string memory json = vm.readFile(path); testCases = parseTestCases(json, "testCase"); From 1ca572bf8ebaf3815c35ac703db9c08d0dcb9c66 Mon Sep 17 00:00:00 2001 From: Ivan Zhelyazkov Date: Thu, 16 Nov 2023 10:15:43 +0200 Subject: [PATCH 06/10] carbon pol eth conversion - review fixes --- contracts/pol/CarbonPOL.sol | 5 +++-- contracts/pol/interfaces/ICarbonPOL.sol | 6 +++--- test/forge/CarbonPOL.t.sol | 11 ++++++++++- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/contracts/pol/CarbonPOL.sol b/contracts/pol/CarbonPOL.sol index 161137a0..0e374c1d 100644 --- a/contracts/pol/CarbonPOL.sol +++ b/contracts/pol/CarbonPOL.sol @@ -45,8 +45,9 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils /** * @dev used to initialize the implementation */ - constructor(Token bntInit) { - _bnt = bntInit; + constructor(Token initBnt) { + _validAddress(Token.unwrap(initBnt)); + _bnt = initBnt; // initialize implementation initialize(); } diff --git a/contracts/pol/interfaces/ICarbonPOL.sol b/contracts/pol/interfaces/ICarbonPOL.sol index b0b80702..d69eca40 100644 --- a/contracts/pol/interfaces/ICarbonPOL.sol +++ b/contracts/pol/interfaces/ICarbonPOL.sol @@ -82,14 +82,14 @@ interface ICarbonPOL is IUpgradeable { function tradingEnabled(Token token) external view returns (bool); /** - * @notice returns the expected trade output (tokens received) given an eth amount sent for a token - * @notice if token == ETH, return how much bnt will be sent given an eth amount received + * @notice returns the expected trade output (tokens received) given an ETH amount sent for a token + * @notice if token == ETH, return how much BNT will be sent given an ETH amount received */ function expectedTradeReturn(Token token, uint128 ethAmount) external view returns (uint128 tokenAmount); /** * @notice returns the expected trade input (how much eth to send) given a token amount received - * @notice if token == ETH, return how much eth will be received given a bnt amount sent + * @notice if token == ETH, return how much ETH will be received given a BNT amount sent */ function expectedTradeInput(Token token, uint128 tokenAmount) external view returns (uint128 ethAmount); diff --git a/test/forge/CarbonPOL.t.sol b/test/forge/CarbonPOL.t.sol index b1c3ac6f..8423a34f 100644 --- a/test/forge/CarbonPOL.t.sol +++ b/test/forge/CarbonPOL.t.sol @@ -6,11 +6,12 @@ import { Address } from "@openzeppelin/contracts/utils/Address.sol"; import { TestFixture } from "./TestFixture.t.sol"; import { POLTestCaseParser } from "./POLTestCaseParser.t.sol"; -import { AccessDenied, ZeroValue } from "../../contracts/utility/Utils.sol"; +import { AccessDenied, ZeroValue, InvalidAddress } from "../../contracts/utility/Utils.sol"; import { Token, NATIVE_TOKEN } from "../../contracts/token/Token.sol"; import { TestReenterCarbonPOL } from "../../contracts/helpers/TestReenterCarbonPOL.sol"; import { ICarbonPOL } from "../../contracts/pol/interfaces/ICarbonPOL.sol"; +import { CarbonPOL } from "../../contracts/pol/CarbonPOL.sol"; contract CarbonPOLTest is TestFixture { using Address for address payable; @@ -89,6 +90,14 @@ contract CarbonPOLTest is TestFixture { carbonPOL.initialize(); } + /** + * @dev test should revert when deploying CarbonPOL with an invalid bnt address + */ + function testShouldRevertWhenDeployingWithInvalidBNTAddress() public { + vm.expectRevert(InvalidAddress.selector); + new CarbonPOL(Token.wrap(address(0))); + } + /** * @dev market price multiply tests */ From 4c45d5a1854dd14fd0c1fc8c2a0ad1ac0222646e Mon Sep 17 00:00:00 2001 From: Ivan Zhelyazkov Date: Thu, 16 Nov 2023 12:02:33 +0200 Subject: [PATCH 07/10] carbon pol eth conversion - burn bnt directly --- contracts/helpers/TestBNT.sol | 12 ++++++++++++ contracts/pol/CarbonPOL.sol | 4 ++-- test/forge/CarbonPOL.t.sol | 15 +++++++++------ 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/contracts/helpers/TestBNT.sol b/contracts/helpers/TestBNT.sol index 14172ff6..031f509d 100644 --- a/contracts/helpers/TestBNT.sol +++ b/contracts/helpers/TestBNT.sol @@ -29,6 +29,18 @@ contract TestBNT is TestERC20Token { return true; } + function transferFrom(address _from, address _to, uint256 _value) public override(ERC20) returns (bool success) { + assert(super.transferFrom(_from, _to, _value)); + + // transferring to the contract address destroys tokens + if (_to == address(this)) { + _burn(address(this), _value); + emit Destruction(_value); + } + + return true; + } + function issue(address recipient, uint256 amount) external { _mint(recipient, amount); } diff --git a/contracts/pol/CarbonPOL.sol b/contracts/pol/CarbonPOL.sol index 0e374c1d..9311a959 100644 --- a/contracts/pol/CarbonPOL.sol +++ b/contracts/pol/CarbonPOL.sol @@ -328,8 +328,8 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils if (ethAmountRequired == 0) { revert InvalidTrade(); } - // transfer the tokens from the user - _bnt.safeTransferFrom(msg.sender, address(this), amount); + // transfer the tokens from the user to the bnt address (burn them directly) + _bnt.safeTransferFrom(msg.sender, Token.unwrap(_bnt), amount); // transfer the eth to the user payable(msg.sender).sendValue(ethAmountRequired); diff --git a/test/forge/CarbonPOL.t.sol b/test/forge/CarbonPOL.t.sol index 8423a34f..6a37b1f5 100644 --- a/test/forge/CarbonPOL.t.sol +++ b/test/forge/CarbonPOL.t.sol @@ -7,7 +7,7 @@ import { TestFixture } from "./TestFixture.t.sol"; import { POLTestCaseParser } from "./POLTestCaseParser.t.sol"; import { AccessDenied, ZeroValue, InvalidAddress } from "../../contracts/utility/Utils.sol"; -import { Token, NATIVE_TOKEN } from "../../contracts/token/Token.sol"; +import { Token, toERC20, NATIVE_TOKEN } from "../../contracts/token/Token.sol"; import { TestReenterCarbonPOL } from "../../contracts/helpers/TestReenterCarbonPOL.sol"; import { ICarbonPOL } from "../../contracts/pol/interfaces/ICarbonPOL.sol"; @@ -811,8 +811,8 @@ contract CarbonPOLTest is TestFixture { vm.stopPrank(); } - /// @dev test trading should increase the contract's bnt balance - function testTradingETHShouldIncreaseContractBNTBalance() public { + /// @dev test trading eth should burn bnt + function testTradingETHShouldBurnBNT() public { // enable trading and set price for the native token vm.prank(admin); Token token = NATIVE_TOKEN; @@ -830,7 +830,8 @@ contract CarbonPOLTest is TestFixture { uint128 tradeAmount = 1000 * 1e18; uint128 expectedTradeInput = carbonPOL.expectedTradeInput(token, tradeAmount); - uint256 bntBalanceBefore = bnt.balanceOf(address(carbonPOL)); + uint256 bntBalanceBefore = bnt.balanceOf(user1); + uint256 bntSupplyBefore = toERC20(bnt).totalSupply(); // approve bnt for eth -> bnt trades bnt.safeApprove(address(carbonPOL), tradeAmount); @@ -838,9 +839,11 @@ contract CarbonPOLTest is TestFixture { // trade carbonPOL.trade{ value: expectedTradeInput }(token, tradeAmount); - uint256 bntBalanceAfter = bnt.balanceOf(address(carbonPOL)); + uint256 bntBalanceAfter = bnt.balanceOf(user1); + uint256 bntSupplyAfter = toERC20(bnt).totalSupply(); - assertEq(bntBalanceAfter - bntBalanceBefore, tradeAmount); + assertEq(bntBalanceBefore - bntBalanceAfter, tradeAmount); + assertEq(bntSupplyBefore - bntSupplyAfter, tradeAmount); vm.stopPrank(); } From e9b3fde2f6c114c0f938588b3f7bf77890940893 Mon Sep 17 00:00:00 2001 From: Ivan Zhelyazkov Date: Thu, 16 Nov 2023 22:09:45 +0200 Subject: [PATCH 08/10] carbon pol eth conversion - simplify logic --- contracts/pol/CarbonPOL.sol | 67 ++--- contracts/pol/interfaces/ICarbonPOL.sol | 14 +- test/forge/CarbonPOL.t.sol | 338 +++++++----------------- test/forge/POLTestCaseParser.t.sol | 4 +- 4 files changed, 136 insertions(+), 287 deletions(-) diff --git a/contracts/pol/CarbonPOL.sol b/contracts/pol/CarbonPOL.sol index 9311a959..30687801 100644 --- a/contracts/pol/CarbonPOL.sol +++ b/contracts/pol/CarbonPOL.sol @@ -217,19 +217,19 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils /** * @inheritdoc ICarbonPOL */ - function expectedTradeReturn(Token token, uint128 ethAmount) external view validToken(token) returns (uint128) { + function expectedTradeReturn(Token token, uint128 tradeInput) external view validToken(token) returns (uint128) { Price memory currentPrice = tokenPrice(token); // revert if price is not valid _validPrice(currentPrice); - // multiply the token amount by the eth amount / total eth amount ratio to get the actual tokens received - uint128 tokenAmount = MathEx.mulDivF(currentPrice.tokenAmount, ethAmount, currentPrice.ethAmount).toUint128(); - // check available balance - uint128 amountToCheck = token == NATIVE_TOKEN ? ethAmount : tokenAmount; + // calculate the trade return based on the current price and token + uint128 tradeReturn = MathEx + .mulDivF(currentPrice.targetAmount, tradeInput, currentPrice.sourceAmount) + .toUint128(); // revert if not enough token balance - if (amountToCheck > token.balanceOf(address(this))) { + if (tradeReturn > token.balanceOf(address(this))) { revert InsufficientTokenBalance(); } - return tokenAmount; + return tradeReturn; } /** @@ -237,19 +237,14 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils */ function expectedTradeInput(Token token, uint128 tokenAmount) public view validToken(token) returns (uint128) { // revert if not enough token balance for trade - if (token != NATIVE_TOKEN && tokenAmount > token.balanceOf(address(this))) { + if (tokenAmount > token.balanceOf(address(this))) { revert InsufficientTokenBalance(); } Price memory currentPrice = tokenPrice(token); // revert if current price is not valid _validPrice(currentPrice); - // multiply the eth amount by the token amount / total token amount ratio to get the actual eth to send - uint128 ethAmount = MathEx.mulDivF(currentPrice.ethAmount, tokenAmount, currentPrice.tokenAmount).toUint128(); - // check if enough token balance - if (token == NATIVE_TOKEN && ethAmount > token.balanceOf(address(this))) { - revert InsufficientTokenBalance(); - } - return ethAmount; + // calculate the trade input based on the current price + return MathEx.mulDivF(currentPrice.sourceAmount, tokenAmount, currentPrice.targetAmount).toUint128(); } /** @@ -266,18 +261,12 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils uint32 timeElapsed = uint32(block.timestamp) - tradingStartTime; // get initial price as set by enableTrading Price memory price = _initialPrice[token]; - // get the price token or eth amount for applying the exp decay formula to - uint128 amount = token == NATIVE_TOKEN ? price.tokenAmount : price.ethAmount; // calculate the actual price by multiplying the amount by the factor - amount *= _marketPriceMultiply; + price.sourceAmount *= _marketPriceMultiply; // get the current price by adjusting the amount with the exp decay formula - amount = ExpDecayMath.calcExpDecay(amount, timeElapsed, _priceDecayHalfLife).toUint128(); - // update the price - if (token == NATIVE_TOKEN) { - price.tokenAmount = amount; - } else { - price.ethAmount = amount; - } + price.sourceAmount = ExpDecayMath + .calcExpDecay(price.sourceAmount, timeElapsed, _priceDecayHalfLife) + .toUint128(); // return the price return price; } @@ -289,13 +278,13 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils Token token, uint128 amount ) external payable nonReentrant validToken(token) greaterThanZero(amount) { - uint128 ethAmount; + uint128 inputAmount; if (token == NATIVE_TOKEN) { - ethAmount = _sellETHForBNT(amount); + inputAmount = _sellETHForBNT(amount); } else { - ethAmount = _sellTokenForETH(token, amount); + inputAmount = _sellTokenForETH(token, amount); } - emit TokenTraded(msg.sender, token, amount, ethAmount); + emit TokenTraded(msg.sender, token, amount, inputAmount); } function _sellTokenForETH(Token token, uint128 amount) private returns (uint128) { @@ -320,22 +309,22 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils } function _sellETHForBNT(uint128 amount) private returns (uint128) { - uint128 ethAmountRequired = expectedTradeInput(NATIVE_TOKEN, amount); - if (_ethSaleAmount.current < ethAmountRequired) { + if (_ethSaleAmount.current < amount) { revert InsufficientEthForSale(); } - // revert if trade requires 0 eth - if (ethAmountRequired == 0) { + uint128 bntRequired = expectedTradeInput(NATIVE_TOKEN, amount); + // revert if trade requires 0 bnt + if (bntRequired == 0) { revert InvalidTrade(); } // transfer the tokens from the user to the bnt address (burn them directly) - _bnt.safeTransferFrom(msg.sender, Token.unwrap(_bnt), amount); + _bnt.safeTransferFrom(msg.sender, Token.unwrap(_bnt), bntRequired); // transfer the eth to the user - payable(msg.sender).sendValue(ethAmountRequired); + payable(msg.sender).sendValue(amount); // update the available eth sale amount - _ethSaleAmount.current -= ethAmountRequired; + _ethSaleAmount.current -= amount; // check if below 10% of the initial eth sale amount if (_ethSaleAmount.current < _ethSaleAmount.initial / 10) { @@ -343,13 +332,13 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils _ethSaleAmount.current = _ethSaleAmount.initial; // reset the price to double the current one Price memory price = tokenPrice(NATIVE_TOKEN); - price.tokenAmount *= _marketPriceMultiply; + price.sourceAmount *= _marketPriceMultiply; _initialPrice[NATIVE_TOKEN] = price; // emit price updated event emit PriceUpdated(NATIVE_TOKEN, price); } - return ethAmountRequired; + return bntRequired; } /** @@ -419,7 +408,7 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils * @dev validate token helper */ function _validPrice(Price memory price) private pure { - if (price.tokenAmount == 0 || price.ethAmount == 0) { + if (price.sourceAmount == 0 || price.targetAmount == 0) { revert InvalidPrice(); } } diff --git a/contracts/pol/interfaces/ICarbonPOL.sol b/contracts/pol/interfaces/ICarbonPOL.sol index d69eca40..ee0b5af0 100644 --- a/contracts/pol/interfaces/ICarbonPOL.sol +++ b/contracts/pol/interfaces/ICarbonPOL.sol @@ -17,8 +17,8 @@ interface ICarbonPOL is IUpgradeable { error InsufficientEthForSale(); struct Price { - uint128 ethAmount; - uint128 tokenAmount; + uint128 sourceAmount; + uint128 targetAmount; } struct EthSaleAmount { @@ -34,7 +34,7 @@ interface ICarbonPOL is IUpgradeable { /** * @notice triggered after a successful trade TKN->ETH or ETH->BNT is executed */ - event TokenTraded(address indexed caller, Token indexed token, uint128 amount, uint128 ethReceived); + event TokenTraded(address indexed caller, Token indexed token, uint128 inputAmount, uint128 outputAmount); /** * @notice triggered after an eth sale leaves less than 10% of the initial eth sale amount @@ -82,14 +82,12 @@ interface ICarbonPOL is IUpgradeable { function tradingEnabled(Token token) external view returns (bool); /** - * @notice returns the expected trade output (tokens received) given an ETH amount sent for a token - * @notice if token == ETH, return how much BNT will be sent given an ETH amount received + * @notice returns the expected trade output (tokens received) given an token amount sent */ function expectedTradeReturn(Token token, uint128 ethAmount) external view returns (uint128 tokenAmount); /** - * @notice returns the expected trade input (how much eth to send) given a token amount received - * @notice if token == ETH, return how much ETH will be received given a BNT amount sent + * @notice returns the expected trade input (how many tokens to send) given a token amount received */ function expectedTradeInput(Token token, uint128 tokenAmount) external view returns (uint128 ethAmount); @@ -101,7 +99,7 @@ interface ICarbonPOL is IUpgradeable { /** * @notice trades ETH for *amount* of token based on the current token price (trade by target amount) - * @notice if token == ETH, trades *amount* of BNT for ETH based on the current token price (trade by target amount) + * @notice if token == ETH, trades BNT for amount of ETH */ function trade(Token token, uint128 amount) external payable; } diff --git a/test/forge/CarbonPOL.t.sol b/test/forge/CarbonPOL.t.sol index 6a37b1f5..057a2117 100644 --- a/test/forge/CarbonPOL.t.sol +++ b/test/forge/CarbonPOL.t.sol @@ -228,7 +228,7 @@ contract CarbonPOLTest is TestFixture { assertEq(ethSaleAmount, ETH_SALE_AMOUNT_DEFAULT); // enable trading to set the current eth sale amount - ICarbonPOL.Price memory price = ICarbonPOL.Price({ ethAmount: 100, tokenAmount: 10000 }); + ICarbonPOL.Price memory price = ICarbonPOL.Price({ sourceAmount: 100, targetAmount: 10000 }); carbonPOL.enableTradingETH(price); // assert current and max amounts are equal @@ -269,7 +269,7 @@ contract CarbonPOLTest is TestFixture { // enable trading vm.prank(user1); vm.expectRevert(AccessDenied.selector); - carbonPOL.enableTrading(tokens[i], ICarbonPOL.Price({ ethAmount: 100, tokenAmount: 10000 })); + carbonPOL.enableTrading(tokens[i], ICarbonPOL.Price({ sourceAmount: 100, targetAmount: 10000 })); } /// @dev test non admin shouldn't be able to enable eth trading @@ -277,7 +277,7 @@ contract CarbonPOLTest is TestFixture { // enable trading vm.prank(user1); vm.expectRevert(AccessDenied.selector); - carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 100, tokenAmount: 10000 })); + carbonPOL.enableTradingETH(ICarbonPOL.Price({ sourceAmount: 100, targetAmount: 10000 })); } /// @dev test admin should be able to enable trading for token @@ -288,7 +288,7 @@ contract CarbonPOLTest is TestFixture { i = bound(i, 0, 2); // enable trading vm.prank(admin); - carbonPOL.enableTrading(tokens[i], ICarbonPOL.Price({ ethAmount: 100, tokenAmount: 10000 })); + carbonPOL.enableTrading(tokens[i], ICarbonPOL.Price({ sourceAmount: 100, targetAmount: 10000 })); // assert trading is enabled assertTrue(carbonPOL.tradingEnabled(tokens[i])); } @@ -297,7 +297,7 @@ contract CarbonPOLTest is TestFixture { function testAdminShouldBeAbleToEnableTradingETH() public { // enable trading vm.prank(admin); - carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 100, tokenAmount: 10000 })); + carbonPOL.enableTradingETH(ICarbonPOL.Price({ sourceAmount: 100, targetAmount: 10000 })); // assert trading is enabled assertTrue(carbonPOL.tradingEnabled(NATIVE_TOKEN)); // check current eth sale amount is set to the initial eth sale amount @@ -310,7 +310,7 @@ contract CarbonPOLTest is TestFixture { Token[3] memory tokens = [token1, token2, bnt]; // pick a random number from 0 to 2 for the tokens i = bound(i, 0, 2); - ICarbonPOL.Price memory price = ICarbonPOL.Price({ ethAmount: 100, tokenAmount: 10000 }); + ICarbonPOL.Price memory price = ICarbonPOL.Price({ sourceAmount: 100, targetAmount: 10000 }); vm.prank(admin); // expect event to be emitted vm.expectEmit(); @@ -321,7 +321,7 @@ contract CarbonPOLTest is TestFixture { /// @dev test enabling trading for eth should emit an event function testEnablingTradingForETHShouldEmitAnEvent() public { - ICarbonPOL.Price memory price = ICarbonPOL.Price({ ethAmount: 100, tokenAmount: 10000 }); + ICarbonPOL.Price memory price = ICarbonPOL.Price({ sourceAmount: 100, targetAmount: 10000 }); vm.prank(admin); // expect event to be emitted vm.expectEmit(); @@ -340,11 +340,11 @@ contract CarbonPOLTest is TestFixture { vm.startPrank(admin); // setting any of ethAmount or tokenAmount to 0 results in invalid price error vm.expectRevert(ICarbonPOL.InvalidPrice.selector); - carbonPOL.enableTrading(tokens[i], ICarbonPOL.Price({ ethAmount: 0, tokenAmount: 10000 })); + carbonPOL.enableTrading(tokens[i], ICarbonPOL.Price({ sourceAmount: 0, targetAmount: 10000 })); vm.expectRevert(ICarbonPOL.InvalidPrice.selector); - carbonPOL.enableTrading(tokens[i], ICarbonPOL.Price({ ethAmount: 100000, tokenAmount: 0 })); + carbonPOL.enableTrading(tokens[i], ICarbonPOL.Price({ sourceAmount: 100000, targetAmount: 0 })); vm.expectRevert(ICarbonPOL.InvalidPrice.selector); - carbonPOL.enableTrading(tokens[i], ICarbonPOL.Price({ ethAmount: 0, tokenAmount: 0 })); + carbonPOL.enableTrading(tokens[i], ICarbonPOL.Price({ sourceAmount: 0, targetAmount: 0 })); } /// @dev test should revert when setting invalid price for the native token @@ -353,11 +353,11 @@ contract CarbonPOLTest is TestFixture { vm.startPrank(admin); // setting any of ethAmount or tokenAmount to 0 results in invalid price error vm.expectRevert(ICarbonPOL.InvalidPrice.selector); - carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 0, tokenAmount: 10000 })); + carbonPOL.enableTradingETH(ICarbonPOL.Price({ sourceAmount: 0, targetAmount: 10000 })); vm.expectRevert(ICarbonPOL.InvalidPrice.selector); - carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 100000, tokenAmount: 0 })); + carbonPOL.enableTradingETH(ICarbonPOL.Price({ sourceAmount: 100000, targetAmount: 0 })); vm.expectRevert(ICarbonPOL.InvalidPrice.selector); - carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 0, tokenAmount: 0 })); + carbonPOL.enableTradingETH(ICarbonPOL.Price({ sourceAmount: 0, targetAmount: 0 })); } /// @dev test should revert when enabling trading for the native token using enableTrading @@ -366,15 +366,15 @@ contract CarbonPOLTest is TestFixture { vm.startPrank(admin); // attempting to enable trading using enable trading for native token should revert vm.expectRevert(ICarbonPOL.InvalidToken.selector); - carbonPOL.enableTrading(NATIVE_TOKEN, ICarbonPOL.Price({ ethAmount: 100, tokenAmount: 10000 })); + carbonPOL.enableTrading(NATIVE_TOKEN, ICarbonPOL.Price({ sourceAmount: 100, targetAmount: 10000 })); } /// @dev test should properly return price for enabled tokens as time passes function testShouldProperlyReturnPriceAsTimePasses(uint128 ethAmount, uint128 tokenAmount, uint256 i) public { // pick one of these tokens to test - Token[3] memory tokens = [token1, token2, bnt]; + Token[4] memory tokens = [token1, token2, bnt, NATIVE_TOKEN]; // pick a random number from 0 to 2 for the tokens - i = bound(i, 0, 2); + i = bound(i, 0, 3); // enable trading and set price for token vm.prank(admin); Token token = tokens[i]; @@ -382,63 +382,29 @@ contract CarbonPOLTest is TestFixture { ethAmount = uint128(bound(ethAmount, 10, 1e30)); tokenAmount = uint128(bound(tokenAmount, 10, 1e30)); - ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: ethAmount, tokenAmount: tokenAmount }); - carbonPOL.enableTrading(token, initialPrice); + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ sourceAmount: ethAmount, targetAmount: tokenAmount }); + token == NATIVE_TOKEN ? carbonPOL.enableTradingETH(initialPrice) : carbonPOL.enableTrading(token, initialPrice); // set timestamp to 1 vm.warp(1); ICarbonPOL.Price memory price = carbonPOL.tokenPrice(token); // price should be exactly 2x the market price at start - assertEq(price.ethAmount, ethAmount * MARKET_PRICE_MULTIPLY_DEFAULT); + assertEq(price.sourceAmount, ethAmount * MARKET_PRICE_MULTIPLY_DEFAULT); // set timestamp to 10 days (half-life time) vm.warp(10 days + 1); // price should be equal market price at half-life price = carbonPOL.tokenPrice(token); - assertEq(price.ethAmount, ethAmount); + assertEq(price.sourceAmount, ethAmount); - // set timestamp to 20 days + // // set timestamp to 20 days vm.warp(20 days + 1); // price should be equal to half the market price at 2x half-life price = carbonPOL.tokenPrice(token); - assertEq(price.ethAmount, ethAmount / 2); - } - - /// @dev test should properly return price for native token as time passes - function testShouldProperlyReturnNativeTokenPriceAsTimePasses(uint128 ethAmount, uint128 tokenAmount) public { - // enable trading and set price for token - vm.prank(admin); - Token token = NATIVE_TOKEN; - - ethAmount = uint128(bound(ethAmount, 10, 1e30)); - tokenAmount = uint128(bound(tokenAmount, 10, 1e30)); - - ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: ethAmount, tokenAmount: tokenAmount }); - carbonPOL.enableTradingETH(initialPrice); - - // set timestamp to 1 - vm.warp(1); - - ICarbonPOL.Price memory price = carbonPOL.tokenPrice(token); - // price should be exactly 2x the market price at start - assertEq(price.tokenAmount, tokenAmount * MARKET_PRICE_MULTIPLY_DEFAULT); - - // set timestamp to 10 days (half-life time) - vm.warp(10 days + 1); - - // price should be equal market price at half-life - price = carbonPOL.tokenPrice(token); - assertEq(price.tokenAmount, tokenAmount); - - // set timestamp to 20 days - vm.warp(20 days + 1); - - // price should be equal to half the market price at 2x half-life - price = carbonPOL.tokenPrice(token); - assertEq(price.tokenAmount, tokenAmount / 2); + assertEq(price.sourceAmount, ethAmount / 2); } /// @dev test should properly return price for native token as time passes @@ -450,7 +416,7 @@ contract CarbonPOLTest is TestFixture { ethAmount = uint128(bound(ethAmount, 1e17, 1 * 1e18)); tokenAmount = uint128(bound(tokenAmount, 1000 * 1e18, 4000 * 1e18)); - ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: ethAmount, tokenAmount: tokenAmount }); + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ sourceAmount: ethAmount, targetAmount: tokenAmount }); carbonPOL.enableTradingETH(initialPrice); vm.startPrank(user1); @@ -461,11 +427,12 @@ contract CarbonPOLTest is TestFixture { // set timestamp to 10 days vm.warp(10 days + 1); + // approve bnt + bnt.safeApprove(address(carbonPOL), type(uint256).max); + // trade 95% of the eth sale amount uint128 currentEthSaleAmount = uint128(carbonPOL.currentEthSaleAmount()); - uint128 ethTradeAmount = (currentEthSaleAmount * 95) / 100; - uint128 tradeAmount = carbonPOL.expectedTradeReturn(token, ethTradeAmount); - bnt.safeApprove(address(carbonPOL), tradeAmount); + uint128 tradeAmount = (currentEthSaleAmount * 95) / 100; carbonPOL.trade(token, tradeAmount); // price has been reset at this point @@ -478,8 +445,8 @@ contract CarbonPOLTest is TestFixture { ICarbonPOL.Price memory newPrice = carbonPOL.tokenPrice(token); // new price should be exactly equal to the prev price / 2 after the update - assertEq(price.ethAmount, newPrice.ethAmount); - assertEq(price.tokenAmount, newPrice.tokenAmount * carbonPOL.marketPriceMultiply()); + assertEq(price.targetAmount, newPrice.targetAmount); + assertEq(price.sourceAmount, newPrice.sourceAmount * carbonPOL.marketPriceMultiply()); } /// @dev test correct prices retrieved by tokenPrice with different initial prices and different timestamps @@ -534,14 +501,17 @@ contract CarbonPOLTest is TestFixture { vm.warp(1); uint128 ethAmount = uint128(ethAmounts[i]); uint128 tokenAmount = uint128(tokenAmounts[j]); - ICarbonPOL.Price memory price = ICarbonPOL.Price({ ethAmount: ethAmount, tokenAmount: tokenAmount }); + ICarbonPOL.Price memory price = ICarbonPOL.Price({ + sourceAmount: ethAmount, + targetAmount: tokenAmount + }); carbonPOL.enableTrading(token1, price); // get the correct test case for this price POLTestCaseParser.TestCase memory currentCase; for (uint256 t = 0; t < testCases.length; ++t) { if ( - testCases[t].initialPrice.ethAmount == ethAmount && - testCases[t].initialPrice.tokenAmount == tokenAmount + testCases[t].initialPrice.sourceAmount == ethAmount && + testCases[t].initialPrice.targetAmount == tokenAmount ) { currentCase = testCases[t]; } @@ -555,78 +525,8 @@ contract CarbonPOLTest is TestFixture { POLTestCaseParser.PriceAtTimestamp memory priceAtTimestamp = currentCase.pricesAtTimestamp[k]; // assert test data matches the actual token price data assertEq(priceAtTimestamp.timestamp, timestamps[k]); - assertEq(priceAtTimestamp.ethAmount, price.ethAmount); - assertEq(priceAtTimestamp.tokenAmount, price.tokenAmount); - } - } - } - } - - /// @dev test correct prices for ETH retrieved by tokenPrice with different initial prices and different timestamps - function testETHPricesAtTimestamps() public { - // test the following timestamps, ethAmounts and tokenAmounts - uint24[10] memory timestamps = [ - 1, - 1 days, - 2 days, - 5 days, - 10 days, - 20 days, - 30 days, - 40 days, - 50 days, - 100 days - ]; - uint72[5] memory ethAmounts = [100, 1e18, 100e18, 10e18, 1000e18]; - uint80[11] memory tokenAmounts = [ - 100, - 1e18, - 10e18, - 100e18, - 1000e18, - 1200e18, - 1500e18, - 2000e18, - 2400e18, - 3000e18, - 10000e18 - ]; - // enable trading and set price for token - vm.startPrank(admin); - Token token = NATIVE_TOKEN; - - // get test cases from the pol test case parser - POLTestCaseParser.TestCase[] memory testCases = testCaseParser.getTestCases(true); - - // go through each of the eth amounts, token amounts and timestamps to verify token price output matches test data - for (uint256 i = 0; i < ethAmounts.length; ++i) { - for (uint256 j = 0; j < tokenAmounts.length; ++j) { - vm.warp(1); - uint128 ethAmount = uint128(ethAmounts[i]); - uint128 tokenAmount = uint128(tokenAmounts[j]); - ICarbonPOL.Price memory price = ICarbonPOL.Price({ ethAmount: ethAmount, tokenAmount: tokenAmount }); - carbonPOL.enableTradingETH(price); - // get the correct test case for this price - POLTestCaseParser.TestCase memory currentCase; - for (uint256 t = 0; t < testCases.length; ++t) { - if ( - testCases[t].initialPrice.ethAmount == ethAmount && - testCases[t].initialPrice.tokenAmount == tokenAmount - ) { - currentCase = testCases[t]; - } - } - for (uint256 k = 0; k < timestamps.length; ++k) { - // set timestamp - vm.warp(timestamps[k]); - // get token price at this timestamp - price = carbonPOL.tokenPrice(token); - // get test data for this timestamp - POLTestCaseParser.PriceAtTimestamp memory priceAtTimestamp = currentCase.pricesAtTimestamp[k]; - // assert test data matches the actual token price data - assertEq(priceAtTimestamp.timestamp, timestamps[k]); - assertEq(priceAtTimestamp.ethAmount, price.ethAmount); - assertEq(priceAtTimestamp.tokenAmount, price.tokenAmount); + assertEq(priceAtTimestamp.ethAmount, price.sourceAmount); + assertEq(priceAtTimestamp.tokenAmount, price.targetAmount); } } } @@ -638,7 +538,7 @@ contract CarbonPOLTest is TestFixture { vm.prank(admin); Token token = token1; - ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: 1000000, tokenAmount: 100000000000 }); + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ sourceAmount: 1000000, targetAmount: 100000000000 }); carbonPOL.enableTrading(token, initialPrice); vm.startPrank(user1); @@ -664,7 +564,7 @@ contract CarbonPOLTest is TestFixture { vm.prank(admin); Token token = NATIVE_TOKEN; - ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: 1000000, tokenAmount: 100000000000 }); + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ sourceAmount: 1000000, targetAmount: 100000000000 }); carbonPOL.enableTradingETH(initialPrice); vm.startPrank(user1); @@ -677,12 +577,12 @@ contract CarbonPOLTest is TestFixture { uint128 expectedTradeInput = carbonPOL.expectedTradeInput(token, tradeAmount); // approve bnt for eth -> bnt trades - bnt.safeApprove(address(carbonPOL), tradeAmount); + bnt.safeApprove(address(carbonPOL), type(uint256).max); // trade vm.expectEmit(); emit TokenTraded(user1, token, tradeAmount, expectedTradeInput); - carbonPOL.trade{ value: expectedTradeInput }(token, tradeAmount); + carbonPOL.trade(token, tradeAmount); vm.stopPrank(); } @@ -693,7 +593,7 @@ contract CarbonPOLTest is TestFixture { vm.prank(admin); Token token = token1; - ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: 1000000, tokenAmount: 100000000000 }); + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ sourceAmount: 1000000, targetAmount: 100000000000 }); carbonPOL.enableTrading(token, initialPrice); vm.startPrank(user1); @@ -723,7 +623,7 @@ contract CarbonPOLTest is TestFixture { vm.prank(admin); Token token = token1; - ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: 1000000, tokenAmount: 100000000000 }); + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ sourceAmount: 1000000, targetAmount: 100000000000 }); carbonPOL.enableTrading(token, initialPrice); vm.startPrank(user1); @@ -753,7 +653,7 @@ contract CarbonPOLTest is TestFixture { vm.prank(admin); Token token = token1; - ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: 1000000, tokenAmount: 100000000000 }); + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ sourceAmount: 1000000, targetAmount: 100000000000 }); carbonPOL.enableTrading(token, initialPrice); vm.startPrank(user1); @@ -784,7 +684,7 @@ contract CarbonPOLTest is TestFixture { Token token = NATIVE_TOKEN; // set 1 eth = 2000 bnt as initial price - ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: 1e18, tokenAmount: 2000 * 1e18 }); + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ sourceAmount: 2000 * 1e18, targetAmount: 1e18 }); carbonPOL.enableTradingETH(initialPrice); vm.startPrank(user1); @@ -794,7 +694,7 @@ contract CarbonPOLTest is TestFixture { // expected trade input uint128 tradeAmount = 1000e18; - uint128 expectedEthReceived = carbonPOL.expectedTradeInput(token, tradeAmount); + uint128 expectedEthReceived = carbonPOL.expectedTradeReturn(token, tradeAmount); uint256 ethBalanceBefore = user1.balance; @@ -802,7 +702,7 @@ contract CarbonPOLTest is TestFixture { bnt.safeApprove(address(carbonPOL), tradeAmount); // trade - carbonPOL.trade(token, tradeAmount); + carbonPOL.trade(token, expectedEthReceived); uint256 ethBalanceAfter = user1.balance; @@ -818,7 +718,7 @@ contract CarbonPOLTest is TestFixture { Token token = NATIVE_TOKEN; // set 1 eth = 2000 bnt as initial price - ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: 1e18, tokenAmount: 2000 * 1e18 }); + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ sourceAmount: 1e18, targetAmount: 2000 * 1e18 }); carbonPOL.enableTradingETH(initialPrice); vm.startPrank(user1); @@ -826,24 +726,24 @@ contract CarbonPOLTest is TestFixture { // set timestamp to 10 days vm.warp(10 days); - // expected trade input - uint128 tradeAmount = 1000 * 1e18; + // trade 1 ETH + uint128 tradeAmount = 1 * 1e18; uint128 expectedTradeInput = carbonPOL.expectedTradeInput(token, tradeAmount); uint256 bntBalanceBefore = bnt.balanceOf(user1); uint256 bntSupplyBefore = toERC20(bnt).totalSupply(); // approve bnt for eth -> bnt trades - bnt.safeApprove(address(carbonPOL), tradeAmount); + bnt.safeApprove(address(carbonPOL), expectedTradeInput); // trade - carbonPOL.trade{ value: expectedTradeInput }(token, tradeAmount); + carbonPOL.trade(token, tradeAmount); uint256 bntBalanceAfter = bnt.balanceOf(user1); uint256 bntSupplyAfter = toERC20(bnt).totalSupply(); - assertEq(bntBalanceBefore - bntBalanceAfter, tradeAmount); - assertEq(bntSupplyBefore - bntSupplyAfter, tradeAmount); + assertEq(bntBalanceBefore - bntBalanceAfter, expectedTradeInput); + assertEq(bntSupplyBefore - bntSupplyAfter, expectedTradeInput); vm.stopPrank(); } @@ -855,7 +755,7 @@ contract CarbonPOLTest is TestFixture { Token token = NATIVE_TOKEN; // set 1 eth = 2000 bnt as initial price - ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: 1e18, tokenAmount: 2000 * 1e18 }); + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ sourceAmount: 2000 * 1e18, targetAmount: 1e18 }); carbonPOL.enableTradingETH(initialPrice); vm.startPrank(user1); @@ -863,9 +763,9 @@ contract CarbonPOLTest is TestFixture { // set timestamp to 10 days vm.warp(10 days); - // expected trade input + // expected trade return uint128 tradeAmount = 4000 * 1e18; - uint128 expectedEthReceived = carbonPOL.expectedTradeInput(token, tradeAmount); + uint128 expectedEthReceived = carbonPOL.expectedTradeReturn(token, tradeAmount); uint128 saleAmountBefore = carbonPOL.currentEthSaleAmount(); @@ -873,7 +773,7 @@ contract CarbonPOLTest is TestFixture { bnt.safeApprove(address(carbonPOL), tradeAmount); // trade - carbonPOL.trade(token, tradeAmount); + carbonPOL.trade(token, expectedEthReceived); uint128 saleAmountAfter = carbonPOL.currentEthSaleAmount(); @@ -889,7 +789,7 @@ contract CarbonPOLTest is TestFixture { Token token = NATIVE_TOKEN; // set 1 eth = 2000 bnt as initial price - ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: 1e18, tokenAmount: 2000 * 1e18 }); + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ sourceAmount: 2000 * 1e18, targetAmount: 1e18 }); carbonPOL.enableTradingETH(initialPrice); vm.startPrank(user1); @@ -897,38 +797,31 @@ contract CarbonPOLTest is TestFixture { // set timestamp to 10 days vm.warp(10 days); - // trade 85% of the sale amount uint128 initialSaleAmount = carbonPOL.ethSaleAmount(); uint128 currentSaleAmount = carbonPOL.currentEthSaleAmount(); // assert current and initial eth sale amount are equal assertEq(initialSaleAmount, currentSaleAmount); + // trade 85% of the sale amount uint128 amountToSell = uint128((initialSaleAmount * 85) / 100); - uint128 tradeAmount = carbonPOL.expectedTradeReturn(token, amountToSell); - uint128 ethSale = carbonPOL.expectedTradeInput(token, tradeAmount); - - // assert that the expected eth sale for the bnt amount is equal to 85% of the initialSaleAmount - assertEq(ethSale, amountToSell); - // approve bnt for eth -> bnt trades bnt.safeApprove(address(carbonPOL), MAX_SOURCE_AMOUNT); // trade - carbonPOL.trade(token, tradeAmount); + carbonPOL.trade(token, amountToSell); // assert we have 15% available eth for sale currentSaleAmount = carbonPOL.currentEthSaleAmount(); - assertEq(currentSaleAmount, initialSaleAmount - ethSale); + assertEq(currentSaleAmount, initialSaleAmount - amountToSell); // get the price before the threshold trade ICarbonPOL.Price memory prevPrice = carbonPOL.tokenPrice(NATIVE_TOKEN); // trade 10% more (so that we go below 10% of the max sale amount) amountToSell = uint128((initialSaleAmount * 10) / 100); - tradeAmount = carbonPOL.expectedTradeReturn(token, amountToSell); - carbonPOL.trade(token, tradeAmount); + carbonPOL.trade(token, amountToSell); // assert initial sale amount is the same assertEq(initialSaleAmount, carbonPOL.ethSaleAmount()); @@ -942,8 +835,8 @@ contract CarbonPOLTest is TestFixture { ICarbonPOL.Price memory newPrice = carbonPOL.tokenPrice(NATIVE_TOKEN); // assert new price is twice the price before the trade - assertEq(newPrice.ethAmount, prevPrice.ethAmount); - assertEq(newPrice.tokenAmount, prevPrice.tokenAmount * carbonPOL.marketPriceMultiply()); + assertEq(newPrice.sourceAmount, prevPrice.sourceAmount * carbonPOL.marketPriceMultiply()); + assertEq(newPrice.targetAmount, prevPrice.targetAmount); vm.stopPrank(); } @@ -955,7 +848,7 @@ contract CarbonPOLTest is TestFixture { Token token = NATIVE_TOKEN; // set 1 eth = 2000 bnt as initial price - ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ ethAmount: 1e18, tokenAmount: 2000 * 1e18 }); + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ sourceAmount: 2000 * 1e18, targetAmount: 1e18 }); carbonPOL.enableTradingETH(initialPrice); vm.startPrank(user1); @@ -963,37 +856,31 @@ contract CarbonPOLTest is TestFixture { // set timestamp to 10 days vm.warp(10 days); - // trade 95% of the sale amount uint128 initialSaleAmount = carbonPOL.ethSaleAmount(); uint128 currentSaleAmount = carbonPOL.currentEthSaleAmount(); // assert current and initial eth sale amount are equal assertEq(initialSaleAmount, currentSaleAmount); + // trade 95% of the sale amount uint128 amountToSell = uint128((initialSaleAmount * 95) / 100); - uint128 tradeAmount = carbonPOL.expectedTradeReturn(token, amountToSell); - uint128 ethSale = carbonPOL.expectedTradeInput(token, tradeAmount); - - // assert that the expected eth sale for the bnt amount is equal to 85% of the initialSaleAmount - assertEq(ethSale, amountToSell); - // approve bnt for eth -> bnt trades bnt.safeApprove(address(carbonPOL), MAX_SOURCE_AMOUNT); // get the price before the threshold trade ICarbonPOL.Price memory prevPrice = carbonPOL.tokenPrice(NATIVE_TOKEN); - uint128 newExpectedTokenAmount = prevPrice.tokenAmount * carbonPOL.marketPriceMultiply(); + uint128 newExpectedSourceAmount = prevPrice.sourceAmount * carbonPOL.marketPriceMultiply(); ICarbonPOL.Price memory newExpectedPrice = ICarbonPOL.Price({ - ethAmount: prevPrice.ethAmount, - tokenAmount: newExpectedTokenAmount + sourceAmount: newExpectedSourceAmount, + targetAmount: prevPrice.targetAmount }); // trade vm.expectEmit(); emit PriceUpdated(token, newExpectedPrice); - carbonPOL.trade(token, tradeAmount); + carbonPOL.trade(token, amountToSell); vm.stopPrank(); } @@ -1030,7 +917,7 @@ contract CarbonPOLTest is TestFixture { function testShouldReturnInvalidPriceForExpectedTradeReturnIfEthAmountGoesToZero(uint128 amount) public { vm.prank(admin); // enable token to test - carbonPOL.enableTrading(token1, ICarbonPOL.Price({ ethAmount: 1, tokenAmount: 1 })); + carbonPOL.enableTrading(token1, ICarbonPOL.Price({ sourceAmount: 1, targetAmount: 1 })); vm.warp(20 days); // expect for a revert with invalid price vm.expectRevert(ICarbonPOL.InvalidPrice.selector); @@ -1043,7 +930,7 @@ contract CarbonPOLTest is TestFixture { ) public { vm.prank(admin); // enable token to test - carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 1, tokenAmount: 1 })); + carbonPOL.enableTradingETH(ICarbonPOL.Price({ sourceAmount: 1, targetAmount: 1 })); vm.warp(20 days); // expect for a revert with invalid price vm.expectRevert(ICarbonPOL.InvalidPrice.selector); @@ -1054,7 +941,7 @@ contract CarbonPOLTest is TestFixture { function testShouldRevertExpectedTradeInputIfNotEnoughTokenBalanceForTrade() public { vm.prank(admin); // enable token to test - carbonPOL.enableTrading(token1, ICarbonPOL.Price({ ethAmount: 10000, tokenAmount: 100000000 })); + carbonPOL.enableTrading(token1, ICarbonPOL.Price({ sourceAmount: 10000, targetAmount: 100000000 })); // set timestamp to 5 days vm.warp(5 days); uint256 tokenBalance = token1.balanceOf(address(carbonPOL)); @@ -1068,22 +955,20 @@ contract CarbonPOLTest is TestFixture { function testShouldRevertExpectedTradeInputIfNotEnoughNativeTokenBalanceForTrade() public { vm.prank(admin); // enable native token to test - carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 10000, tokenAmount: 100000000 })); + carbonPOL.enableTradingETH(ICarbonPOL.Price({ sourceAmount: 10000, targetAmount: 100000000 })); // set timestamp to 5 days vm.warp(5 days); uint256 ethBalance = NATIVE_TOKEN.balanceOf(address(carbonPOL)); - uint128 maxTokenAmount = carbonPOL.expectedTradeReturn(NATIVE_TOKEN, uint128(ethBalance)); - uint128 amount = maxTokenAmount + 1e18; // get expected trade input vm.expectRevert(ICarbonPOL.InsufficientTokenBalance.selector); - carbonPOL.expectedTradeInput(NATIVE_TOKEN, amount); + carbonPOL.expectedTradeInput(NATIVE_TOKEN, uint128(ethBalance) + 1e18); } /// @dev test should revert expected return if not enough token balance function testShouldRevertExpectedReturnIfNotEnoughTokenBalanceForTrade() public { vm.prank(admin); // enable token to test - carbonPOL.enableTrading(token1, ICarbonPOL.Price({ ethAmount: 10000, tokenAmount: 100000000 })); + carbonPOL.enableTrading(token1, ICarbonPOL.Price({ sourceAmount: 10000, targetAmount: 100000000 })); // set timestamp to 5 days vm.warp(5 days); // get token balance @@ -1098,17 +983,19 @@ contract CarbonPOLTest is TestFixture { /// @dev test should revert expected return if not enough token balance function testShouldRevertExpectedReturnIfNotEnoughNativeTokenBalanceForTrade() public { - vm.prank(admin); + vm.startPrank(admin); // enable token to test - carbonPOL.enableTrading(token1, ICarbonPOL.Price({ ethAmount: 10000, tokenAmount: 100000000 })); + carbonPOL.enableTradingETH(ICarbonPOL.Price({ sourceAmount: 10000, targetAmount: 100000000 })); + vm.stopPrank(); // set timestamp to 5 days vm.warp(5 days); - // get token balance - uint256 tokenBalance = token1.balanceOf(address(carbonPOL)); - uint128 amount = uint128(tokenBalance) + 1; + uint256 ethBalance = address(carbonPOL).balance; + // get expected trade input + uint128 expectedInput = carbonPOL.expectedTradeInput(NATIVE_TOKEN, uint128(ethBalance)); + uint128 amount = uint128(expectedInput) + 1e18; // expect revert vm.expectRevert(ICarbonPOL.InsufficientTokenBalance.selector); - carbonPOL.expectedTradeReturn(token1, amount); + carbonPOL.expectedTradeReturn(NATIVE_TOKEN, amount); } /// @dev test should revert if attempting to trade tokens for which trading is disabled @@ -1129,7 +1016,7 @@ contract CarbonPOLTest is TestFixture { uint128 amount = 0; vm.prank(admin); // enable token to test - carbonPOL.enableTrading(token, ICarbonPOL.Price({ ethAmount: 1, tokenAmount: 1 })); + carbonPOL.enableTrading(token, ICarbonPOL.Price({ sourceAmount: 1, targetAmount: 1 })); vm.prank(user1); // expect trade to revert vm.expectRevert(ZeroValue.selector); @@ -1142,40 +1029,22 @@ contract CarbonPOLTest is TestFixture { uint128 amount = 0; vm.prank(admin); // enable token to test - carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 1, tokenAmount: 1 })); + carbonPOL.enableTradingETH(ICarbonPOL.Price({ sourceAmount: 1, targetAmount: 1 })); vm.prank(user1); // expect trade to revert vm.expectRevert(ZeroValue.selector); carbonPOL.trade(token, amount); } - /// @dev test should revert if token value in ETH is equal to 0 - function testShouldRevertTradingForZeroTokenValue() public { - Token token = token1; - // trade 999 tokens - uint128 amount = 999; - vm.prank(admin); - // enable token to test - carbonPOL.enableTrading(token, ICarbonPOL.Price({ ethAmount: 1, tokenAmount: 1000 })); - vm.startPrank(user1); - // set block.timestamp to 1000 - vm.warp(1000); - // expect eth required to be 0 - assertEq(carbonPOL.expectedTradeInput(token, amount), 0); - // expect trade to revert - vm.expectRevert(ICarbonPOL.InvalidTrade.selector); - carbonPOL.trade(token, amount); - vm.stopPrank(); - } - - /// @dev test should revert trading eth if BNT to send is equal to 0 - function testShouldRevertTradingETHForZeroTokenValue() public { - Token token = NATIVE_TOKEN; + /// @dev test should revert if token value is equal to 0 + function testShouldRevertTradingForZeroTokenValue(bool isNative) public { + Token token = isNative ? NATIVE_TOKEN : token1; // trade 999 tokens uint128 amount = 999; vm.prank(admin); // enable token to test - carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 1, tokenAmount: 1000 })); + ICarbonPOL.Price memory price = ICarbonPOL.Price({ sourceAmount: 1, targetAmount: 1000 }); + isNative ? carbonPOL.enableTradingETH(price) : carbonPOL.enableTrading(token, price); vm.startPrank(user1); // set block.timestamp to 1000 vm.warp(1000); @@ -1192,32 +1061,25 @@ contract CarbonPOLTest is TestFixture { Token token = NATIVE_TOKEN; vm.prank(admin); // enable token to test - carbonPOL.enableTradingETH(ICarbonPOL.Price({ ethAmount: 1e18, tokenAmount: 2000 * 1e18 })); + carbonPOL.enableTradingETH(ICarbonPOL.Price({ sourceAmount: 1e18, targetAmount: 2000 * 1e18 })); // assert that available eth amount is exactly 100 ether assertEq(carbonPOL.currentEthSaleAmount(), 100 ether); vm.startPrank(user1); + bnt.safeApprove(address(carbonPOL), type(uint256).max); + // check 100 eth trade passes successfully - uint128 maxTradeTokenAmount = carbonPOL.expectedTradeReturn(token, 100 ether); - bnt.safeApprove(address(carbonPOL), maxTradeTokenAmount); - carbonPOL.trade(token, maxTradeTokenAmount); + carbonPOL.trade(token, 100 ether); // set block.timestamp to 1000 vm.warp(1000); // trade a bit over 100 eth - uint128 ethAmount = 100 ether + 2; - uint128 tokenAmount = carbonPOL.expectedTradeReturn(token, ethAmount); - - // assert that the eth amount for *tokenAmount* is exactly 1 wei above 100 eth and should revert the trade - uint128 expectedEthAmount = carbonPOL.expectedTradeInput(token, tokenAmount); - assertEq(expectedEthAmount, 100 ether + 1); - assertGt(expectedEthAmount, carbonPOL.currentEthSaleAmount()); - + uint128 ethAmount = 100 ether + 1; // expect trade to revert vm.expectRevert(ICarbonPOL.InsufficientEthForSale.selector); - carbonPOL.trade(token, tokenAmount); + carbonPOL.trade(token, ethAmount); vm.stopPrank(); } @@ -1228,7 +1090,7 @@ contract CarbonPOLTest is TestFixture { uint128 amount = 1e18; vm.prank(admin); // enable token to test - carbonPOL.enableTrading(token, ICarbonPOL.Price({ ethAmount: 1e18, tokenAmount: 1e22 })); + carbonPOL.enableTrading(token, ICarbonPOL.Price({ sourceAmount: 1e18, targetAmount: 1e22 })); vm.startPrank(user1); // set timestamp to 1000 to ensure some time passes between calls vm.warp(1000); @@ -1249,7 +1111,7 @@ contract CarbonPOLTest is TestFixture { uint128 amount = 1e18; vm.prank(admin); // enable token to test - carbonPOL.enableTrading(token, ICarbonPOL.Price({ ethAmount: 1e18, tokenAmount: 1e22 })); + carbonPOL.enableTrading(token, ICarbonPOL.Price({ sourceAmount: 1e18, targetAmount: 1e22 })); vm.startPrank(user1); // deploy carbonPOL reentrancy contract TestReenterCarbonPOL testReentrancy = new TestReenterCarbonPOL(carbonPOL, token); diff --git a/test/forge/POLTestCaseParser.t.sol b/test/forge/POLTestCaseParser.t.sol index 69718298..32244118 100644 --- a/test/forge/POLTestCaseParser.t.sol +++ b/test/forge/POLTestCaseParser.t.sol @@ -57,8 +57,8 @@ contract POLTestCaseParser is Test { string.concat(initialParseString, "].initialPriceTokenAmount") ); price = ICarbonPOL.Price({ - ethAmount: uint128(initialPriceEthAmount), - tokenAmount: uint128(initialPriceTokenAmount) + sourceAmount: uint128(initialPriceEthAmount), + targetAmount: uint128(initialPriceTokenAmount) }); } From d5b249c46a47d5af3f42936905edb6ad22fc62f6 Mon Sep 17 00:00:00 2001 From: Ivan Zhelyazkov Date: Fri, 17 Nov 2023 10:07:47 +0200 Subject: [PATCH 09/10] carbon pol eth conversion - minor fixes --- contracts/pol/CarbonPOL.sol | 11 +- contracts/pol/interfaces/ICarbonPOL.sol | 15 +- test/forge/CarbonPOL.t.sol | 104 +- test/forge/POLTestCaseParser.t.sol | 30 +- test/helpers/data/polPricingTestData.json | 4400 +++++++++--------- test/helpers/data/polPricingTestDataEth.json | 3084 ------------ 6 files changed, 2276 insertions(+), 5368 deletions(-) delete mode 100644 test/helpers/data/polPricingTestDataEth.json diff --git a/contracts/pol/CarbonPOL.sol b/contracts/pol/CarbonPOL.sol index 30687801..e5817f96 100644 --- a/contracts/pol/CarbonPOL.sol +++ b/contracts/pol/CarbonPOL.sol @@ -196,15 +196,8 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils /** * @inheritdoc ICarbonPOL */ - function ethSaleAmount() external view returns (uint128) { - return _ethSaleAmount.initial; - } - - /** - * @inheritdoc ICarbonPOL - */ - function currentEthSaleAmount() external view returns (uint128) { - return _ethSaleAmount.current; + function ethSaleAmount() external view returns (EthSaleAmount memory) { + return _ethSaleAmount; } /** diff --git a/contracts/pol/interfaces/ICarbonPOL.sol b/contracts/pol/interfaces/ICarbonPOL.sol index ee0b5af0..0837c316 100644 --- a/contracts/pol/interfaces/ICarbonPOL.sol +++ b/contracts/pol/interfaces/ICarbonPOL.sol @@ -32,12 +32,12 @@ interface ICarbonPOL is IUpgradeable { event TradingEnabled(Token indexed token, Price price); /** - * @notice triggered after a successful trade TKN->ETH or ETH->BNT is executed + * @notice triggered after a successful trade is executed */ event TokenTraded(address indexed caller, Token indexed token, uint128 inputAmount, uint128 outputAmount); /** - * @notice triggered after an eth sale leaves less than 10% of the initial eth sale amount + * @notice triggered after an eth trade leaves less than 10% of the initial eth sale amount */ event PriceUpdated(Token indexed token, Price price); @@ -67,14 +67,9 @@ interface ICarbonPOL is IUpgradeable { function priceDecayHalfLife() external view returns (uint32); /** - * @notice returns the initial eth sale amount + * @notice returns the initial and current eth sale amount */ - function ethSaleAmount() external view returns (uint128); - - /** - * @notice returns the current eth sale amount - */ - function currentEthSaleAmount() external view returns (uint128); + function ethSaleAmount() external view returns (EthSaleAmount memory); /** * @notice returns true if trading is enabled for token @@ -93,7 +88,7 @@ interface ICarbonPOL is IUpgradeable { /** * @notice returns the current token price (ETH / TKN) - * @notice if token == ETH, returns ETH / BNT price + * @notice if token == ETH, returns BNT / ETH price */ function tokenPrice(Token token) external view returns (Price memory price); diff --git a/test/forge/CarbonPOL.t.sol b/test/forge/CarbonPOL.t.sol index 057a2117..9d9b7ea7 100644 --- a/test/forge/CarbonPOL.t.sol +++ b/test/forge/CarbonPOL.t.sol @@ -209,14 +209,14 @@ contract CarbonPOLTest is TestFixture { /// @dev test that admin should be able to update the eth sale amount function testShouldBeAbleToSetAndUpdateTheEthSaleAmount() public { vm.startPrank(admin); - uint128 ethSaleAmount = carbonPOL.ethSaleAmount(); + uint128 ethSaleAmount = carbonPOL.ethSaleAmount().initial; assertEq(ethSaleAmount, ETH_SALE_AMOUNT_DEFAULT); vm.expectEmit(); emit EthSaleAmountUpdated(ETH_SALE_AMOUNT_DEFAULT, ETH_SALE_AMOUNT_UPDATED); carbonPOL.setEthSaleAmount(ETH_SALE_AMOUNT_UPDATED); - ethSaleAmount = carbonPOL.ethSaleAmount(); + ethSaleAmount = carbonPOL.ethSaleAmount().initial; assertEq(ethSaleAmount, ETH_SALE_AMOUNT_UPDATED); vm.stopPrank(); } @@ -224,7 +224,7 @@ contract CarbonPOLTest is TestFixture { /// @dev test that setting the eth sale amount to an amount below the current eth sale amount reset the current amount function testCurrentEthSaleAmountIsUpdatedWhenAboveTheNewEthSaleAmount() public { vm.startPrank(admin); - uint128 ethSaleAmount = carbonPOL.ethSaleAmount(); + uint128 ethSaleAmount = carbonPOL.ethSaleAmount().initial; assertEq(ethSaleAmount, ETH_SALE_AMOUNT_DEFAULT); // enable trading to set the current eth sale amount @@ -232,7 +232,7 @@ contract CarbonPOLTest is TestFixture { carbonPOL.enableTradingETH(price); // assert current and max amounts are equal - uint128 currentEthSaleAmount = carbonPOL.currentEthSaleAmount(); + uint128 currentEthSaleAmount = carbonPOL.ethSaleAmount().current; assertEq(currentEthSaleAmount, ethSaleAmount); // set the new amount to amount / 2 @@ -240,8 +240,8 @@ contract CarbonPOLTest is TestFixture { carbonPOL.setEthSaleAmount(newSaleAmount); // assert both amounts are updated - ethSaleAmount = carbonPOL.ethSaleAmount(); - currentEthSaleAmount = carbonPOL.currentEthSaleAmount(); + ethSaleAmount = carbonPOL.ethSaleAmount().initial; + currentEthSaleAmount = carbonPOL.ethSaleAmount().current; assertEq(ethSaleAmount, currentEthSaleAmount); vm.stopPrank(); } @@ -301,7 +301,7 @@ contract CarbonPOLTest is TestFixture { // assert trading is enabled assertTrue(carbonPOL.tradingEnabled(NATIVE_TOKEN)); // check current eth sale amount is set to the initial eth sale amount - assertEq(carbonPOL.ethSaleAmount(), carbonPOL.currentEthSaleAmount()); + assertEq(carbonPOL.ethSaleAmount().current, carbonPOL.ethSaleAmount().initial); } /// @dev test enabling trading for a token should emit an event @@ -338,7 +338,7 @@ contract CarbonPOLTest is TestFixture { i = bound(i, 0, 2); // enable trading vm.startPrank(admin); - // setting any of ethAmount or tokenAmount to 0 results in invalid price error + // setting any of sourceAmount or targetAmount to 0 results in invalid price error vm.expectRevert(ICarbonPOL.InvalidPrice.selector); carbonPOL.enableTrading(tokens[i], ICarbonPOL.Price({ sourceAmount: 0, targetAmount: 10000 })); vm.expectRevert(ICarbonPOL.InvalidPrice.selector); @@ -351,7 +351,7 @@ contract CarbonPOLTest is TestFixture { function testShouldRevertWhenSettingInvalidPriceForNativeToken() public { // enable trading vm.startPrank(admin); - // setting any of ethAmount or tokenAmount to 0 results in invalid price error + // setting any of sourceAmount or targetAmount to 0 results in invalid price error vm.expectRevert(ICarbonPOL.InvalidPrice.selector); carbonPOL.enableTradingETH(ICarbonPOL.Price({ sourceAmount: 0, targetAmount: 10000 })); vm.expectRevert(ICarbonPOL.InvalidPrice.selector); @@ -370,7 +370,7 @@ contract CarbonPOLTest is TestFixture { } /// @dev test should properly return price for enabled tokens as time passes - function testShouldProperlyReturnPriceAsTimePasses(uint128 ethAmount, uint128 tokenAmount, uint256 i) public { + function testShouldProperlyReturnPriceAsTimePasses(uint128 sourceAmount, uint128 targetAmount, uint256 i) public { // pick one of these tokens to test Token[4] memory tokens = [token1, token2, bnt, NATIVE_TOKEN]; // pick a random number from 0 to 2 for the tokens @@ -379,10 +379,13 @@ contract CarbonPOLTest is TestFixture { vm.prank(admin); Token token = tokens[i]; - ethAmount = uint128(bound(ethAmount, 10, 1e30)); - tokenAmount = uint128(bound(tokenAmount, 10, 1e30)); + sourceAmount = uint128(bound(sourceAmount, 10, 1e30)); + targetAmount = uint128(bound(targetAmount, 10, 1e30)); - ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ sourceAmount: ethAmount, targetAmount: tokenAmount }); + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ + sourceAmount: sourceAmount, + targetAmount: targetAmount + }); token == NATIVE_TOKEN ? carbonPOL.enableTradingETH(initialPrice) : carbonPOL.enableTrading(token, initialPrice); // set timestamp to 1 @@ -390,33 +393,36 @@ contract CarbonPOLTest is TestFixture { ICarbonPOL.Price memory price = carbonPOL.tokenPrice(token); // price should be exactly 2x the market price at start - assertEq(price.sourceAmount, ethAmount * MARKET_PRICE_MULTIPLY_DEFAULT); + assertEq(price.sourceAmount, sourceAmount * MARKET_PRICE_MULTIPLY_DEFAULT); // set timestamp to 10 days (half-life time) vm.warp(10 days + 1); // price should be equal market price at half-life price = carbonPOL.tokenPrice(token); - assertEq(price.sourceAmount, ethAmount); + assertEq(price.sourceAmount, sourceAmount); // // set timestamp to 20 days vm.warp(20 days + 1); // price should be equal to half the market price at 2x half-life price = carbonPOL.tokenPrice(token); - assertEq(price.sourceAmount, ethAmount / 2); + assertEq(price.sourceAmount, sourceAmount / 2); } /// @dev test should properly return price for native token as time passes - function testShouldProperlyReturnNativeTokenPriceAfterBigSale(uint128 ethAmount, uint128 tokenAmount) public { + function testShouldProperlyReturnNativeTokenPriceAfterBigSale(uint128 sourceAmount, uint128 targetAmount) public { // enable trading and set price for token vm.prank(admin); Token token = NATIVE_TOKEN; - ethAmount = uint128(bound(ethAmount, 1e17, 1 * 1e18)); - tokenAmount = uint128(bound(tokenAmount, 1000 * 1e18, 4000 * 1e18)); + sourceAmount = uint128(bound(sourceAmount, 1e17, 1 * 1e18)); + targetAmount = uint128(bound(targetAmount, 1000 * 1e18, 4000 * 1e18)); - ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ sourceAmount: ethAmount, targetAmount: tokenAmount }); + ICarbonPOL.Price memory initialPrice = ICarbonPOL.Price({ + sourceAmount: sourceAmount, + targetAmount: targetAmount + }); carbonPOL.enableTradingETH(initialPrice); vm.startPrank(user1); @@ -431,7 +437,7 @@ contract CarbonPOLTest is TestFixture { bnt.safeApprove(address(carbonPOL), type(uint256).max); // trade 95% of the eth sale amount - uint128 currentEthSaleAmount = uint128(carbonPOL.currentEthSaleAmount()); + uint128 currentEthSaleAmount = uint128(carbonPOL.ethSaleAmount().initial); uint128 tradeAmount = (currentEthSaleAmount * 95) / 100; carbonPOL.trade(token, tradeAmount); @@ -451,7 +457,7 @@ contract CarbonPOLTest is TestFixture { /// @dev test correct prices retrieved by tokenPrice with different initial prices and different timestamps function testPricesAtTimestamps() public { - // test the following timestamps, ethAmounts and tokenAmounts + // test the following timestamps, sourceAmounts and targetAmounts uint24[10] memory timestamps = [ 1, 1 days, @@ -464,7 +470,7 @@ contract CarbonPOLTest is TestFixture { 50 days, 100 days ]; - uint88[10] memory ethAmounts = [ + uint88[10] memory sourceAmounts = [ 100, 1e18, 10e18, @@ -476,7 +482,7 @@ contract CarbonPOLTest is TestFixture { 5000000e18, 10000000e18 ]; - uint88[10] memory tokenAmounts = [ + uint88[10] memory targetAmounts = [ 100, 1e18, 10e18, @@ -493,25 +499,25 @@ contract CarbonPOLTest is TestFixture { Token token = token1; // get test cases from the pol test case parser - POLTestCaseParser.TestCase[] memory testCases = testCaseParser.getTestCases(false); + POLTestCaseParser.TestCase[] memory testCases = testCaseParser.getTestCases(); - // go through each of the eth amounts, token amounts and timestamps to verify token price output matches test data - for (uint256 i = 0; i < ethAmounts.length; ++i) { - for (uint256 j = 0; j < tokenAmounts.length; ++j) { + // go through each of the source amounts, target amounts and timestamps to verify token price output matches test data + for (uint256 i = 0; i < sourceAmounts.length; ++i) { + for (uint256 j = 0; j < targetAmounts.length; ++j) { vm.warp(1); - uint128 ethAmount = uint128(ethAmounts[i]); - uint128 tokenAmount = uint128(tokenAmounts[j]); + uint128 sourceAmount = uint128(sourceAmounts[i]); + uint128 targetAmount = uint128(targetAmounts[j]); ICarbonPOL.Price memory price = ICarbonPOL.Price({ - sourceAmount: ethAmount, - targetAmount: tokenAmount + sourceAmount: sourceAmount, + targetAmount: targetAmount }); carbonPOL.enableTrading(token1, price); // get the correct test case for this price POLTestCaseParser.TestCase memory currentCase; for (uint256 t = 0; t < testCases.length; ++t) { if ( - testCases[t].initialPrice.sourceAmount == ethAmount && - testCases[t].initialPrice.targetAmount == tokenAmount + testCases[t].initialPrice.sourceAmount == sourceAmount && + testCases[t].initialPrice.targetAmount == targetAmount ) { currentCase = testCases[t]; } @@ -525,8 +531,8 @@ contract CarbonPOLTest is TestFixture { POLTestCaseParser.PriceAtTimestamp memory priceAtTimestamp = currentCase.pricesAtTimestamp[k]; // assert test data matches the actual token price data assertEq(priceAtTimestamp.timestamp, timestamps[k]); - assertEq(priceAtTimestamp.ethAmount, price.sourceAmount); - assertEq(priceAtTimestamp.tokenAmount, price.targetAmount); + assertEq(priceAtTimestamp.sourceAmount, price.sourceAmount); + assertEq(priceAtTimestamp.targetAmount, price.targetAmount); } } } @@ -767,7 +773,7 @@ contract CarbonPOLTest is TestFixture { uint128 tradeAmount = 4000 * 1e18; uint128 expectedEthReceived = carbonPOL.expectedTradeReturn(token, tradeAmount); - uint128 saleAmountBefore = carbonPOL.currentEthSaleAmount(); + uint128 saleAmountBefore = carbonPOL.ethSaleAmount().current; // approve bnt for eth -> bnt trades bnt.safeApprove(address(carbonPOL), tradeAmount); @@ -775,7 +781,7 @@ contract CarbonPOLTest is TestFixture { // trade carbonPOL.trade(token, expectedEthReceived); - uint128 saleAmountAfter = carbonPOL.currentEthSaleAmount(); + uint128 saleAmountAfter = carbonPOL.ethSaleAmount().current; assertEq(saleAmountBefore - saleAmountAfter, expectedEthReceived); @@ -797,8 +803,8 @@ contract CarbonPOLTest is TestFixture { // set timestamp to 10 days vm.warp(10 days); - uint128 initialSaleAmount = carbonPOL.ethSaleAmount(); - uint128 currentSaleAmount = carbonPOL.currentEthSaleAmount(); + uint128 initialSaleAmount = carbonPOL.ethSaleAmount().initial; + uint128 currentSaleAmount = carbonPOL.ethSaleAmount().current; // assert current and initial eth sale amount are equal assertEq(initialSaleAmount, currentSaleAmount); @@ -813,7 +819,7 @@ contract CarbonPOLTest is TestFixture { carbonPOL.trade(token, amountToSell); // assert we have 15% available eth for sale - currentSaleAmount = carbonPOL.currentEthSaleAmount(); + currentSaleAmount = carbonPOL.ethSaleAmount().current; assertEq(currentSaleAmount, initialSaleAmount - amountToSell); // get the price before the threshold trade @@ -824,10 +830,10 @@ contract CarbonPOLTest is TestFixture { carbonPOL.trade(token, amountToSell); // assert initial sale amount is the same - assertEq(initialSaleAmount, carbonPOL.ethSaleAmount()); + assertEq(initialSaleAmount, carbonPOL.ethSaleAmount().initial); // assert new current eth sale amount is equal to the initial (we have topped up the amount) - currentSaleAmount = carbonPOL.currentEthSaleAmount(); + currentSaleAmount = carbonPOL.ethSaleAmount().current; assertEq(currentSaleAmount, initialSaleAmount); vm.warp(block.timestamp + 1); @@ -856,8 +862,8 @@ contract CarbonPOLTest is TestFixture { // set timestamp to 10 days vm.warp(10 days); - uint128 initialSaleAmount = carbonPOL.ethSaleAmount(); - uint128 currentSaleAmount = carbonPOL.currentEthSaleAmount(); + uint128 initialSaleAmount = carbonPOL.ethSaleAmount().initial; + uint128 currentSaleAmount = carbonPOL.ethSaleAmount().current; // assert current and initial eth sale amount are equal assertEq(initialSaleAmount, currentSaleAmount); @@ -1061,10 +1067,10 @@ contract CarbonPOLTest is TestFixture { Token token = NATIVE_TOKEN; vm.prank(admin); // enable token to test - carbonPOL.enableTradingETH(ICarbonPOL.Price({ sourceAmount: 1e18, targetAmount: 2000 * 1e18 })); + carbonPOL.enableTradingETH(ICarbonPOL.Price({ sourceAmount: 2000 * 1e18, targetAmount: 1e18 })); // assert that available eth amount is exactly 100 ether - assertEq(carbonPOL.currentEthSaleAmount(), 100 ether); + assertEq(carbonPOL.ethSaleAmount().initial, 100 ether); vm.startPrank(user1); @@ -1076,10 +1082,10 @@ contract CarbonPOLTest is TestFixture { // set block.timestamp to 1000 vm.warp(1000); // trade a bit over 100 eth - uint128 ethAmount = 100 ether + 1; + uint128 sourceAmount = 100 ether + 1; // expect trade to revert vm.expectRevert(ICarbonPOL.InsufficientEthForSale.selector); - carbonPOL.trade(token, ethAmount); + carbonPOL.trade(token, sourceAmount); vm.stopPrank(); } diff --git a/test/forge/POLTestCaseParser.t.sol b/test/forge/POLTestCaseParser.t.sol index 32244118..4afe8fdb 100644 --- a/test/forge/POLTestCaseParser.t.sol +++ b/test/forge/POLTestCaseParser.t.sol @@ -12,15 +12,15 @@ contract POLTestCaseParser is Test { using stdJson for string; struct PriceAtTimestamp { + uint128 sourceAmount; + uint128 targetAmount; uint32 timestamp; - uint128 ethAmount; - uint128 tokenAmount; } struct PriceAtTimestampString { - string ethAmount; + string sourceAmount; + string targetAmount; string timestamp; - string tokenAmount; } struct TestCase { @@ -31,10 +31,8 @@ contract POLTestCaseParser is Test { /** * @dev helper function to get test cases by parsing test data json */ - function getTestCases(bool forNativeToken) public returns (TestCase[] memory testCases) { - string memory path = "./test/helpers/data/"; - string memory filename = forNativeToken ? "polPricingTestDataEth.json" : "polPricingTestData.json"; - path = string.concat(path, filename); + function getTestCases() public returns (TestCase[] memory testCases) { + string memory path = "./test/helpers/data/polPricingTestData.json"; string memory json = vm.readFile(path); testCases = parseTestCases(json, "testCase"); @@ -48,17 +46,17 @@ contract POLTestCaseParser is Test { string memory json, string memory initialParseString ) private returns (ICarbonPOL.Price memory price) { - uint256 initialPriceEthAmount = vm.parseJsonUint( + uint256 initialPriceSourceAmount = vm.parseJsonUint( json, - string.concat(initialParseString, "].initialPriceEthAmount") + string.concat(initialParseString, "].initialPriceSourceAmount") ); - uint256 initialPriceTokenAmount = vm.parseJsonUint( + uint256 initialPriceTargetAmount = vm.parseJsonUint( json, - string.concat(initialParseString, "].initialPriceTokenAmount") + string.concat(initialParseString, "].initialPriceTargetAmount") ); price = ICarbonPOL.Price({ - sourceAmount: uint128(initialPriceEthAmount), - targetAmount: uint128(initialPriceTokenAmount) + sourceAmount: uint128(initialPriceSourceAmount), + targetAmount: uint128(initialPriceTargetAmount) }); } @@ -123,8 +121,8 @@ contract POLTestCaseParser is Test { return PriceAtTimestamp({ timestamp: uint32(stringToUint(priceAtTimestampString.timestamp)), - ethAmount: uint128(stringToUint(priceAtTimestampString.ethAmount)), - tokenAmount: uint128(stringToUint(priceAtTimestampString.tokenAmount)) + sourceAmount: uint128(stringToUint(priceAtTimestampString.sourceAmount)), + targetAmount: uint128(stringToUint(priceAtTimestampString.targetAmount)) }); } diff --git a/test/helpers/data/polPricingTestData.json b/test/helpers/data/polPricingTestData.json index 55d8778a..8f8451ce 100644 --- a/test/helpers/data/polPricingTestData.json +++ b/test/helpers/data/polPricingTestData.json @@ -4,5601 +4,5601 @@ "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200", - "tokenAmount": "100" + "sourceAmount": "200", + "targetAmount": "100" }, { "timestamp": "86400", - "ethAmount": "186", - "tokenAmount": "100" + "sourceAmount": "186", + "targetAmount": "100" }, { "timestamp": "172800", - "ethAmount": "174", - "tokenAmount": "100" + "sourceAmount": "174", + "targetAmount": "100" }, { "timestamp": "432000", - "ethAmount": "141", - "tokenAmount": "100" + "sourceAmount": "141", + "targetAmount": "100" }, { "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "100" + "sourceAmount": "100", + "targetAmount": "100" }, { "timestamp": "1728000", - "ethAmount": "50", - "tokenAmount": "100" + "sourceAmount": "50", + "targetAmount": "100" }, { "timestamp": "2592000", - "ethAmount": "25", - "tokenAmount": "100" + "sourceAmount": "25", + "targetAmount": "100" }, { "timestamp": "3456000", - "ethAmount": "12", - "tokenAmount": "100" + "sourceAmount": "12", + "targetAmount": "100" }, { "timestamp": "4320000", - "ethAmount": "6", - "tokenAmount": "100" + "sourceAmount": "6", + "targetAmount": "100" }, { "timestamp": "8640000", - "ethAmount": "0", - "tokenAmount": "100" + "sourceAmount": "0", + "targetAmount": "100" } ], - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "100" + "initialPriceSourceAmount": "100", + "initialPriceTargetAmount": "100" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200", - "tokenAmount": "1000000000000000000" + "sourceAmount": "200", + "targetAmount": "1000000000000000000" }, { "timestamp": "86400", - "ethAmount": "186", - "tokenAmount": "1000000000000000000" + "sourceAmount": "186", + "targetAmount": "1000000000000000000" }, { "timestamp": "172800", - "ethAmount": "174", - "tokenAmount": "1000000000000000000" + "sourceAmount": "174", + "targetAmount": "1000000000000000000" }, { "timestamp": "432000", - "ethAmount": "141", - "tokenAmount": "1000000000000000000" + "sourceAmount": "141", + "targetAmount": "1000000000000000000" }, { "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "1000000000000000000" + "sourceAmount": "100", + "targetAmount": "1000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "50", - "tokenAmount": "1000000000000000000" + "sourceAmount": "50", + "targetAmount": "1000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "25", - "tokenAmount": "1000000000000000000" + "sourceAmount": "25", + "targetAmount": "1000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "12", - "tokenAmount": "1000000000000000000" + "sourceAmount": "12", + "targetAmount": "1000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "6", - "tokenAmount": "1000000000000000000" + "sourceAmount": "6", + "targetAmount": "1000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "0", - "tokenAmount": "1000000000000000000" + "sourceAmount": "0", + "targetAmount": "1000000000000000000" } ], - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "1000000000000000000" + "initialPriceSourceAmount": "100", + "initialPriceTargetAmount": "1000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200", - "tokenAmount": "10000000000000000000" + "sourceAmount": "200", + "targetAmount": "10000000000000000000" }, { "timestamp": "86400", - "ethAmount": "186", - "tokenAmount": "10000000000000000000" + "sourceAmount": "186", + "targetAmount": "10000000000000000000" }, { "timestamp": "172800", - "ethAmount": "174", - "tokenAmount": "10000000000000000000" + "sourceAmount": "174", + "targetAmount": "10000000000000000000" }, { "timestamp": "432000", - "ethAmount": "141", - "tokenAmount": "10000000000000000000" + "sourceAmount": "141", + "targetAmount": "10000000000000000000" }, { "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "10000000000000000000" + "sourceAmount": "100", + "targetAmount": "10000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "50", - "tokenAmount": "10000000000000000000" + "sourceAmount": "50", + "targetAmount": "10000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "25", - "tokenAmount": "10000000000000000000" + "sourceAmount": "25", + "targetAmount": "10000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "12", - "tokenAmount": "10000000000000000000" + "sourceAmount": "12", + "targetAmount": "10000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "6", - "tokenAmount": "10000000000000000000" + "sourceAmount": "6", + "targetAmount": "10000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "0", - "tokenAmount": "10000000000000000000" + "sourceAmount": "0", + "targetAmount": "10000000000000000000" } ], - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "10000000000000000000" + "initialPriceSourceAmount": "100", + "initialPriceTargetAmount": "10000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "200", + "targetAmount": "1000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "186", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "186", + "targetAmount": "1000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "174", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "174", + "targetAmount": "1000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "141", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "141", + "targetAmount": "1000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "100", + "targetAmount": "1000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "50", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "50", + "targetAmount": "1000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "25", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "25", + "targetAmount": "1000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "12", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "12", + "targetAmount": "1000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "6", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "6", + "targetAmount": "1000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "0", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "0", + "targetAmount": "1000000000000000000000" } ], - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "1000000000000000000000" + "initialPriceSourceAmount": "100", + "initialPriceTargetAmount": "1000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "200", + "targetAmount": "10000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "186", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "186", + "targetAmount": "10000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "174", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "174", + "targetAmount": "10000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "141", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "141", + "targetAmount": "10000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "100", + "targetAmount": "10000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "50", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "50", + "targetAmount": "10000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "25", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "25", + "targetAmount": "10000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "12", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "12", + "targetAmount": "10000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "6", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "6", + "targetAmount": "10000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "0", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "0", + "targetAmount": "10000000000000000000000" } ], - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "10000000000000000000000" + "initialPriceSourceAmount": "100", + "initialPriceTargetAmount": "10000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "200", + "targetAmount": "100000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "186", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "186", + "targetAmount": "100000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "174", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "174", + "targetAmount": "100000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "141", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "141", + "targetAmount": "100000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "100", + "targetAmount": "100000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "50", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "50", + "targetAmount": "100000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "25", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "25", + "targetAmount": "100000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "12", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "12", + "targetAmount": "100000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "6", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "6", + "targetAmount": "100000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "0", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "0", + "targetAmount": "100000000000000000000000" } ], - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "100000000000000000000000" + "initialPriceSourceAmount": "100", + "initialPriceTargetAmount": "100000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "200", + "targetAmount": "500000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "186", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "186", + "targetAmount": "500000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "174", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "174", + "targetAmount": "500000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "141", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "141", + "targetAmount": "500000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "100", + "targetAmount": "500000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "50", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "50", + "targetAmount": "500000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "25", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "25", + "targetAmount": "500000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "12", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "12", + "targetAmount": "500000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "6", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "6", + "targetAmount": "500000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "0", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "0", + "targetAmount": "500000000000000000000000" } ], - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "500000000000000000000000" + "initialPriceSourceAmount": "100", + "initialPriceTargetAmount": "500000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "200", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "186", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "186", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "174", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "174", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "141", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "141", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "100", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "50", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "50", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "25", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "25", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "12", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "12", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "6", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "6", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "0", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "0", + "targetAmount": "1000000000000000000000000" } ], - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "1000000000000000000000000" + "initialPriceSourceAmount": "100", + "initialPriceTargetAmount": "1000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "200", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "186", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "186", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "174", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "174", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "141", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "141", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "100", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "50", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "50", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "25", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "25", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "12", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "12", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "6", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "6", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "0", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "0", + "targetAmount": "5000000000000000000000000" } ], - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "5000000000000000000000000" + "initialPriceSourceAmount": "100", + "initialPriceTargetAmount": "5000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "200", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "186", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "186", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "174", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "174", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "141", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "141", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "100", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "50", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "50", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "25", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "25", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "12", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "12", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "6", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "6", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "0", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "0", + "targetAmount": "10000000000000000000000000" } ], - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "10000000000000000000000000" + "initialPriceSourceAmount": "100", + "initialPriceTargetAmount": "10000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000", - "tokenAmount": "100" + "sourceAmount": "2000000000000000000", + "targetAmount": "100" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632", - "tokenAmount": "100" + "sourceAmount": "1866067480132519632", + "targetAmount": "100" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730", - "tokenAmount": "100" + "sourceAmount": "1741102523397596730", + "targetAmount": "100" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572", - "tokenAmount": "100" + "sourceAmount": "1414214696931586572", + "targetAmount": "100" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009", - "tokenAmount": "100" + "sourceAmount": "1000000802254003009", + "targetAmount": "100" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504", - "tokenAmount": "100" + "sourceAmount": "500000401127001504", + "targetAmount": "100" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752", - "tokenAmount": "100" + "sourceAmount": "250000200563500752", + "targetAmount": "100" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376", - "tokenAmount": "100" + "sourceAmount": "125000100281750376", + "targetAmount": "100" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188", - "tokenAmount": "100" + "sourceAmount": "62500050140875188", + "targetAmount": "100" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349", - "tokenAmount": "100" + "sourceAmount": "1953126566902349", + "targetAmount": "100" } ], - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "100" + "initialPriceSourceAmount": "1000000000000000000", + "initialPriceTargetAmount": "100" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000", - "tokenAmount": "1000000000000000000" + "sourceAmount": "2000000000000000000", + "targetAmount": "1000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1866067480132519632", + "targetAmount": "1000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1741102523397596730", + "targetAmount": "1000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1414214696931586572", + "targetAmount": "1000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1000000802254003009", + "targetAmount": "1000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504", - "tokenAmount": "1000000000000000000" + "sourceAmount": "500000401127001504", + "targetAmount": "1000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752", - "tokenAmount": "1000000000000000000" + "sourceAmount": "250000200563500752", + "targetAmount": "1000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376", - "tokenAmount": "1000000000000000000" + "sourceAmount": "125000100281750376", + "targetAmount": "1000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188", - "tokenAmount": "1000000000000000000" + "sourceAmount": "62500050140875188", + "targetAmount": "1000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1953126566902349", + "targetAmount": "1000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "1000000000000000000" + "initialPriceSourceAmount": "1000000000000000000", + "initialPriceTargetAmount": "1000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000", - "tokenAmount": "10000000000000000000" + "sourceAmount": "2000000000000000000", + "targetAmount": "10000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1866067480132519632", + "targetAmount": "10000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1741102523397596730", + "targetAmount": "10000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1414214696931586572", + "targetAmount": "10000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1000000802254003009", + "targetAmount": "10000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504", - "tokenAmount": "10000000000000000000" + "sourceAmount": "500000401127001504", + "targetAmount": "10000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752", - "tokenAmount": "10000000000000000000" + "sourceAmount": "250000200563500752", + "targetAmount": "10000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376", - "tokenAmount": "10000000000000000000" + "sourceAmount": "125000100281750376", + "targetAmount": "10000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188", - "tokenAmount": "10000000000000000000" + "sourceAmount": "62500050140875188", + "targetAmount": "10000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1953126566902349", + "targetAmount": "10000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "10000000000000000000" + "initialPriceSourceAmount": "1000000000000000000", + "initialPriceTargetAmount": "10000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "2000000000000000000", + "targetAmount": "1000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1866067480132519632", + "targetAmount": "1000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1741102523397596730", + "targetAmount": "1000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1414214696931586572", + "targetAmount": "1000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1000000802254003009", + "targetAmount": "1000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "500000401127001504", + "targetAmount": "1000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "250000200563500752", + "targetAmount": "1000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "125000100281750376", + "targetAmount": "1000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "62500050140875188", + "targetAmount": "1000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1953126566902349", + "targetAmount": "1000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000", + "initialPriceTargetAmount": "1000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "2000000000000000000", + "targetAmount": "10000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1866067480132519632", + "targetAmount": "10000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1741102523397596730", + "targetAmount": "10000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1414214696931586572", + "targetAmount": "10000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1000000802254003009", + "targetAmount": "10000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "500000401127001504", + "targetAmount": "10000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "250000200563500752", + "targetAmount": "10000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "125000100281750376", + "targetAmount": "10000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "62500050140875188", + "targetAmount": "10000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1953126566902349", + "targetAmount": "10000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000", + "initialPriceTargetAmount": "10000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "2000000000000000000", + "targetAmount": "100000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1866067480132519632", + "targetAmount": "100000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1741102523397596730", + "targetAmount": "100000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1414214696931586572", + "targetAmount": "100000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1000000802254003009", + "targetAmount": "100000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "500000401127001504", + "targetAmount": "100000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "250000200563500752", + "targetAmount": "100000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "125000100281750376", + "targetAmount": "100000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "62500050140875188", + "targetAmount": "100000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1953126566902349", + "targetAmount": "100000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "100000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000", + "initialPriceTargetAmount": "100000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "2000000000000000000", + "targetAmount": "500000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1866067480132519632", + "targetAmount": "500000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1741102523397596730", + "targetAmount": "500000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1414214696931586572", + "targetAmount": "500000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1000000802254003009", + "targetAmount": "500000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "500000401127001504", + "targetAmount": "500000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "250000200563500752", + "targetAmount": "500000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "125000100281750376", + "targetAmount": "500000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "62500050140875188", + "targetAmount": "500000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1953126566902349", + "targetAmount": "500000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "500000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000", + "initialPriceTargetAmount": "500000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "2000000000000000000", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1866067480132519632", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1741102523397596730", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1414214696931586572", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1000000802254003009", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "500000401127001504", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "250000200563500752", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "125000100281750376", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "62500050140875188", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1953126566902349", + "targetAmount": "1000000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000", + "initialPriceTargetAmount": "1000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "2000000000000000000", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1866067480132519632", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1741102523397596730", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1414214696931586572", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1000000802254003009", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "500000401127001504", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "250000200563500752", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "125000100281750376", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "62500050140875188", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1953126566902349", + "targetAmount": "5000000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "5000000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000", + "initialPriceTargetAmount": "5000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "2000000000000000000", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1866067480132519632", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1741102523397596730", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1414214696931586572", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1000000802254003009", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "500000401127001504", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "250000200563500752", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "125000100281750376", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "62500050140875188", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1953126566902349", + "targetAmount": "10000000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000", + "initialPriceTargetAmount": "10000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000", - "tokenAmount": "100" + "sourceAmount": "20000000000000000000", + "targetAmount": "100" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320", - "tokenAmount": "100" + "sourceAmount": "18660674801325196320", + "targetAmount": "100" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307", - "tokenAmount": "100" + "sourceAmount": "17411025233975967307", + "targetAmount": "100" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725", - "tokenAmount": "100" + "sourceAmount": "14142146969315865725", + "targetAmount": "100" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092", - "tokenAmount": "100" + "sourceAmount": "10000008022540030092", + "targetAmount": "100" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046", - "tokenAmount": "100" + "sourceAmount": "5000004011270015046", + "targetAmount": "100" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523", - "tokenAmount": "100" + "sourceAmount": "2500002005635007523", + "targetAmount": "100" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761", - "tokenAmount": "100" + "sourceAmount": "1250001002817503761", + "targetAmount": "100" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880", - "tokenAmount": "100" + "sourceAmount": "625000501408751880", + "targetAmount": "100" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496", - "tokenAmount": "100" + "sourceAmount": "19531265669023496", + "targetAmount": "100" } ], - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "100" + "initialPriceSourceAmount": "10000000000000000000", + "initialPriceTargetAmount": "100" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000", - "tokenAmount": "1000000000000000000" + "sourceAmount": "20000000000000000000", + "targetAmount": "1000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320", - "tokenAmount": "1000000000000000000" + "sourceAmount": "18660674801325196320", + "targetAmount": "1000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307", - "tokenAmount": "1000000000000000000" + "sourceAmount": "17411025233975967307", + "targetAmount": "1000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725", - "tokenAmount": "1000000000000000000" + "sourceAmount": "14142146969315865725", + "targetAmount": "1000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092", - "tokenAmount": "1000000000000000000" + "sourceAmount": "10000008022540030092", + "targetAmount": "1000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046", - "tokenAmount": "1000000000000000000" + "sourceAmount": "5000004011270015046", + "targetAmount": "1000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523", - "tokenAmount": "1000000000000000000" + "sourceAmount": "2500002005635007523", + "targetAmount": "1000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1250001002817503761", + "targetAmount": "1000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880", - "tokenAmount": "1000000000000000000" + "sourceAmount": "625000501408751880", + "targetAmount": "1000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496", - "tokenAmount": "1000000000000000000" + "sourceAmount": "19531265669023496", + "targetAmount": "1000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "1000000000000000000" + "initialPriceSourceAmount": "10000000000000000000", + "initialPriceTargetAmount": "1000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000", - "tokenAmount": "10000000000000000000" + "sourceAmount": "20000000000000000000", + "targetAmount": "10000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320", - "tokenAmount": "10000000000000000000" + "sourceAmount": "18660674801325196320", + "targetAmount": "10000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307", - "tokenAmount": "10000000000000000000" + "sourceAmount": "17411025233975967307", + "targetAmount": "10000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725", - "tokenAmount": "10000000000000000000" + "sourceAmount": "14142146969315865725", + "targetAmount": "10000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092", - "tokenAmount": "10000000000000000000" + "sourceAmount": "10000008022540030092", + "targetAmount": "10000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046", - "tokenAmount": "10000000000000000000" + "sourceAmount": "5000004011270015046", + "targetAmount": "10000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523", - "tokenAmount": "10000000000000000000" + "sourceAmount": "2500002005635007523", + "targetAmount": "10000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1250001002817503761", + "targetAmount": "10000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880", - "tokenAmount": "10000000000000000000" + "sourceAmount": "625000501408751880", + "targetAmount": "10000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496", - "tokenAmount": "10000000000000000000" + "sourceAmount": "19531265669023496", + "targetAmount": "10000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "10000000000000000000" + "initialPriceSourceAmount": "10000000000000000000", + "initialPriceTargetAmount": "10000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "20000000000000000000", + "targetAmount": "1000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "18660674801325196320", + "targetAmount": "1000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "17411025233975967307", + "targetAmount": "1000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "14142146969315865725", + "targetAmount": "1000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "10000008022540030092", + "targetAmount": "1000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "5000004011270015046", + "targetAmount": "1000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "2500002005635007523", + "targetAmount": "1000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1250001002817503761", + "targetAmount": "1000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "625000501408751880", + "targetAmount": "1000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "19531265669023496", + "targetAmount": "1000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000", + "initialPriceTargetAmount": "1000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "20000000000000000000", + "targetAmount": "10000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "18660674801325196320", + "targetAmount": "10000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "17411025233975967307", + "targetAmount": "10000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "14142146969315865725", + "targetAmount": "10000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "10000008022540030092", + "targetAmount": "10000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "5000004011270015046", + "targetAmount": "10000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "2500002005635007523", + "targetAmount": "10000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1250001002817503761", + "targetAmount": "10000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "625000501408751880", + "targetAmount": "10000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "19531265669023496", + "targetAmount": "10000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000", + "initialPriceTargetAmount": "10000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "20000000000000000000", + "targetAmount": "100000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "18660674801325196320", + "targetAmount": "100000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "17411025233975967307", + "targetAmount": "100000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "14142146969315865725", + "targetAmount": "100000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "10000008022540030092", + "targetAmount": "100000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "5000004011270015046", + "targetAmount": "100000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "2500002005635007523", + "targetAmount": "100000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1250001002817503761", + "targetAmount": "100000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "625000501408751880", + "targetAmount": "100000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "19531265669023496", + "targetAmount": "100000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "100000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000", + "initialPriceTargetAmount": "100000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "20000000000000000000", + "targetAmount": "500000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "18660674801325196320", + "targetAmount": "500000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "17411025233975967307", + "targetAmount": "500000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "14142146969315865725", + "targetAmount": "500000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "10000008022540030092", + "targetAmount": "500000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "5000004011270015046", + "targetAmount": "500000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "2500002005635007523", + "targetAmount": "500000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1250001002817503761", + "targetAmount": "500000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "625000501408751880", + "targetAmount": "500000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "19531265669023496", + "targetAmount": "500000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "500000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000", + "initialPriceTargetAmount": "500000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "20000000000000000000", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "18660674801325196320", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "17411025233975967307", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "14142146969315865725", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "10000008022540030092", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "5000004011270015046", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "2500002005635007523", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1250001002817503761", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "625000501408751880", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "19531265669023496", + "targetAmount": "1000000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000", + "initialPriceTargetAmount": "1000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "20000000000000000000", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "18660674801325196320", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "17411025233975967307", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "14142146969315865725", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "10000008022540030092", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "5000004011270015046", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "2500002005635007523", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1250001002817503761", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "625000501408751880", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "19531265669023496", + "targetAmount": "5000000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "5000000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000", + "initialPriceTargetAmount": "5000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "20000000000000000000", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "18660674801325196320", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "17411025233975967307", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "14142146969315865725", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "10000008022540030092", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "5000004011270015046", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "2500002005635007523", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1250001002817503761", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "625000501408751880", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "19531265669023496", + "targetAmount": "10000000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000", + "initialPriceTargetAmount": "10000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000", - "tokenAmount": "100" + "sourceAmount": "2000000000000000000000", + "targetAmount": "100" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088", - "tokenAmount": "100" + "sourceAmount": "1866067480132519632088", + "targetAmount": "100" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750", - "tokenAmount": "100" + "sourceAmount": "1741102523397596730750", + "targetAmount": "100" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533", - "tokenAmount": "100" + "sourceAmount": "1414214696931586572533", + "targetAmount": "100" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210", - "tokenAmount": "100" + "sourceAmount": "1000000802254003009210", + "targetAmount": "100" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605", - "tokenAmount": "100" + "sourceAmount": "500000401127001504605", + "targetAmount": "100" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302", - "tokenAmount": "100" + "sourceAmount": "250000200563500752302", + "targetAmount": "100" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151", - "tokenAmount": "100" + "sourceAmount": "125000100281750376151", + "targetAmount": "100" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075", - "tokenAmount": "100" + "sourceAmount": "62500050140875188075", + "targetAmount": "100" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627", - "tokenAmount": "100" + "sourceAmount": "1953126566902349627", + "targetAmount": "100" } ], - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "100" + "initialPriceSourceAmount": "1000000000000000000000", + "initialPriceTargetAmount": "100" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000", - "tokenAmount": "1000000000000000000" + "sourceAmount": "2000000000000000000000", + "targetAmount": "1000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1866067480132519632088", + "targetAmount": "1000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1741102523397596730750", + "targetAmount": "1000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1414214696931586572533", + "targetAmount": "1000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1000000802254003009210", + "targetAmount": "1000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605", - "tokenAmount": "1000000000000000000" + "sourceAmount": "500000401127001504605", + "targetAmount": "1000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302", - "tokenAmount": "1000000000000000000" + "sourceAmount": "250000200563500752302", + "targetAmount": "1000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151", - "tokenAmount": "1000000000000000000" + "sourceAmount": "125000100281750376151", + "targetAmount": "1000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075", - "tokenAmount": "1000000000000000000" + "sourceAmount": "62500050140875188075", + "targetAmount": "1000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1953126566902349627", + "targetAmount": "1000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000" + "initialPriceSourceAmount": "1000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000", - "tokenAmount": "10000000000000000000" + "sourceAmount": "2000000000000000000000", + "targetAmount": "10000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1866067480132519632088", + "targetAmount": "10000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1741102523397596730750", + "targetAmount": "10000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1414214696931586572533", + "targetAmount": "10000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1000000802254003009210", + "targetAmount": "10000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605", - "tokenAmount": "10000000000000000000" + "sourceAmount": "500000401127001504605", + "targetAmount": "10000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302", - "tokenAmount": "10000000000000000000" + "sourceAmount": "250000200563500752302", + "targetAmount": "10000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151", - "tokenAmount": "10000000000000000000" + "sourceAmount": "125000100281750376151", + "targetAmount": "10000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075", - "tokenAmount": "10000000000000000000" + "sourceAmount": "62500050140875188075", + "targetAmount": "10000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1953126566902349627", + "targetAmount": "10000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000" + "initialPriceSourceAmount": "1000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "2000000000000000000000", + "targetAmount": "1000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1866067480132519632088", + "targetAmount": "1000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1741102523397596730750", + "targetAmount": "1000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1414214696931586572533", + "targetAmount": "1000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1000000802254003009210", + "targetAmount": "1000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "500000401127001504605", + "targetAmount": "1000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "250000200563500752302", + "targetAmount": "1000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "125000100281750376151", + "targetAmount": "1000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "62500050140875188075", + "targetAmount": "1000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1953126566902349627", + "targetAmount": "1000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "2000000000000000000000", + "targetAmount": "10000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1866067480132519632088", + "targetAmount": "10000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1741102523397596730750", + "targetAmount": "10000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1414214696931586572533", + "targetAmount": "10000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1000000802254003009210", + "targetAmount": "10000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "500000401127001504605", + "targetAmount": "10000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "250000200563500752302", + "targetAmount": "10000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "125000100281750376151", + "targetAmount": "10000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "62500050140875188075", + "targetAmount": "10000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1953126566902349627", + "targetAmount": "10000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "2000000000000000000000", + "targetAmount": "100000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1866067480132519632088", + "targetAmount": "100000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1741102523397596730750", + "targetAmount": "100000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1414214696931586572533", + "targetAmount": "100000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1000000802254003009210", + "targetAmount": "100000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "500000401127001504605", + "targetAmount": "100000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "250000200563500752302", + "targetAmount": "100000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "125000100281750376151", + "targetAmount": "100000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "62500050140875188075", + "targetAmount": "100000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1953126566902349627", + "targetAmount": "100000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "100000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000000", + "initialPriceTargetAmount": "100000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "2000000000000000000000", + "targetAmount": "500000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1866067480132519632088", + "targetAmount": "500000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1741102523397596730750", + "targetAmount": "500000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1414214696931586572533", + "targetAmount": "500000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1000000802254003009210", + "targetAmount": "500000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "500000401127001504605", + "targetAmount": "500000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "250000200563500752302", + "targetAmount": "500000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "125000100281750376151", + "targetAmount": "500000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "62500050140875188075", + "targetAmount": "500000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1953126566902349627", + "targetAmount": "500000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "500000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000000", + "initialPriceTargetAmount": "500000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "2000000000000000000000", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1866067480132519632088", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1741102523397596730750", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1414214696931586572533", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1000000802254003009210", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "500000401127001504605", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "250000200563500752302", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "125000100281750376151", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "62500050140875188075", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1953126566902349627", + "targetAmount": "1000000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "2000000000000000000000", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1866067480132519632088", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1741102523397596730750", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1414214696931586572533", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1000000802254003009210", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "500000401127001504605", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "250000200563500752302", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "125000100281750376151", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "62500050140875188075", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1953126566902349627", + "targetAmount": "5000000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "5000000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000000", + "initialPriceTargetAmount": "5000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "2000000000000000000000", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1866067480132519632088", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1741102523397596730750", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1414214696931586572533", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1000000802254003009210", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "500000401127001504605", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "250000200563500752302", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "125000100281750376151", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "62500050140875188075", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1953126566902349627", + "targetAmount": "10000000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000", - "tokenAmount": "100" + "sourceAmount": "20000000000000000000000", + "targetAmount": "100" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886", - "tokenAmount": "100" + "sourceAmount": "18660674801325196320886", + "targetAmount": "100" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506", - "tokenAmount": "100" + "sourceAmount": "17411025233975967307506", + "targetAmount": "100" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336", - "tokenAmount": "100" + "sourceAmount": "14142146969315865725336", + "targetAmount": "100" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109", - "tokenAmount": "100" + "sourceAmount": "10000008022540030092109", + "targetAmount": "100" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054", - "tokenAmount": "100" + "sourceAmount": "5000004011270015046054", + "targetAmount": "100" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027", - "tokenAmount": "100" + "sourceAmount": "2500002005635007523027", + "targetAmount": "100" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513", - "tokenAmount": "100" + "sourceAmount": "1250001002817503761513", + "targetAmount": "100" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756", - "tokenAmount": "100" + "sourceAmount": "625000501408751880756", + "targetAmount": "100" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273", - "tokenAmount": "100" + "sourceAmount": "19531265669023496273", + "targetAmount": "100" } ], - "initialPriceEthAmount": "10000000000000000000000", - "initialPriceTokenAmount": "100" + "initialPriceSourceAmount": "10000000000000000000000", + "initialPriceTargetAmount": "100" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000", - "tokenAmount": "1000000000000000000" + "sourceAmount": "20000000000000000000000", + "targetAmount": "1000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886", - "tokenAmount": "1000000000000000000" + "sourceAmount": "18660674801325196320886", + "targetAmount": "1000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506", - "tokenAmount": "1000000000000000000" + "sourceAmount": "17411025233975967307506", + "targetAmount": "1000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336", - "tokenAmount": "1000000000000000000" + "sourceAmount": "14142146969315865725336", + "targetAmount": "1000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109", - "tokenAmount": "1000000000000000000" + "sourceAmount": "10000008022540030092109", + "targetAmount": "1000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054", - "tokenAmount": "1000000000000000000" + "sourceAmount": "5000004011270015046054", + "targetAmount": "1000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027", - "tokenAmount": "1000000000000000000" + "sourceAmount": "2500002005635007523027", + "targetAmount": "1000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1250001002817503761513", + "targetAmount": "1000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756", - "tokenAmount": "1000000000000000000" + "sourceAmount": "625000501408751880756", + "targetAmount": "1000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273", - "tokenAmount": "1000000000000000000" + "sourceAmount": "19531265669023496273", + "targetAmount": "1000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000" + "initialPriceSourceAmount": "10000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000", - "tokenAmount": "10000000000000000000" + "sourceAmount": "20000000000000000000000", + "targetAmount": "10000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886", - "tokenAmount": "10000000000000000000" + "sourceAmount": "18660674801325196320886", + "targetAmount": "10000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506", - "tokenAmount": "10000000000000000000" + "sourceAmount": "17411025233975967307506", + "targetAmount": "10000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336", - "tokenAmount": "10000000000000000000" + "sourceAmount": "14142146969315865725336", + "targetAmount": "10000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109", - "tokenAmount": "10000000000000000000" + "sourceAmount": "10000008022540030092109", + "targetAmount": "10000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054", - "tokenAmount": "10000000000000000000" + "sourceAmount": "5000004011270015046054", + "targetAmount": "10000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027", - "tokenAmount": "10000000000000000000" + "sourceAmount": "2500002005635007523027", + "targetAmount": "10000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1250001002817503761513", + "targetAmount": "10000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756", - "tokenAmount": "10000000000000000000" + "sourceAmount": "625000501408751880756", + "targetAmount": "10000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273", - "tokenAmount": "10000000000000000000" + "sourceAmount": "19531265669023496273", + "targetAmount": "10000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000" + "initialPriceSourceAmount": "10000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "20000000000000000000000", + "targetAmount": "1000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "18660674801325196320886", + "targetAmount": "1000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "17411025233975967307506", + "targetAmount": "1000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "14142146969315865725336", + "targetAmount": "1000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "10000008022540030092109", + "targetAmount": "1000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "5000004011270015046054", + "targetAmount": "1000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "2500002005635007523027", + "targetAmount": "1000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1250001002817503761513", + "targetAmount": "1000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "625000501408751880756", + "targetAmount": "1000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "19531265669023496273", + "targetAmount": "1000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "20000000000000000000000", + "targetAmount": "10000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "18660674801325196320886", + "targetAmount": "10000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "17411025233975967307506", + "targetAmount": "10000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "14142146969315865725336", + "targetAmount": "10000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "10000008022540030092109", + "targetAmount": "10000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "5000004011270015046054", + "targetAmount": "10000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "2500002005635007523027", + "targetAmount": "10000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1250001002817503761513", + "targetAmount": "10000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "625000501408751880756", + "targetAmount": "10000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "19531265669023496273", + "targetAmount": "10000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "20000000000000000000000", + "targetAmount": "100000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "18660674801325196320886", + "targetAmount": "100000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "17411025233975967307506", + "targetAmount": "100000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "14142146969315865725336", + "targetAmount": "100000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "10000008022540030092109", + "targetAmount": "100000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "5000004011270015046054", + "targetAmount": "100000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "2500002005635007523027", + "targetAmount": "100000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1250001002817503761513", + "targetAmount": "100000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "625000501408751880756", + "targetAmount": "100000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "19531265669023496273", + "targetAmount": "100000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000000", - "initialPriceTokenAmount": "100000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000000", + "initialPriceTargetAmount": "100000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "20000000000000000000000", + "targetAmount": "500000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "18660674801325196320886", + "targetAmount": "500000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "17411025233975967307506", + "targetAmount": "500000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "14142146969315865725336", + "targetAmount": "500000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "10000008022540030092109", + "targetAmount": "500000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "5000004011270015046054", + "targetAmount": "500000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "2500002005635007523027", + "targetAmount": "500000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1250001002817503761513", + "targetAmount": "500000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "625000501408751880756", + "targetAmount": "500000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "19531265669023496273", + "targetAmount": "500000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000000", - "initialPriceTokenAmount": "500000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000000", + "initialPriceTargetAmount": "500000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "20000000000000000000000", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "18660674801325196320886", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "17411025233975967307506", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "14142146969315865725336", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "10000008022540030092109", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "5000004011270015046054", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "2500002005635007523027", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1250001002817503761513", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "625000501408751880756", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "19531265669023496273", + "targetAmount": "1000000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "20000000000000000000000", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "18660674801325196320886", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "17411025233975967307506", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "14142146969315865725336", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "10000008022540030092109", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "5000004011270015046054", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "2500002005635007523027", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1250001002817503761513", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "625000501408751880756", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "19531265669023496273", + "targetAmount": "5000000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000000", - "initialPriceTokenAmount": "5000000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000000", + "initialPriceTargetAmount": "5000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "20000000000000000000000", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "18660674801325196320886", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "17411025233975967307506", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "14142146969315865725336", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "10000008022540030092109", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "5000004011270015046054", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "2500002005635007523027", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1250001002817503761513", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "625000501408751880756", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "19531265669023496273", + "targetAmount": "10000000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200000000000000000000000", - "tokenAmount": "100" + "sourceAmount": "200000000000000000000000", + "targetAmount": "100" }, { "timestamp": "86400", - "ethAmount": "186606748013251963208869", - "tokenAmount": "100" + "sourceAmount": "186606748013251963208869", + "targetAmount": "100" }, { "timestamp": "172800", - "ethAmount": "174110252339759673075068", - "tokenAmount": "100" + "sourceAmount": "174110252339759673075068", + "targetAmount": "100" }, { "timestamp": "432000", - "ethAmount": "141421469693158657253364", - "tokenAmount": "100" + "sourceAmount": "141421469693158657253364", + "targetAmount": "100" }, { "timestamp": "864000", - "ethAmount": "100000080225400300921096", - "tokenAmount": "100" + "sourceAmount": "100000080225400300921096", + "targetAmount": "100" }, { "timestamp": "1728000", - "ethAmount": "50000040112700150460548", - "tokenAmount": "100" + "sourceAmount": "50000040112700150460548", + "targetAmount": "100" }, { "timestamp": "2592000", - "ethAmount": "25000020056350075230274", - "tokenAmount": "100" + "sourceAmount": "25000020056350075230274", + "targetAmount": "100" }, { "timestamp": "3456000", - "ethAmount": "12500010028175037615137", - "tokenAmount": "100" + "sourceAmount": "12500010028175037615137", + "targetAmount": "100" }, { "timestamp": "4320000", - "ethAmount": "6250005014087518807568", - "tokenAmount": "100" + "sourceAmount": "6250005014087518807568", + "targetAmount": "100" }, { "timestamp": "8640000", - "ethAmount": "195312656690234962736", - "tokenAmount": "100" + "sourceAmount": "195312656690234962736", + "targetAmount": "100" } ], - "initialPriceEthAmount": "100000000000000000000000", - "initialPriceTokenAmount": "100" + "initialPriceSourceAmount": "100000000000000000000000", + "initialPriceTargetAmount": "100" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200000000000000000000000", - "tokenAmount": "1000000000000000000" + "sourceAmount": "200000000000000000000000", + "targetAmount": "1000000000000000000" }, { "timestamp": "86400", - "ethAmount": "186606748013251963208869", - "tokenAmount": "1000000000000000000" + "sourceAmount": "186606748013251963208869", + "targetAmount": "1000000000000000000" }, { "timestamp": "172800", - "ethAmount": "174110252339759673075068", - "tokenAmount": "1000000000000000000" + "sourceAmount": "174110252339759673075068", + "targetAmount": "1000000000000000000" }, { "timestamp": "432000", - "ethAmount": "141421469693158657253364", - "tokenAmount": "1000000000000000000" + "sourceAmount": "141421469693158657253364", + "targetAmount": "1000000000000000000" }, { "timestamp": "864000", - "ethAmount": "100000080225400300921096", - "tokenAmount": "1000000000000000000" + "sourceAmount": "100000080225400300921096", + "targetAmount": "1000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "50000040112700150460548", - "tokenAmount": "1000000000000000000" + "sourceAmount": "50000040112700150460548", + "targetAmount": "1000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "25000020056350075230274", - "tokenAmount": "1000000000000000000" + "sourceAmount": "25000020056350075230274", + "targetAmount": "1000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "12500010028175037615137", - "tokenAmount": "1000000000000000000" + "sourceAmount": "12500010028175037615137", + "targetAmount": "1000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "6250005014087518807568", - "tokenAmount": "1000000000000000000" + "sourceAmount": "6250005014087518807568", + "targetAmount": "1000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "195312656690234962736", - "tokenAmount": "1000000000000000000" + "sourceAmount": "195312656690234962736", + "targetAmount": "1000000000000000000" } ], - "initialPriceEthAmount": "100000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000" + "initialPriceSourceAmount": "100000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200000000000000000000000", - "tokenAmount": "10000000000000000000" + "sourceAmount": "200000000000000000000000", + "targetAmount": "10000000000000000000" }, { "timestamp": "86400", - "ethAmount": "186606748013251963208869", - "tokenAmount": "10000000000000000000" + "sourceAmount": "186606748013251963208869", + "targetAmount": "10000000000000000000" }, { "timestamp": "172800", - "ethAmount": "174110252339759673075068", - "tokenAmount": "10000000000000000000" + "sourceAmount": "174110252339759673075068", + "targetAmount": "10000000000000000000" }, { "timestamp": "432000", - "ethAmount": "141421469693158657253364", - "tokenAmount": "10000000000000000000" + "sourceAmount": "141421469693158657253364", + "targetAmount": "10000000000000000000" }, { "timestamp": "864000", - "ethAmount": "100000080225400300921096", - "tokenAmount": "10000000000000000000" + "sourceAmount": "100000080225400300921096", + "targetAmount": "10000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "50000040112700150460548", - "tokenAmount": "10000000000000000000" + "sourceAmount": "50000040112700150460548", + "targetAmount": "10000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "25000020056350075230274", - "tokenAmount": "10000000000000000000" + "sourceAmount": "25000020056350075230274", + "targetAmount": "10000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "12500010028175037615137", - "tokenAmount": "10000000000000000000" + "sourceAmount": "12500010028175037615137", + "targetAmount": "10000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "6250005014087518807568", - "tokenAmount": "10000000000000000000" + "sourceAmount": "6250005014087518807568", + "targetAmount": "10000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "195312656690234962736", - "tokenAmount": "10000000000000000000" + "sourceAmount": "195312656690234962736", + "targetAmount": "10000000000000000000" } ], - "initialPriceEthAmount": "100000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000" + "initialPriceSourceAmount": "100000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200000000000000000000000", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "200000000000000000000000", + "targetAmount": "1000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "186606748013251963208869", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "186606748013251963208869", + "targetAmount": "1000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "174110252339759673075068", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "174110252339759673075068", + "targetAmount": "1000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "141421469693158657253364", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "141421469693158657253364", + "targetAmount": "1000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "100000080225400300921096", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "100000080225400300921096", + "targetAmount": "1000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "50000040112700150460548", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "50000040112700150460548", + "targetAmount": "1000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "25000020056350075230274", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "25000020056350075230274", + "targetAmount": "1000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "12500010028175037615137", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "12500010028175037615137", + "targetAmount": "1000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "6250005014087518807568", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "6250005014087518807568", + "targetAmount": "1000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "195312656690234962736", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "195312656690234962736", + "targetAmount": "1000000000000000000000" } ], - "initialPriceEthAmount": "100000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000" + "initialPriceSourceAmount": "100000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200000000000000000000000", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "200000000000000000000000", + "targetAmount": "10000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "186606748013251963208869", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "186606748013251963208869", + "targetAmount": "10000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "174110252339759673075068", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "174110252339759673075068", + "targetAmount": "10000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "141421469693158657253364", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "141421469693158657253364", + "targetAmount": "10000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "100000080225400300921096", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "100000080225400300921096", + "targetAmount": "10000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "50000040112700150460548", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "50000040112700150460548", + "targetAmount": "10000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "25000020056350075230274", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "25000020056350075230274", + "targetAmount": "10000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "12500010028175037615137", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "12500010028175037615137", + "targetAmount": "10000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "6250005014087518807568", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "6250005014087518807568", + "targetAmount": "10000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "195312656690234962736", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "195312656690234962736", + "targetAmount": "10000000000000000000000" } ], - "initialPriceEthAmount": "100000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000" + "initialPriceSourceAmount": "100000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200000000000000000000000", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "200000000000000000000000", + "targetAmount": "100000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "186606748013251963208869", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "186606748013251963208869", + "targetAmount": "100000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "174110252339759673075068", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "174110252339759673075068", + "targetAmount": "100000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "141421469693158657253364", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "141421469693158657253364", + "targetAmount": "100000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "100000080225400300921096", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "100000080225400300921096", + "targetAmount": "100000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "50000040112700150460548", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "50000040112700150460548", + "targetAmount": "100000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "25000020056350075230274", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "25000020056350075230274", + "targetAmount": "100000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "12500010028175037615137", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "12500010028175037615137", + "targetAmount": "100000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "6250005014087518807568", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "6250005014087518807568", + "targetAmount": "100000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "195312656690234962736", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "195312656690234962736", + "targetAmount": "100000000000000000000000" } ], - "initialPriceEthAmount": "100000000000000000000000", - "initialPriceTokenAmount": "100000000000000000000000" + "initialPriceSourceAmount": "100000000000000000000000", + "initialPriceTargetAmount": "100000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200000000000000000000000", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "200000000000000000000000", + "targetAmount": "500000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "186606748013251963208869", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "186606748013251963208869", + "targetAmount": "500000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "174110252339759673075068", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "174110252339759673075068", + "targetAmount": "500000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "141421469693158657253364", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "141421469693158657253364", + "targetAmount": "500000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "100000080225400300921096", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "100000080225400300921096", + "targetAmount": "500000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "50000040112700150460548", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "50000040112700150460548", + "targetAmount": "500000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "25000020056350075230274", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "25000020056350075230274", + "targetAmount": "500000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "12500010028175037615137", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "12500010028175037615137", + "targetAmount": "500000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "6250005014087518807568", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "6250005014087518807568", + "targetAmount": "500000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "195312656690234962736", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "195312656690234962736", + "targetAmount": "500000000000000000000000" } ], - "initialPriceEthAmount": "100000000000000000000000", - "initialPriceTokenAmount": "500000000000000000000000" + "initialPriceSourceAmount": "100000000000000000000000", + "initialPriceTargetAmount": "500000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200000000000000000000000", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "200000000000000000000000", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "186606748013251963208869", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "186606748013251963208869", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "174110252339759673075068", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "174110252339759673075068", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "141421469693158657253364", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "141421469693158657253364", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "100000080225400300921096", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "100000080225400300921096", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "50000040112700150460548", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "50000040112700150460548", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "25000020056350075230274", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "25000020056350075230274", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "12500010028175037615137", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "12500010028175037615137", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "6250005014087518807568", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "6250005014087518807568", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "195312656690234962736", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "195312656690234962736", + "targetAmount": "1000000000000000000000000" } ], - "initialPriceEthAmount": "100000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000000" + "initialPriceSourceAmount": "100000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200000000000000000000000", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "200000000000000000000000", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "186606748013251963208869", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "186606748013251963208869", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "174110252339759673075068", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "174110252339759673075068", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "141421469693158657253364", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "141421469693158657253364", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "100000080225400300921096", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "100000080225400300921096", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "50000040112700150460548", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "50000040112700150460548", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "25000020056350075230274", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "25000020056350075230274", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "12500010028175037615137", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "12500010028175037615137", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "6250005014087518807568", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "6250005014087518807568", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "195312656690234962736", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "195312656690234962736", + "targetAmount": "5000000000000000000000000" } ], - "initialPriceEthAmount": "100000000000000000000000", - "initialPriceTokenAmount": "5000000000000000000000000" + "initialPriceSourceAmount": "100000000000000000000000", + "initialPriceTargetAmount": "5000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "200000000000000000000000", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "200000000000000000000000", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "186606748013251963208869", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "186606748013251963208869", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "174110252339759673075068", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "174110252339759673075068", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "141421469693158657253364", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "141421469693158657253364", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "100000080225400300921096", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "100000080225400300921096", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "50000040112700150460548", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "50000040112700150460548", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "25000020056350075230274", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "25000020056350075230274", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "12500010028175037615137", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "12500010028175037615137", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "6250005014087518807568", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "6250005014087518807568", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "195312656690234962736", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "195312656690234962736", + "targetAmount": "10000000000000000000000000" } ], - "initialPriceEthAmount": "100000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000000" + "initialPriceSourceAmount": "100000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "1000000000000000000000000", - "tokenAmount": "100" + "sourceAmount": "1000000000000000000000000", + "targetAmount": "100" }, { "timestamp": "86400", - "ethAmount": "933033740066259816044347", - "tokenAmount": "100" + "sourceAmount": "933033740066259816044347", + "targetAmount": "100" }, { "timestamp": "172800", - "ethAmount": "870551261698798365375344", - "tokenAmount": "100" + "sourceAmount": "870551261698798365375344", + "targetAmount": "100" }, { "timestamp": "432000", - "ethAmount": "707107348465793286266820", - "tokenAmount": "100" + "sourceAmount": "707107348465793286266820", + "targetAmount": "100" }, { "timestamp": "864000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "100" + "sourceAmount": "500000401127001504605481", + "targetAmount": "100" }, { "timestamp": "1728000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "100" + "sourceAmount": "250000200563500752302740", + "targetAmount": "100" }, { "timestamp": "2592000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "100" + "sourceAmount": "125000100281750376151370", + "targetAmount": "100" }, { "timestamp": "3456000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "100" + "sourceAmount": "62500050140875188075685", + "targetAmount": "100" }, { "timestamp": "4320000", - "ethAmount": "31250025070437594037842", - "tokenAmount": "100" + "sourceAmount": "31250025070437594037842", + "targetAmount": "100" }, { "timestamp": "8640000", - "ethAmount": "976563283451174813682", - "tokenAmount": "100" + "sourceAmount": "976563283451174813682", + "targetAmount": "100" } ], - "initialPriceEthAmount": "500000000000000000000000", - "initialPriceTokenAmount": "100" + "initialPriceSourceAmount": "500000000000000000000000", + "initialPriceTargetAmount": "100" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "1000000000000000000000000", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1000000000000000000000000", + "targetAmount": "1000000000000000000" }, { "timestamp": "86400", - "ethAmount": "933033740066259816044347", - "tokenAmount": "1000000000000000000" + "sourceAmount": "933033740066259816044347", + "targetAmount": "1000000000000000000" }, { "timestamp": "172800", - "ethAmount": "870551261698798365375344", - "tokenAmount": "1000000000000000000" + "sourceAmount": "870551261698798365375344", + "targetAmount": "1000000000000000000" }, { "timestamp": "432000", - "ethAmount": "707107348465793286266820", - "tokenAmount": "1000000000000000000" + "sourceAmount": "707107348465793286266820", + "targetAmount": "1000000000000000000" }, { "timestamp": "864000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "1000000000000000000" + "sourceAmount": "500000401127001504605481", + "targetAmount": "1000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "1000000000000000000" + "sourceAmount": "250000200563500752302740", + "targetAmount": "1000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "1000000000000000000" + "sourceAmount": "125000100281750376151370", + "targetAmount": "1000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "1000000000000000000" + "sourceAmount": "62500050140875188075685", + "targetAmount": "1000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "31250025070437594037842", - "tokenAmount": "1000000000000000000" + "sourceAmount": "31250025070437594037842", + "targetAmount": "1000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "976563283451174813682", - "tokenAmount": "1000000000000000000" + "sourceAmount": "976563283451174813682", + "targetAmount": "1000000000000000000" } ], - "initialPriceEthAmount": "500000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000" + "initialPriceSourceAmount": "500000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "1000000000000000000000000", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1000000000000000000000000", + "targetAmount": "10000000000000000000" }, { "timestamp": "86400", - "ethAmount": "933033740066259816044347", - "tokenAmount": "10000000000000000000" + "sourceAmount": "933033740066259816044347", + "targetAmount": "10000000000000000000" }, { "timestamp": "172800", - "ethAmount": "870551261698798365375344", - "tokenAmount": "10000000000000000000" + "sourceAmount": "870551261698798365375344", + "targetAmount": "10000000000000000000" }, { "timestamp": "432000", - "ethAmount": "707107348465793286266820", - "tokenAmount": "10000000000000000000" + "sourceAmount": "707107348465793286266820", + "targetAmount": "10000000000000000000" }, { "timestamp": "864000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "10000000000000000000" + "sourceAmount": "500000401127001504605481", + "targetAmount": "10000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "10000000000000000000" + "sourceAmount": "250000200563500752302740", + "targetAmount": "10000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "10000000000000000000" + "sourceAmount": "125000100281750376151370", + "targetAmount": "10000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "10000000000000000000" + "sourceAmount": "62500050140875188075685", + "targetAmount": "10000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "31250025070437594037842", - "tokenAmount": "10000000000000000000" + "sourceAmount": "31250025070437594037842", + "targetAmount": "10000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "976563283451174813682", - "tokenAmount": "10000000000000000000" + "sourceAmount": "976563283451174813682", + "targetAmount": "10000000000000000000" } ], - "initialPriceEthAmount": "500000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000" + "initialPriceSourceAmount": "500000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "1000000000000000000000000", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1000000000000000000000000", + "targetAmount": "1000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "933033740066259816044347", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "933033740066259816044347", + "targetAmount": "1000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "870551261698798365375344", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "870551261698798365375344", + "targetAmount": "1000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "707107348465793286266820", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "707107348465793286266820", + "targetAmount": "1000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "500000401127001504605481", + "targetAmount": "1000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "250000200563500752302740", + "targetAmount": "1000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "125000100281750376151370", + "targetAmount": "1000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "62500050140875188075685", + "targetAmount": "1000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "31250025070437594037842", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "31250025070437594037842", + "targetAmount": "1000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "976563283451174813682", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "976563283451174813682", + "targetAmount": "1000000000000000000000" } ], - "initialPriceEthAmount": "500000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000" + "initialPriceSourceAmount": "500000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "1000000000000000000000000", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1000000000000000000000000", + "targetAmount": "10000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "933033740066259816044347", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "933033740066259816044347", + "targetAmount": "10000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "870551261698798365375344", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "870551261698798365375344", + "targetAmount": "10000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "707107348465793286266820", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "707107348465793286266820", + "targetAmount": "10000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "500000401127001504605481", + "targetAmount": "10000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "250000200563500752302740", + "targetAmount": "10000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "125000100281750376151370", + "targetAmount": "10000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "62500050140875188075685", + "targetAmount": "10000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "31250025070437594037842", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "31250025070437594037842", + "targetAmount": "10000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "976563283451174813682", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "976563283451174813682", + "targetAmount": "10000000000000000000000" } ], - "initialPriceEthAmount": "500000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000" + "initialPriceSourceAmount": "500000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "1000000000000000000000000", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1000000000000000000000000", + "targetAmount": "100000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "933033740066259816044347", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "933033740066259816044347", + "targetAmount": "100000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "870551261698798365375344", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "870551261698798365375344", + "targetAmount": "100000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "707107348465793286266820", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "707107348465793286266820", + "targetAmount": "100000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "500000401127001504605481", + "targetAmount": "100000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "250000200563500752302740", + "targetAmount": "100000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "125000100281750376151370", + "targetAmount": "100000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "62500050140875188075685", + "targetAmount": "100000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "31250025070437594037842", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "31250025070437594037842", + "targetAmount": "100000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "976563283451174813682", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "976563283451174813682", + "targetAmount": "100000000000000000000000" } ], - "initialPriceEthAmount": "500000000000000000000000", - "initialPriceTokenAmount": "100000000000000000000000" + "initialPriceSourceAmount": "500000000000000000000000", + "initialPriceTargetAmount": "100000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "1000000000000000000000000", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1000000000000000000000000", + "targetAmount": "500000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "933033740066259816044347", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "933033740066259816044347", + "targetAmount": "500000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "870551261698798365375344", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "870551261698798365375344", + "targetAmount": "500000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "707107348465793286266820", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "707107348465793286266820", + "targetAmount": "500000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "500000401127001504605481", + "targetAmount": "500000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "250000200563500752302740", + "targetAmount": "500000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "125000100281750376151370", + "targetAmount": "500000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "62500050140875188075685", + "targetAmount": "500000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "31250025070437594037842", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "31250025070437594037842", + "targetAmount": "500000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "976563283451174813682", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "976563283451174813682", + "targetAmount": "500000000000000000000000" } ], - "initialPriceEthAmount": "500000000000000000000000", - "initialPriceTokenAmount": "500000000000000000000000" + "initialPriceSourceAmount": "500000000000000000000000", + "initialPriceTargetAmount": "500000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "1000000000000000000000000", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1000000000000000000000000", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "933033740066259816044347", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "933033740066259816044347", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "870551261698798365375344", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "870551261698798365375344", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "707107348465793286266820", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "707107348465793286266820", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "500000401127001504605481", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "250000200563500752302740", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "125000100281750376151370", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "62500050140875188075685", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "31250025070437594037842", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "31250025070437594037842", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "976563283451174813682", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "976563283451174813682", + "targetAmount": "1000000000000000000000000" } ], - "initialPriceEthAmount": "500000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000000" + "initialPriceSourceAmount": "500000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "1000000000000000000000000", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1000000000000000000000000", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "933033740066259816044347", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "933033740066259816044347", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "870551261698798365375344", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "870551261698798365375344", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "707107348465793286266820", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "707107348465793286266820", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "500000401127001504605481", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "250000200563500752302740", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "125000100281750376151370", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "62500050140875188075685", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "31250025070437594037842", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "31250025070437594037842", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "976563283451174813682", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "976563283451174813682", + "targetAmount": "5000000000000000000000000" } ], - "initialPriceEthAmount": "500000000000000000000000", - "initialPriceTokenAmount": "5000000000000000000000000" + "initialPriceSourceAmount": "500000000000000000000000", + "initialPriceTargetAmount": "5000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "1000000000000000000000000", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1000000000000000000000000", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "933033740066259816044347", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "933033740066259816044347", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "870551261698798365375344", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "870551261698798365375344", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "707107348465793286266820", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "707107348465793286266820", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "500000401127001504605481", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "250000200563500752302740", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "125000100281750376151370", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "62500050140875188075685", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "31250025070437594037842", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "31250025070437594037842", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "976563283451174813682", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "976563283451174813682", + "targetAmount": "10000000000000000000000000" } ], - "initialPriceEthAmount": "500000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000000" + "initialPriceSourceAmount": "500000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000000", - "tokenAmount": "100" + "sourceAmount": "2000000000000000000000000", + "targetAmount": "100" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088694", - "tokenAmount": "100" + "sourceAmount": "1866067480132519632088694", + "targetAmount": "100" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750688", - "tokenAmount": "100" + "sourceAmount": "1741102523397596730750688", + "targetAmount": "100" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533640", - "tokenAmount": "100" + "sourceAmount": "1414214696931586572533640", + "targetAmount": "100" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210963", - "tokenAmount": "100" + "sourceAmount": "1000000802254003009210963", + "targetAmount": "100" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "100" + "sourceAmount": "500000401127001504605481", + "targetAmount": "100" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "100" + "sourceAmount": "250000200563500752302740", + "targetAmount": "100" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "100" + "sourceAmount": "125000100281750376151370", + "targetAmount": "100" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "100" + "sourceAmount": "62500050140875188075685", + "targetAmount": "100" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627365", - "tokenAmount": "100" + "sourceAmount": "1953126566902349627365", + "targetAmount": "100" } ], - "initialPriceEthAmount": "1000000000000000000000000", - "initialPriceTokenAmount": "100" + "initialPriceSourceAmount": "1000000000000000000000000", + "initialPriceTargetAmount": "100" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000000", - "tokenAmount": "1000000000000000000" + "sourceAmount": "2000000000000000000000000", + "targetAmount": "1000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088694", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1866067480132519632088694", + "targetAmount": "1000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750688", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1741102523397596730750688", + "targetAmount": "1000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533640", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1414214696931586572533640", + "targetAmount": "1000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210963", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1000000802254003009210963", + "targetAmount": "1000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "1000000000000000000" + "sourceAmount": "500000401127001504605481", + "targetAmount": "1000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "1000000000000000000" + "sourceAmount": "250000200563500752302740", + "targetAmount": "1000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "1000000000000000000" + "sourceAmount": "125000100281750376151370", + "targetAmount": "1000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "1000000000000000000" + "sourceAmount": "62500050140875188075685", + "targetAmount": "1000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627365", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1953126566902349627365", + "targetAmount": "1000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000" + "initialPriceSourceAmount": "1000000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000000", - "tokenAmount": "10000000000000000000" + "sourceAmount": "2000000000000000000000000", + "targetAmount": "10000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088694", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1866067480132519632088694", + "targetAmount": "10000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750688", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1741102523397596730750688", + "targetAmount": "10000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533640", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1414214696931586572533640", + "targetAmount": "10000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210963", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1000000802254003009210963", + "targetAmount": "10000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "10000000000000000000" + "sourceAmount": "500000401127001504605481", + "targetAmount": "10000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "10000000000000000000" + "sourceAmount": "250000200563500752302740", + "targetAmount": "10000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "10000000000000000000" + "sourceAmount": "125000100281750376151370", + "targetAmount": "10000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "10000000000000000000" + "sourceAmount": "62500050140875188075685", + "targetAmount": "10000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627365", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1953126566902349627365", + "targetAmount": "10000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000" + "initialPriceSourceAmount": "1000000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000000", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "2000000000000000000000000", + "targetAmount": "1000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088694", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1866067480132519632088694", + "targetAmount": "1000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750688", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1741102523397596730750688", + "targetAmount": "1000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533640", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1414214696931586572533640", + "targetAmount": "1000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210963", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1000000802254003009210963", + "targetAmount": "1000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "500000401127001504605481", + "targetAmount": "1000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "250000200563500752302740", + "targetAmount": "1000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "125000100281750376151370", + "targetAmount": "1000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "62500050140875188075685", + "targetAmount": "1000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627365", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1953126566902349627365", + "targetAmount": "1000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000000", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "2000000000000000000000000", + "targetAmount": "10000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088694", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1866067480132519632088694", + "targetAmount": "10000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750688", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1741102523397596730750688", + "targetAmount": "10000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533640", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1414214696931586572533640", + "targetAmount": "10000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210963", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1000000802254003009210963", + "targetAmount": "10000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "500000401127001504605481", + "targetAmount": "10000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "250000200563500752302740", + "targetAmount": "10000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "125000100281750376151370", + "targetAmount": "10000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "62500050140875188075685", + "targetAmount": "10000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627365", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1953126566902349627365", + "targetAmount": "10000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000000", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "2000000000000000000000000", + "targetAmount": "100000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088694", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1866067480132519632088694", + "targetAmount": "100000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750688", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1741102523397596730750688", + "targetAmount": "100000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533640", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1414214696931586572533640", + "targetAmount": "100000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210963", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1000000802254003009210963", + "targetAmount": "100000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "500000401127001504605481", + "targetAmount": "100000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "250000200563500752302740", + "targetAmount": "100000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "125000100281750376151370", + "targetAmount": "100000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "62500050140875188075685", + "targetAmount": "100000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627365", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1953126566902349627365", + "targetAmount": "100000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000000000", - "initialPriceTokenAmount": "100000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000000000", + "initialPriceTargetAmount": "100000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000000", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "2000000000000000000000000", + "targetAmount": "500000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088694", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1866067480132519632088694", + "targetAmount": "500000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750688", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1741102523397596730750688", + "targetAmount": "500000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533640", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1414214696931586572533640", + "targetAmount": "500000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210963", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1000000802254003009210963", + "targetAmount": "500000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "500000401127001504605481", + "targetAmount": "500000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "250000200563500752302740", + "targetAmount": "500000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "125000100281750376151370", + "targetAmount": "500000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "62500050140875188075685", + "targetAmount": "500000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627365", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1953126566902349627365", + "targetAmount": "500000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000000000", - "initialPriceTokenAmount": "500000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000000000", + "initialPriceTargetAmount": "500000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000000", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "2000000000000000000000000", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088694", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1866067480132519632088694", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750688", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1741102523397596730750688", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533640", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1414214696931586572533640", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210963", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1000000802254003009210963", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "500000401127001504605481", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "250000200563500752302740", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "125000100281750376151370", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "62500050140875188075685", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627365", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1953126566902349627365", + "targetAmount": "1000000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000000", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "2000000000000000000000000", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088694", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1866067480132519632088694", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750688", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1741102523397596730750688", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533640", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1414214696931586572533640", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210963", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1000000802254003009210963", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "500000401127001504605481", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "250000200563500752302740", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "125000100281750376151370", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "62500050140875188075685", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627365", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1953126566902349627365", + "targetAmount": "5000000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000000000", - "initialPriceTokenAmount": "5000000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000000000", + "initialPriceTargetAmount": "5000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "2000000000000000000000000", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "2000000000000000000000000", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "1866067480132519632088694", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1866067480132519632088694", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "1741102523397596730750688", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1741102523397596730750688", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "1414214696931586572533640", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1414214696931586572533640", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "1000000802254003009210963", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1000000802254003009210963", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "500000401127001504605481", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "500000401127001504605481", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "250000200563500752302740", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "250000200563500752302740", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "125000100281750376151370", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "125000100281750376151370", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "62500050140875188075685", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "62500050140875188075685", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "1953126566902349627365", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1953126566902349627365", + "targetAmount": "10000000000000000000000000" } ], - "initialPriceEthAmount": "1000000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000000" + "initialPriceSourceAmount": "1000000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "10000000000000000000000000", - "tokenAmount": "100" + "sourceAmount": "10000000000000000000000000", + "targetAmount": "100" }, { "timestamp": "86400", - "ethAmount": "9330337400662598160443472", - "tokenAmount": "100" + "sourceAmount": "9330337400662598160443472", + "targetAmount": "100" }, { "timestamp": "172800", - "ethAmount": "8705512616987983653753443", - "tokenAmount": "100" + "sourceAmount": "8705512616987983653753443", + "targetAmount": "100" }, { "timestamp": "432000", - "ethAmount": "7071073484657932862668202", - "tokenAmount": "100" + "sourceAmount": "7071073484657932862668202", + "targetAmount": "100" }, { "timestamp": "864000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "100" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "100" }, { "timestamp": "1728000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "100" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "100" }, { "timestamp": "2592000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "100" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "100" }, { "timestamp": "3456000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "100" + "sourceAmount": "625000501408751880756852", + "targetAmount": "100" }, { "timestamp": "4320000", - "ethAmount": "312500250704375940378426", - "tokenAmount": "100" + "sourceAmount": "312500250704375940378426", + "targetAmount": "100" }, { "timestamp": "8640000", - "ethAmount": "9765632834511748136825", - "tokenAmount": "100" + "sourceAmount": "9765632834511748136825", + "targetAmount": "100" } ], - "initialPriceEthAmount": "5000000000000000000000000", - "initialPriceTokenAmount": "100" + "initialPriceSourceAmount": "5000000000000000000000000", + "initialPriceTargetAmount": "100" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "10000000000000000000000000", - "tokenAmount": "1000000000000000000" + "sourceAmount": "10000000000000000000000000", + "targetAmount": "1000000000000000000" }, { "timestamp": "86400", - "ethAmount": "9330337400662598160443472", - "tokenAmount": "1000000000000000000" + "sourceAmount": "9330337400662598160443472", + "targetAmount": "1000000000000000000" }, { "timestamp": "172800", - "ethAmount": "8705512616987983653753443", - "tokenAmount": "1000000000000000000" + "sourceAmount": "8705512616987983653753443", + "targetAmount": "1000000000000000000" }, { "timestamp": "432000", - "ethAmount": "7071073484657932862668202", - "tokenAmount": "1000000000000000000" + "sourceAmount": "7071073484657932862668202", + "targetAmount": "1000000000000000000" }, { "timestamp": "864000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "1000000000000000000" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "1000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "1000000000000000000" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "1000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "1000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "1000000000000000000" + "sourceAmount": "625000501408751880756852", + "targetAmount": "1000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "312500250704375940378426", - "tokenAmount": "1000000000000000000" + "sourceAmount": "312500250704375940378426", + "targetAmount": "1000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "9765632834511748136825", - "tokenAmount": "1000000000000000000" + "sourceAmount": "9765632834511748136825", + "targetAmount": "1000000000000000000" } ], - "initialPriceEthAmount": "5000000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000" + "initialPriceSourceAmount": "5000000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "10000000000000000000000000", - "tokenAmount": "10000000000000000000" + "sourceAmount": "10000000000000000000000000", + "targetAmount": "10000000000000000000" }, { "timestamp": "86400", - "ethAmount": "9330337400662598160443472", - "tokenAmount": "10000000000000000000" + "sourceAmount": "9330337400662598160443472", + "targetAmount": "10000000000000000000" }, { "timestamp": "172800", - "ethAmount": "8705512616987983653753443", - "tokenAmount": "10000000000000000000" + "sourceAmount": "8705512616987983653753443", + "targetAmount": "10000000000000000000" }, { "timestamp": "432000", - "ethAmount": "7071073484657932862668202", - "tokenAmount": "10000000000000000000" + "sourceAmount": "7071073484657932862668202", + "targetAmount": "10000000000000000000" }, { "timestamp": "864000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "10000000000000000000" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "10000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "10000000000000000000" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "10000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "10000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "10000000000000000000" + "sourceAmount": "625000501408751880756852", + "targetAmount": "10000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "312500250704375940378426", - "tokenAmount": "10000000000000000000" + "sourceAmount": "312500250704375940378426", + "targetAmount": "10000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "9765632834511748136825", - "tokenAmount": "10000000000000000000" + "sourceAmount": "9765632834511748136825", + "targetAmount": "10000000000000000000" } ], - "initialPriceEthAmount": "5000000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000" + "initialPriceSourceAmount": "5000000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "10000000000000000000000000", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "10000000000000000000000000", + "targetAmount": "1000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "9330337400662598160443472", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "9330337400662598160443472", + "targetAmount": "1000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "8705512616987983653753443", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "8705512616987983653753443", + "targetAmount": "1000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "7071073484657932862668202", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "7071073484657932862668202", + "targetAmount": "1000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "1000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "1000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "1000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "625000501408751880756852", + "targetAmount": "1000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "312500250704375940378426", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "312500250704375940378426", + "targetAmount": "1000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "9765632834511748136825", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "9765632834511748136825", + "targetAmount": "1000000000000000000000" } ], - "initialPriceEthAmount": "5000000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000" + "initialPriceSourceAmount": "5000000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "10000000000000000000000000", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "10000000000000000000000000", + "targetAmount": "10000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "9330337400662598160443472", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "9330337400662598160443472", + "targetAmount": "10000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "8705512616987983653753443", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "8705512616987983653753443", + "targetAmount": "10000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "7071073484657932862668202", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "7071073484657932862668202", + "targetAmount": "10000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "10000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "10000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "10000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "625000501408751880756852", + "targetAmount": "10000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "312500250704375940378426", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "312500250704375940378426", + "targetAmount": "10000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "9765632834511748136825", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "9765632834511748136825", + "targetAmount": "10000000000000000000000" } ], - "initialPriceEthAmount": "5000000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000" + "initialPriceSourceAmount": "5000000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "10000000000000000000000000", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "10000000000000000000000000", + "targetAmount": "100000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "9330337400662598160443472", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "9330337400662598160443472", + "targetAmount": "100000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "8705512616987983653753443", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "8705512616987983653753443", + "targetAmount": "100000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "7071073484657932862668202", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "7071073484657932862668202", + "targetAmount": "100000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "100000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "100000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "100000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "625000501408751880756852", + "targetAmount": "100000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "312500250704375940378426", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "312500250704375940378426", + "targetAmount": "100000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "9765632834511748136825", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "9765632834511748136825", + "targetAmount": "100000000000000000000000" } ], - "initialPriceEthAmount": "5000000000000000000000000", - "initialPriceTokenAmount": "100000000000000000000000" + "initialPriceSourceAmount": "5000000000000000000000000", + "initialPriceTargetAmount": "100000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "10000000000000000000000000", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "10000000000000000000000000", + "targetAmount": "500000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "9330337400662598160443472", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "9330337400662598160443472", + "targetAmount": "500000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "8705512616987983653753443", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "8705512616987983653753443", + "targetAmount": "500000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "7071073484657932862668202", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "7071073484657932862668202", + "targetAmount": "500000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "500000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "500000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "500000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "625000501408751880756852", + "targetAmount": "500000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "312500250704375940378426", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "312500250704375940378426", + "targetAmount": "500000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "9765632834511748136825", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "9765632834511748136825", + "targetAmount": "500000000000000000000000" } ], - "initialPriceEthAmount": "5000000000000000000000000", - "initialPriceTokenAmount": "500000000000000000000000" + "initialPriceSourceAmount": "5000000000000000000000000", + "initialPriceTargetAmount": "500000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "10000000000000000000000000", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "10000000000000000000000000", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "9330337400662598160443472", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "9330337400662598160443472", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "8705512616987983653753443", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "8705512616987983653753443", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "7071073484657932862668202", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "7071073484657932862668202", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "625000501408751880756852", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "312500250704375940378426", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "312500250704375940378426", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "9765632834511748136825", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "9765632834511748136825", + "targetAmount": "1000000000000000000000000" } ], - "initialPriceEthAmount": "5000000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000000" + "initialPriceSourceAmount": "5000000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "10000000000000000000000000", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "10000000000000000000000000", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "9330337400662598160443472", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "9330337400662598160443472", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "8705512616987983653753443", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "8705512616987983653753443", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "7071073484657932862668202", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "7071073484657932862668202", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "625000501408751880756852", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "312500250704375940378426", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "312500250704375940378426", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "9765632834511748136825", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "9765632834511748136825", + "targetAmount": "5000000000000000000000000" } ], - "initialPriceEthAmount": "5000000000000000000000000", - "initialPriceTokenAmount": "5000000000000000000000000" + "initialPriceSourceAmount": "5000000000000000000000000", + "initialPriceTargetAmount": "5000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "10000000000000000000000000", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "10000000000000000000000000", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "9330337400662598160443472", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "9330337400662598160443472", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "8705512616987983653753443", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "8705512616987983653753443", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "7071073484657932862668202", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "7071073484657932862668202", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "625000501408751880756852", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "312500250704375940378426", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "312500250704375940378426", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "9765632834511748136825", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "9765632834511748136825", + "targetAmount": "10000000000000000000000000" } ], - "initialPriceEthAmount": "5000000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000000" + "initialPriceSourceAmount": "5000000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000000", - "tokenAmount": "100" + "sourceAmount": "20000000000000000000000000", + "targetAmount": "100" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886945", - "tokenAmount": "100" + "sourceAmount": "18660674801325196320886945", + "targetAmount": "100" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506887", - "tokenAmount": "100" + "sourceAmount": "17411025233975967307506887", + "targetAmount": "100" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336404", - "tokenAmount": "100" + "sourceAmount": "14142146969315865725336404", + "targetAmount": "100" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109633", - "tokenAmount": "100" + "sourceAmount": "10000008022540030092109633", + "targetAmount": "100" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "100" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "100" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "100" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "100" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "100" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "100" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "100" + "sourceAmount": "625000501408751880756852", + "targetAmount": "100" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273651", - "tokenAmount": "100" + "sourceAmount": "19531265669023496273651", + "targetAmount": "100" } ], - "initialPriceEthAmount": "10000000000000000000000000", - "initialPriceTokenAmount": "100" + "initialPriceSourceAmount": "10000000000000000000000000", + "initialPriceTargetAmount": "100" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000000", - "tokenAmount": "1000000000000000000" + "sourceAmount": "20000000000000000000000000", + "targetAmount": "1000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886945", - "tokenAmount": "1000000000000000000" + "sourceAmount": "18660674801325196320886945", + "targetAmount": "1000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506887", - "tokenAmount": "1000000000000000000" + "sourceAmount": "17411025233975967307506887", + "targetAmount": "1000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336404", - "tokenAmount": "1000000000000000000" + "sourceAmount": "14142146969315865725336404", + "targetAmount": "1000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109633", - "tokenAmount": "1000000000000000000" + "sourceAmount": "10000008022540030092109633", + "targetAmount": "1000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "1000000000000000000" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "1000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "1000000000000000000" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "1000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "1000000000000000000" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "1000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "1000000000000000000" + "sourceAmount": "625000501408751880756852", + "targetAmount": "1000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273651", - "tokenAmount": "1000000000000000000" + "sourceAmount": "19531265669023496273651", + "targetAmount": "1000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000" + "initialPriceSourceAmount": "10000000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000000", - "tokenAmount": "10000000000000000000" + "sourceAmount": "20000000000000000000000000", + "targetAmount": "10000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886945", - "tokenAmount": "10000000000000000000" + "sourceAmount": "18660674801325196320886945", + "targetAmount": "10000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506887", - "tokenAmount": "10000000000000000000" + "sourceAmount": "17411025233975967307506887", + "targetAmount": "10000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336404", - "tokenAmount": "10000000000000000000" + "sourceAmount": "14142146969315865725336404", + "targetAmount": "10000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109633", - "tokenAmount": "10000000000000000000" + "sourceAmount": "10000008022540030092109633", + "targetAmount": "10000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "10000000000000000000" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "10000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "10000000000000000000" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "10000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "10000000000000000000" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "10000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "10000000000000000000" + "sourceAmount": "625000501408751880756852", + "targetAmount": "10000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273651", - "tokenAmount": "10000000000000000000" + "sourceAmount": "19531265669023496273651", + "targetAmount": "10000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000" + "initialPriceSourceAmount": "10000000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000000", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "20000000000000000000000000", + "targetAmount": "1000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886945", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "18660674801325196320886945", + "targetAmount": "1000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506887", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "17411025233975967307506887", + "targetAmount": "1000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336404", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "14142146969315865725336404", + "targetAmount": "1000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109633", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "10000008022540030092109633", + "targetAmount": "1000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "1000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "1000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "1000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "625000501408751880756852", + "targetAmount": "1000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273651", - "tokenAmount": "1000000000000000000000" + "sourceAmount": "19531265669023496273651", + "targetAmount": "1000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000000", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "20000000000000000000000000", + "targetAmount": "10000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886945", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "18660674801325196320886945", + "targetAmount": "10000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506887", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "17411025233975967307506887", + "targetAmount": "10000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336404", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "14142146969315865725336404", + "targetAmount": "10000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109633", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "10000008022540030092109633", + "targetAmount": "10000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "10000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "10000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "10000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "625000501408751880756852", + "targetAmount": "10000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273651", - "tokenAmount": "10000000000000000000000" + "sourceAmount": "19531265669023496273651", + "targetAmount": "10000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000000", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "20000000000000000000000000", + "targetAmount": "100000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886945", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "18660674801325196320886945", + "targetAmount": "100000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506887", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "17411025233975967307506887", + "targetAmount": "100000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336404", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "14142146969315865725336404", + "targetAmount": "100000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109633", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "10000008022540030092109633", + "targetAmount": "100000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "100000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "100000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "100000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "625000501408751880756852", + "targetAmount": "100000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273651", - "tokenAmount": "100000000000000000000000" + "sourceAmount": "19531265669023496273651", + "targetAmount": "100000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000000000", - "initialPriceTokenAmount": "100000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000000000", + "initialPriceTargetAmount": "100000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000000", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "20000000000000000000000000", + "targetAmount": "500000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886945", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "18660674801325196320886945", + "targetAmount": "500000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506887", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "17411025233975967307506887", + "targetAmount": "500000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336404", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "14142146969315865725336404", + "targetAmount": "500000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109633", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "10000008022540030092109633", + "targetAmount": "500000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "500000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "500000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "500000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "625000501408751880756852", + "targetAmount": "500000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273651", - "tokenAmount": "500000000000000000000000" + "sourceAmount": "19531265669023496273651", + "targetAmount": "500000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000000000", - "initialPriceTokenAmount": "500000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000000000", + "initialPriceTargetAmount": "500000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000000", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "20000000000000000000000000", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886945", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "18660674801325196320886945", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506887", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "17411025233975967307506887", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336404", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "14142146969315865725336404", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109633", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "10000008022540030092109633", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "625000501408751880756852", + "targetAmount": "1000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273651", - "tokenAmount": "1000000000000000000000000" + "sourceAmount": "19531265669023496273651", + "targetAmount": "1000000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000000000", + "initialPriceTargetAmount": "1000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000000", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "20000000000000000000000000", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886945", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "18660674801325196320886945", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506887", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "17411025233975967307506887", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336404", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "14142146969315865725336404", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109633", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "10000008022540030092109633", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "625000501408751880756852", + "targetAmount": "5000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273651", - "tokenAmount": "5000000000000000000000000" + "sourceAmount": "19531265669023496273651", + "targetAmount": "5000000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000000000", - "initialPriceTokenAmount": "5000000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000000000", + "initialPriceTargetAmount": "5000000000000000000000000" }, { "tokenPriceAtTimestamps": [ { "timestamp": "1", - "ethAmount": "20000000000000000000000000", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "20000000000000000000000000", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "86400", - "ethAmount": "18660674801325196320886945", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "18660674801325196320886945", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "172800", - "ethAmount": "17411025233975967307506887", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "17411025233975967307506887", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "432000", - "ethAmount": "14142146969315865725336404", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "14142146969315865725336404", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "864000", - "ethAmount": "10000008022540030092109633", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "10000008022540030092109633", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "1728000", - "ethAmount": "5000004011270015046054816", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "5000004011270015046054816", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "2592000", - "ethAmount": "2500002005635007523027408", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "2500002005635007523027408", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "3456000", - "ethAmount": "1250001002817503761513704", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "1250001002817503761513704", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "4320000", - "ethAmount": "625000501408751880756852", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "625000501408751880756852", + "targetAmount": "10000000000000000000000000" }, { "timestamp": "8640000", - "ethAmount": "19531265669023496273651", - "tokenAmount": "10000000000000000000000000" + "sourceAmount": "19531265669023496273651", + "targetAmount": "10000000000000000000000000" } ], - "initialPriceEthAmount": "10000000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000000" + "initialPriceSourceAmount": "10000000000000000000000000", + "initialPriceTargetAmount": "10000000000000000000000000" } ] } diff --git a/test/helpers/data/polPricingTestDataEth.json b/test/helpers/data/polPricingTestDataEth.json deleted file mode 100644 index 8a87725c..00000000 --- a/test/helpers/data/polPricingTestDataEth.json +++ /dev/null @@ -1,3084 +0,0 @@ -{ - "testCase": [ - { - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "100", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100", - "tokenAmount": "200" - }, - { - "timestamp": "86400", - "ethAmount": "100", - "tokenAmount": "186" - }, - { - "timestamp": "172800", - "ethAmount": "100", - "tokenAmount": "174" - }, - { - "timestamp": "432000", - "ethAmount": "100", - "tokenAmount": "141" - }, - { - "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "100" - }, - { - "timestamp": "1728000", - "ethAmount": "100", - "tokenAmount": "50" - }, - { - "timestamp": "2592000", - "ethAmount": "100", - "tokenAmount": "25" - }, - { - "timestamp": "3456000", - "ethAmount": "100", - "tokenAmount": "12" - }, - { - "timestamp": "4320000", - "ethAmount": "100", - "tokenAmount": "6" - }, - { - "timestamp": "8640000", - "ethAmount": "100", - "tokenAmount": "0" - } - ] - }, - { - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "1000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100", - "tokenAmount": "2000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100", - "tokenAmount": "1866067480132519632" - }, - { - "timestamp": "172800", - "ethAmount": "100", - "tokenAmount": "1741102523397596730" - }, - { - "timestamp": "432000", - "ethAmount": "100", - "tokenAmount": "1414214696931586572" - }, - { - "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "1000000802254003009" - }, - { - "timestamp": "1728000", - "ethAmount": "100", - "tokenAmount": "500000401127001504" - }, - { - "timestamp": "2592000", - "ethAmount": "100", - "tokenAmount": "250000200563500752" - }, - { - "timestamp": "3456000", - "ethAmount": "100", - "tokenAmount": "125000100281750376" - }, - { - "timestamp": "4320000", - "ethAmount": "100", - "tokenAmount": "62500050140875188" - }, - { - "timestamp": "8640000", - "ethAmount": "100", - "tokenAmount": "1953126566902349" - } - ] - }, - { - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "10000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100", - "tokenAmount": "20000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100", - "tokenAmount": "18660674801325196320" - }, - { - "timestamp": "172800", - "ethAmount": "100", - "tokenAmount": "17411025233975967307" - }, - { - "timestamp": "432000", - "ethAmount": "100", - "tokenAmount": "14142146969315865725" - }, - { - "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "10000008022540030092" - }, - { - "timestamp": "1728000", - "ethAmount": "100", - "tokenAmount": "5000004011270015046" - }, - { - "timestamp": "2592000", - "ethAmount": "100", - "tokenAmount": "2500002005635007523" - }, - { - "timestamp": "3456000", - "ethAmount": "100", - "tokenAmount": "1250001002817503761" - }, - { - "timestamp": "4320000", - "ethAmount": "100", - "tokenAmount": "625000501408751880" - }, - { - "timestamp": "8640000", - "ethAmount": "100", - "tokenAmount": "19531265669023496" - } - ] - }, - { - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "100000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100", - "tokenAmount": "200000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100", - "tokenAmount": "186606748013251963208" - }, - { - "timestamp": "172800", - "ethAmount": "100", - "tokenAmount": "174110252339759673075" - }, - { - "timestamp": "432000", - "ethAmount": "100", - "tokenAmount": "141421469693158657253" - }, - { - "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "100000080225400300921" - }, - { - "timestamp": "1728000", - "ethAmount": "100", - "tokenAmount": "50000040112700150460" - }, - { - "timestamp": "2592000", - "ethAmount": "100", - "tokenAmount": "25000020056350075230" - }, - { - "timestamp": "3456000", - "ethAmount": "100", - "tokenAmount": "12500010028175037615" - }, - { - "timestamp": "4320000", - "ethAmount": "100", - "tokenAmount": "6250005014087518807" - }, - { - "timestamp": "8640000", - "ethAmount": "100", - "tokenAmount": "195312656690234962" - } - ] - }, - { - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "1000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100", - "tokenAmount": "2000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100", - "tokenAmount": "1866067480132519632088" - }, - { - "timestamp": "172800", - "ethAmount": "100", - "tokenAmount": "1741102523397596730750" - }, - { - "timestamp": "432000", - "ethAmount": "100", - "tokenAmount": "1414214696931586572533" - }, - { - "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "1000000802254003009210" - }, - { - "timestamp": "1728000", - "ethAmount": "100", - "tokenAmount": "500000401127001504605" - }, - { - "timestamp": "2592000", - "ethAmount": "100", - "tokenAmount": "250000200563500752302" - }, - { - "timestamp": "3456000", - "ethAmount": "100", - "tokenAmount": "125000100281750376151" - }, - { - "timestamp": "4320000", - "ethAmount": "100", - "tokenAmount": "62500050140875188075" - }, - { - "timestamp": "8640000", - "ethAmount": "100", - "tokenAmount": "1953126566902349627" - } - ] - }, - { - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "1200000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100", - "tokenAmount": "2400000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100", - "tokenAmount": "2239280976159023558506" - }, - { - "timestamp": "172800", - "ethAmount": "100", - "tokenAmount": "2089323028077116076900" - }, - { - "timestamp": "432000", - "ethAmount": "100", - "tokenAmount": "1697057636317903887040" - }, - { - "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "1200000962704803611053" - }, - { - "timestamp": "1728000", - "ethAmount": "100", - "tokenAmount": "600000481352401805526" - }, - { - "timestamp": "2592000", - "ethAmount": "100", - "tokenAmount": "300000240676200902763" - }, - { - "timestamp": "3456000", - "ethAmount": "100", - "tokenAmount": "150000120338100451381" - }, - { - "timestamp": "4320000", - "ethAmount": "100", - "tokenAmount": "75000060169050225690" - }, - { - "timestamp": "8640000", - "ethAmount": "100", - "tokenAmount": "2343751880282819552" - } - ] - }, - { - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "1500000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100", - "tokenAmount": "3000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100", - "tokenAmount": "2799101220198779448133" - }, - { - "timestamp": "172800", - "ethAmount": "100", - "tokenAmount": "2611653785096395096126" - }, - { - "timestamp": "432000", - "ethAmount": "100", - "tokenAmount": "2121322045397379858800" - }, - { - "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "1500001203381004513816" - }, - { - "timestamp": "1728000", - "ethAmount": "100", - "tokenAmount": "750000601690502256908" - }, - { - "timestamp": "2592000", - "ethAmount": "100", - "tokenAmount": "375000300845251128454" - }, - { - "timestamp": "3456000", - "ethAmount": "100", - "tokenAmount": "187500150422625564227" - }, - { - "timestamp": "4320000", - "ethAmount": "100", - "tokenAmount": "93750075211312782113" - }, - { - "timestamp": "8640000", - "ethAmount": "100", - "tokenAmount": "2929689850353524441" - } - ] - }, - { - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "2000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100", - "tokenAmount": "4000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100", - "tokenAmount": "3732134960265039264177" - }, - { - "timestamp": "172800", - "ethAmount": "100", - "tokenAmount": "3482205046795193461501" - }, - { - "timestamp": "432000", - "ethAmount": "100", - "tokenAmount": "2828429393863173145067" - }, - { - "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "2000001604508006018421" - }, - { - "timestamp": "1728000", - "ethAmount": "100", - "tokenAmount": "1000000802254003009210" - }, - { - "timestamp": "2592000", - "ethAmount": "100", - "tokenAmount": "500000401127001504605" - }, - { - "timestamp": "3456000", - "ethAmount": "100", - "tokenAmount": "250000200563500752302" - }, - { - "timestamp": "4320000", - "ethAmount": "100", - "tokenAmount": "125000100281750376151" - }, - { - "timestamp": "8640000", - "ethAmount": "100", - "tokenAmount": "3906253133804699254" - } - ] - }, - { - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "2400000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100", - "tokenAmount": "4800000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100", - "tokenAmount": "4478561952318047117012" - }, - { - "timestamp": "172800", - "ethAmount": "100", - "tokenAmount": "4178646056154232153801" - }, - { - "timestamp": "432000", - "ethAmount": "100", - "tokenAmount": "3394115272635807774080" - }, - { - "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "2400001925409607222106" - }, - { - "timestamp": "1728000", - "ethAmount": "100", - "tokenAmount": "1200000962704803611053" - }, - { - "timestamp": "2592000", - "ethAmount": "100", - "tokenAmount": "600000481352401805526" - }, - { - "timestamp": "3456000", - "ethAmount": "100", - "tokenAmount": "300000240676200902763" - }, - { - "timestamp": "4320000", - "ethAmount": "100", - "tokenAmount": "150000120338100451381" - }, - { - "timestamp": "8640000", - "ethAmount": "100", - "tokenAmount": "4687503760565639105" - } - ] - }, - { - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "3000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100", - "tokenAmount": "6000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100", - "tokenAmount": "5598202440397558896266" - }, - { - "timestamp": "172800", - "ethAmount": "100", - "tokenAmount": "5223307570192790192252" - }, - { - "timestamp": "432000", - "ethAmount": "100", - "tokenAmount": "4242644090794759717600" - }, - { - "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "3000002406762009027632" - }, - { - "timestamp": "1728000", - "ethAmount": "100", - "tokenAmount": "1500001203381004513816" - }, - { - "timestamp": "2592000", - "ethAmount": "100", - "tokenAmount": "750000601690502256908" - }, - { - "timestamp": "3456000", - "ethAmount": "100", - "tokenAmount": "375000300845251128454" - }, - { - "timestamp": "4320000", - "ethAmount": "100", - "tokenAmount": "187500150422625564227" - }, - { - "timestamp": "8640000", - "ethAmount": "100", - "tokenAmount": "5859379700707048882" - } - ] - }, - { - "initialPriceEthAmount": "100", - "initialPriceTokenAmount": "10000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100", - "tokenAmount": "20000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100", - "tokenAmount": "18660674801325196320886" - }, - { - "timestamp": "172800", - "ethAmount": "100", - "tokenAmount": "17411025233975967307506" - }, - { - "timestamp": "432000", - "ethAmount": "100", - "tokenAmount": "14142146969315865725336" - }, - { - "timestamp": "864000", - "ethAmount": "100", - "tokenAmount": "10000008022540030092109" - }, - { - "timestamp": "1728000", - "ethAmount": "100", - "tokenAmount": "5000004011270015046054" - }, - { - "timestamp": "2592000", - "ethAmount": "100", - "tokenAmount": "2500002005635007523027" - }, - { - "timestamp": "3456000", - "ethAmount": "100", - "tokenAmount": "1250001002817503761513" - }, - { - "timestamp": "4320000", - "ethAmount": "100", - "tokenAmount": "625000501408751880756" - }, - { - "timestamp": "8640000", - "ethAmount": "100", - "tokenAmount": "19531265669023496273" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "100", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000", - "tokenAmount": "200" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000", - "tokenAmount": "186" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000", - "tokenAmount": "174" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000", - "tokenAmount": "141" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000", - "tokenAmount": "100" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000", - "tokenAmount": "50" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000", - "tokenAmount": "25" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000", - "tokenAmount": "12" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000", - "tokenAmount": "6" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000", - "tokenAmount": "0" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "1000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000", - "tokenAmount": "2000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000", - "tokenAmount": "1866067480132519632" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000", - "tokenAmount": "1741102523397596730" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000", - "tokenAmount": "1414214696931586572" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000", - "tokenAmount": "1000000802254003009" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000", - "tokenAmount": "500000401127001504" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000", - "tokenAmount": "250000200563500752" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000", - "tokenAmount": "125000100281750376" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000", - "tokenAmount": "62500050140875188" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000", - "tokenAmount": "1953126566902349" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "10000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000", - "tokenAmount": "20000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000", - "tokenAmount": "18660674801325196320" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000", - "tokenAmount": "17411025233975967307" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000", - "tokenAmount": "14142146969315865725" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000", - "tokenAmount": "10000008022540030092" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000", - "tokenAmount": "5000004011270015046" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000", - "tokenAmount": "2500002005635007523" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000", - "tokenAmount": "1250001002817503761" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000", - "tokenAmount": "625000501408751880" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000", - "tokenAmount": "19531265669023496" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "100000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000", - "tokenAmount": "200000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000", - "tokenAmount": "186606748013251963208" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000", - "tokenAmount": "174110252339759673075" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000", - "tokenAmount": "141421469693158657253" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000", - "tokenAmount": "100000080225400300921" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000", - "tokenAmount": "50000040112700150460" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000", - "tokenAmount": "25000020056350075230" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000", - "tokenAmount": "12500010028175037615" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000", - "tokenAmount": "6250005014087518807" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000", - "tokenAmount": "195312656690234962" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000", - "tokenAmount": "2000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000", - "tokenAmount": "1866067480132519632088" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000", - "tokenAmount": "1741102523397596730750" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000", - "tokenAmount": "1414214696931586572533" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000", - "tokenAmount": "1000000802254003009210" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000", - "tokenAmount": "500000401127001504605" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000", - "tokenAmount": "250000200563500752302" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000", - "tokenAmount": "125000100281750376151" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000", - "tokenAmount": "62500050140875188075" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000", - "tokenAmount": "1953126566902349627" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "1200000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000", - "tokenAmount": "2400000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000", - "tokenAmount": "2239280976159023558506" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000", - "tokenAmount": "2089323028077116076900" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000", - "tokenAmount": "1697057636317903887040" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000", - "tokenAmount": "1200000962704803611053" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000", - "tokenAmount": "600000481352401805526" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000", - "tokenAmount": "300000240676200902763" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000", - "tokenAmount": "150000120338100451381" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000", - "tokenAmount": "75000060169050225690" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000", - "tokenAmount": "2343751880282819552" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "1500000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000", - "tokenAmount": "3000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000", - "tokenAmount": "2799101220198779448133" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000", - "tokenAmount": "2611653785096395096126" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000", - "tokenAmount": "2121322045397379858800" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000", - "tokenAmount": "1500001203381004513816" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000", - "tokenAmount": "750000601690502256908" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000", - "tokenAmount": "375000300845251128454" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000", - "tokenAmount": "187500150422625564227" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000", - "tokenAmount": "93750075211312782113" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000", - "tokenAmount": "2929689850353524441" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "2000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000", - "tokenAmount": "4000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000", - "tokenAmount": "3732134960265039264177" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000", - "tokenAmount": "3482205046795193461501" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000", - "tokenAmount": "2828429393863173145067" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000", - "tokenAmount": "2000001604508006018421" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000", - "tokenAmount": "1000000802254003009210" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000", - "tokenAmount": "500000401127001504605" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000", - "tokenAmount": "250000200563500752302" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000", - "tokenAmount": "125000100281750376151" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000", - "tokenAmount": "3906253133804699254" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "2400000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000", - "tokenAmount": "4800000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000", - "tokenAmount": "4478561952318047117012" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000", - "tokenAmount": "4178646056154232153801" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000", - "tokenAmount": "3394115272635807774080" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000", - "tokenAmount": "2400001925409607222106" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000", - "tokenAmount": "1200000962704803611053" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000", - "tokenAmount": "600000481352401805526" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000", - "tokenAmount": "300000240676200902763" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000", - "tokenAmount": "150000120338100451381" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000", - "tokenAmount": "4687503760565639105" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "3000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000", - "tokenAmount": "6000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000", - "tokenAmount": "5598202440397558896266" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000", - "tokenAmount": "5223307570192790192252" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000", - "tokenAmount": "4242644090794759717600" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000", - "tokenAmount": "3000002406762009027632" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000", - "tokenAmount": "1500001203381004513816" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000", - "tokenAmount": "750000601690502256908" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000", - "tokenAmount": "375000300845251128454" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000", - "tokenAmount": "187500150422625564227" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000", - "tokenAmount": "5859379700707048882" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000", - "tokenAmount": "20000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000", - "tokenAmount": "18660674801325196320886" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000", - "tokenAmount": "17411025233975967307506" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000", - "tokenAmount": "14142146969315865725336" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000", - "tokenAmount": "10000008022540030092109" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000", - "tokenAmount": "5000004011270015046054" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000", - "tokenAmount": "2500002005635007523027" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000", - "tokenAmount": "1250001002817503761513" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000", - "tokenAmount": "625000501408751880756" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000", - "tokenAmount": "19531265669023496273" - } - ] - }, - { - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "100", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "10000000000000000000", - "tokenAmount": "200" - }, - { - "timestamp": "86400", - "ethAmount": "10000000000000000000", - "tokenAmount": "186" - }, - { - "timestamp": "172800", - "ethAmount": "10000000000000000000", - "tokenAmount": "174" - }, - { - "timestamp": "432000", - "ethAmount": "10000000000000000000", - "tokenAmount": "141" - }, - { - "timestamp": "864000", - "ethAmount": "10000000000000000000", - "tokenAmount": "100" - }, - { - "timestamp": "1728000", - "ethAmount": "10000000000000000000", - "tokenAmount": "50" - }, - { - "timestamp": "2592000", - "ethAmount": "10000000000000000000", - "tokenAmount": "25" - }, - { - "timestamp": "3456000", - "ethAmount": "10000000000000000000", - "tokenAmount": "12" - }, - { - "timestamp": "4320000", - "ethAmount": "10000000000000000000", - "tokenAmount": "6" - }, - { - "timestamp": "8640000", - "ethAmount": "10000000000000000000", - "tokenAmount": "0" - } - ] - }, - { - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "1000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "10000000000000000000", - "tokenAmount": "2000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "10000000000000000000", - "tokenAmount": "1866067480132519632" - }, - { - "timestamp": "172800", - "ethAmount": "10000000000000000000", - "tokenAmount": "1741102523397596730" - }, - { - "timestamp": "432000", - "ethAmount": "10000000000000000000", - "tokenAmount": "1414214696931586572" - }, - { - "timestamp": "864000", - "ethAmount": "10000000000000000000", - "tokenAmount": "1000000802254003009" - }, - { - "timestamp": "1728000", - "ethAmount": "10000000000000000000", - "tokenAmount": "500000401127001504" - }, - { - "timestamp": "2592000", - "ethAmount": "10000000000000000000", - "tokenAmount": "250000200563500752" - }, - { - "timestamp": "3456000", - "ethAmount": "10000000000000000000", - "tokenAmount": "125000100281750376" - }, - { - "timestamp": "4320000", - "ethAmount": "10000000000000000000", - "tokenAmount": "62500050140875188" - }, - { - "timestamp": "8640000", - "ethAmount": "10000000000000000000", - "tokenAmount": "1953126566902349" - } - ] - }, - { - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "10000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "10000000000000000000", - "tokenAmount": "20000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "10000000000000000000", - "tokenAmount": "18660674801325196320" - }, - { - "timestamp": "172800", - "ethAmount": "10000000000000000000", - "tokenAmount": "17411025233975967307" - }, - { - "timestamp": "432000", - "ethAmount": "10000000000000000000", - "tokenAmount": "14142146969315865725" - }, - { - "timestamp": "864000", - "ethAmount": "10000000000000000000", - "tokenAmount": "10000008022540030092" - }, - { - "timestamp": "1728000", - "ethAmount": "10000000000000000000", - "tokenAmount": "5000004011270015046" - }, - { - "timestamp": "2592000", - "ethAmount": "10000000000000000000", - "tokenAmount": "2500002005635007523" - }, - { - "timestamp": "3456000", - "ethAmount": "10000000000000000000", - "tokenAmount": "1250001002817503761" - }, - { - "timestamp": "4320000", - "ethAmount": "10000000000000000000", - "tokenAmount": "625000501408751880" - }, - { - "timestamp": "8640000", - "ethAmount": "10000000000000000000", - "tokenAmount": "19531265669023496" - } - ] - }, - { - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "100000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "10000000000000000000", - "tokenAmount": "200000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "10000000000000000000", - "tokenAmount": "186606748013251963208" - }, - { - "timestamp": "172800", - "ethAmount": "10000000000000000000", - "tokenAmount": "174110252339759673075" - }, - { - "timestamp": "432000", - "ethAmount": "10000000000000000000", - "tokenAmount": "141421469693158657253" - }, - { - "timestamp": "864000", - "ethAmount": "10000000000000000000", - "tokenAmount": "100000080225400300921" - }, - { - "timestamp": "1728000", - "ethAmount": "10000000000000000000", - "tokenAmount": "50000040112700150460" - }, - { - "timestamp": "2592000", - "ethAmount": "10000000000000000000", - "tokenAmount": "25000020056350075230" - }, - { - "timestamp": "3456000", - "ethAmount": "10000000000000000000", - "tokenAmount": "12500010028175037615" - }, - { - "timestamp": "4320000", - "ethAmount": "10000000000000000000", - "tokenAmount": "6250005014087518807" - }, - { - "timestamp": "8640000", - "ethAmount": "10000000000000000000", - "tokenAmount": "195312656690234962" - } - ] - }, - { - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "10000000000000000000", - "tokenAmount": "2000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "10000000000000000000", - "tokenAmount": "1866067480132519632088" - }, - { - "timestamp": "172800", - "ethAmount": "10000000000000000000", - "tokenAmount": "1741102523397596730750" - }, - { - "timestamp": "432000", - "ethAmount": "10000000000000000000", - "tokenAmount": "1414214696931586572533" - }, - { - "timestamp": "864000", - "ethAmount": "10000000000000000000", - "tokenAmount": "1000000802254003009210" - }, - { - "timestamp": "1728000", - "ethAmount": "10000000000000000000", - "tokenAmount": "500000401127001504605" - }, - { - "timestamp": "2592000", - "ethAmount": "10000000000000000000", - "tokenAmount": "250000200563500752302" - }, - { - "timestamp": "3456000", - "ethAmount": "10000000000000000000", - "tokenAmount": "125000100281750376151" - }, - { - "timestamp": "4320000", - "ethAmount": "10000000000000000000", - "tokenAmount": "62500050140875188075" - }, - { - "timestamp": "8640000", - "ethAmount": "10000000000000000000", - "tokenAmount": "1953126566902349627" - } - ] - }, - { - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "1200000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "10000000000000000000", - "tokenAmount": "2400000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "10000000000000000000", - "tokenAmount": "2239280976159023558506" - }, - { - "timestamp": "172800", - "ethAmount": "10000000000000000000", - "tokenAmount": "2089323028077116076900" - }, - { - "timestamp": "432000", - "ethAmount": "10000000000000000000", - "tokenAmount": "1697057636317903887040" - }, - { - "timestamp": "864000", - "ethAmount": "10000000000000000000", - "tokenAmount": "1200000962704803611053" - }, - { - "timestamp": "1728000", - "ethAmount": "10000000000000000000", - "tokenAmount": "600000481352401805526" - }, - { - "timestamp": "2592000", - "ethAmount": "10000000000000000000", - "tokenAmount": "300000240676200902763" - }, - { - "timestamp": "3456000", - "ethAmount": "10000000000000000000", - "tokenAmount": "150000120338100451381" - }, - { - "timestamp": "4320000", - "ethAmount": "10000000000000000000", - "tokenAmount": "75000060169050225690" - }, - { - "timestamp": "8640000", - "ethAmount": "10000000000000000000", - "tokenAmount": "2343751880282819552" - } - ] - }, - { - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "1500000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "10000000000000000000", - "tokenAmount": "3000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "10000000000000000000", - "tokenAmount": "2799101220198779448133" - }, - { - "timestamp": "172800", - "ethAmount": "10000000000000000000", - "tokenAmount": "2611653785096395096126" - }, - { - "timestamp": "432000", - "ethAmount": "10000000000000000000", - "tokenAmount": "2121322045397379858800" - }, - { - "timestamp": "864000", - "ethAmount": "10000000000000000000", - "tokenAmount": "1500001203381004513816" - }, - { - "timestamp": "1728000", - "ethAmount": "10000000000000000000", - "tokenAmount": "750000601690502256908" - }, - { - "timestamp": "2592000", - "ethAmount": "10000000000000000000", - "tokenAmount": "375000300845251128454" - }, - { - "timestamp": "3456000", - "ethAmount": "10000000000000000000", - "tokenAmount": "187500150422625564227" - }, - { - "timestamp": "4320000", - "ethAmount": "10000000000000000000", - "tokenAmount": "93750075211312782113" - }, - { - "timestamp": "8640000", - "ethAmount": "10000000000000000000", - "tokenAmount": "2929689850353524441" - } - ] - }, - { - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "2000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "10000000000000000000", - "tokenAmount": "4000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "10000000000000000000", - "tokenAmount": "3732134960265039264177" - }, - { - "timestamp": "172800", - "ethAmount": "10000000000000000000", - "tokenAmount": "3482205046795193461501" - }, - { - "timestamp": "432000", - "ethAmount": "10000000000000000000", - "tokenAmount": "2828429393863173145067" - }, - { - "timestamp": "864000", - "ethAmount": "10000000000000000000", - "tokenAmount": "2000001604508006018421" - }, - { - "timestamp": "1728000", - "ethAmount": "10000000000000000000", - "tokenAmount": "1000000802254003009210" - }, - { - "timestamp": "2592000", - "ethAmount": "10000000000000000000", - "tokenAmount": "500000401127001504605" - }, - { - "timestamp": "3456000", - "ethAmount": "10000000000000000000", - "tokenAmount": "250000200563500752302" - }, - { - "timestamp": "4320000", - "ethAmount": "10000000000000000000", - "tokenAmount": "125000100281750376151" - }, - { - "timestamp": "8640000", - "ethAmount": "10000000000000000000", - "tokenAmount": "3906253133804699254" - } - ] - }, - { - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "2400000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "10000000000000000000", - "tokenAmount": "4800000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "10000000000000000000", - "tokenAmount": "4478561952318047117012" - }, - { - "timestamp": "172800", - "ethAmount": "10000000000000000000", - "tokenAmount": "4178646056154232153801" - }, - { - "timestamp": "432000", - "ethAmount": "10000000000000000000", - "tokenAmount": "3394115272635807774080" - }, - { - "timestamp": "864000", - "ethAmount": "10000000000000000000", - "tokenAmount": "2400001925409607222106" - }, - { - "timestamp": "1728000", - "ethAmount": "10000000000000000000", - "tokenAmount": "1200000962704803611053" - }, - { - "timestamp": "2592000", - "ethAmount": "10000000000000000000", - "tokenAmount": "600000481352401805526" - }, - { - "timestamp": "3456000", - "ethAmount": "10000000000000000000", - "tokenAmount": "300000240676200902763" - }, - { - "timestamp": "4320000", - "ethAmount": "10000000000000000000", - "tokenAmount": "150000120338100451381" - }, - { - "timestamp": "8640000", - "ethAmount": "10000000000000000000", - "tokenAmount": "4687503760565639105" - } - ] - }, - { - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "3000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "10000000000000000000", - "tokenAmount": "6000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "10000000000000000000", - "tokenAmount": "5598202440397558896266" - }, - { - "timestamp": "172800", - "ethAmount": "10000000000000000000", - "tokenAmount": "5223307570192790192252" - }, - { - "timestamp": "432000", - "ethAmount": "10000000000000000000", - "tokenAmount": "4242644090794759717600" - }, - { - "timestamp": "864000", - "ethAmount": "10000000000000000000", - "tokenAmount": "3000002406762009027632" - }, - { - "timestamp": "1728000", - "ethAmount": "10000000000000000000", - "tokenAmount": "1500001203381004513816" - }, - { - "timestamp": "2592000", - "ethAmount": "10000000000000000000", - "tokenAmount": "750000601690502256908" - }, - { - "timestamp": "3456000", - "ethAmount": "10000000000000000000", - "tokenAmount": "375000300845251128454" - }, - { - "timestamp": "4320000", - "ethAmount": "10000000000000000000", - "tokenAmount": "187500150422625564227" - }, - { - "timestamp": "8640000", - "ethAmount": "10000000000000000000", - "tokenAmount": "5859379700707048882" - } - ] - }, - { - "initialPriceEthAmount": "10000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "10000000000000000000", - "tokenAmount": "20000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "10000000000000000000", - "tokenAmount": "18660674801325196320886" - }, - { - "timestamp": "172800", - "ethAmount": "10000000000000000000", - "tokenAmount": "17411025233975967307506" - }, - { - "timestamp": "432000", - "ethAmount": "10000000000000000000", - "tokenAmount": "14142146969315865725336" - }, - { - "timestamp": "864000", - "ethAmount": "10000000000000000000", - "tokenAmount": "10000008022540030092109" - }, - { - "timestamp": "1728000", - "ethAmount": "10000000000000000000", - "tokenAmount": "5000004011270015046054" - }, - { - "timestamp": "2592000", - "ethAmount": "10000000000000000000", - "tokenAmount": "2500002005635007523027" - }, - { - "timestamp": "3456000", - "ethAmount": "10000000000000000000", - "tokenAmount": "1250001002817503761513" - }, - { - "timestamp": "4320000", - "ethAmount": "10000000000000000000", - "tokenAmount": "625000501408751880756" - }, - { - "timestamp": "8640000", - "ethAmount": "10000000000000000000", - "tokenAmount": "19531265669023496273" - } - ] - }, - { - "initialPriceEthAmount": "100000000000000000000", - "initialPriceTokenAmount": "100", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100000000000000000000", - "tokenAmount": "200" - }, - { - "timestamp": "86400", - "ethAmount": "100000000000000000000", - "tokenAmount": "186" - }, - { - "timestamp": "172800", - "ethAmount": "100000000000000000000", - "tokenAmount": "174" - }, - { - "timestamp": "432000", - "ethAmount": "100000000000000000000", - "tokenAmount": "141" - }, - { - "timestamp": "864000", - "ethAmount": "100000000000000000000", - "tokenAmount": "100" - }, - { - "timestamp": "1728000", - "ethAmount": "100000000000000000000", - "tokenAmount": "50" - }, - { - "timestamp": "2592000", - "ethAmount": "100000000000000000000", - "tokenAmount": "25" - }, - { - "timestamp": "3456000", - "ethAmount": "100000000000000000000", - "tokenAmount": "12" - }, - { - "timestamp": "4320000", - "ethAmount": "100000000000000000000", - "tokenAmount": "6" - }, - { - "timestamp": "8640000", - "ethAmount": "100000000000000000000", - "tokenAmount": "0" - } - ] - }, - { - "initialPriceEthAmount": "100000000000000000000", - "initialPriceTokenAmount": "1000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100000000000000000000", - "tokenAmount": "2000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100000000000000000000", - "tokenAmount": "1866067480132519632" - }, - { - "timestamp": "172800", - "ethAmount": "100000000000000000000", - "tokenAmount": "1741102523397596730" - }, - { - "timestamp": "432000", - "ethAmount": "100000000000000000000", - "tokenAmount": "1414214696931586572" - }, - { - "timestamp": "864000", - "ethAmount": "100000000000000000000", - "tokenAmount": "1000000802254003009" - }, - { - "timestamp": "1728000", - "ethAmount": "100000000000000000000", - "tokenAmount": "500000401127001504" - }, - { - "timestamp": "2592000", - "ethAmount": "100000000000000000000", - "tokenAmount": "250000200563500752" - }, - { - "timestamp": "3456000", - "ethAmount": "100000000000000000000", - "tokenAmount": "125000100281750376" - }, - { - "timestamp": "4320000", - "ethAmount": "100000000000000000000", - "tokenAmount": "62500050140875188" - }, - { - "timestamp": "8640000", - "ethAmount": "100000000000000000000", - "tokenAmount": "1953126566902349" - } - ] - }, - { - "initialPriceEthAmount": "100000000000000000000", - "initialPriceTokenAmount": "10000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100000000000000000000", - "tokenAmount": "20000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100000000000000000000", - "tokenAmount": "18660674801325196320" - }, - { - "timestamp": "172800", - "ethAmount": "100000000000000000000", - "tokenAmount": "17411025233975967307" - }, - { - "timestamp": "432000", - "ethAmount": "100000000000000000000", - "tokenAmount": "14142146969315865725" - }, - { - "timestamp": "864000", - "ethAmount": "100000000000000000000", - "tokenAmount": "10000008022540030092" - }, - { - "timestamp": "1728000", - "ethAmount": "100000000000000000000", - "tokenAmount": "5000004011270015046" - }, - { - "timestamp": "2592000", - "ethAmount": "100000000000000000000", - "tokenAmount": "2500002005635007523" - }, - { - "timestamp": "3456000", - "ethAmount": "100000000000000000000", - "tokenAmount": "1250001002817503761" - }, - { - "timestamp": "4320000", - "ethAmount": "100000000000000000000", - "tokenAmount": "625000501408751880" - }, - { - "timestamp": "8640000", - "ethAmount": "100000000000000000000", - "tokenAmount": "19531265669023496" - } - ] - }, - { - "initialPriceEthAmount": "100000000000000000000", - "initialPriceTokenAmount": "100000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100000000000000000000", - "tokenAmount": "200000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100000000000000000000", - "tokenAmount": "186606748013251963208" - }, - { - "timestamp": "172800", - "ethAmount": "100000000000000000000", - "tokenAmount": "174110252339759673075" - }, - { - "timestamp": "432000", - "ethAmount": "100000000000000000000", - "tokenAmount": "141421469693158657253" - }, - { - "timestamp": "864000", - "ethAmount": "100000000000000000000", - "tokenAmount": "100000080225400300921" - }, - { - "timestamp": "1728000", - "ethAmount": "100000000000000000000", - "tokenAmount": "50000040112700150460" - }, - { - "timestamp": "2592000", - "ethAmount": "100000000000000000000", - "tokenAmount": "25000020056350075230" - }, - { - "timestamp": "3456000", - "ethAmount": "100000000000000000000", - "tokenAmount": "12500010028175037615" - }, - { - "timestamp": "4320000", - "ethAmount": "100000000000000000000", - "tokenAmount": "6250005014087518807" - }, - { - "timestamp": "8640000", - "ethAmount": "100000000000000000000", - "tokenAmount": "195312656690234962" - } - ] - }, - { - "initialPriceEthAmount": "100000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100000000000000000000", - "tokenAmount": "2000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100000000000000000000", - "tokenAmount": "1866067480132519632088" - }, - { - "timestamp": "172800", - "ethAmount": "100000000000000000000", - "tokenAmount": "1741102523397596730750" - }, - { - "timestamp": "432000", - "ethAmount": "100000000000000000000", - "tokenAmount": "1414214696931586572533" - }, - { - "timestamp": "864000", - "ethAmount": "100000000000000000000", - "tokenAmount": "1000000802254003009210" - }, - { - "timestamp": "1728000", - "ethAmount": "100000000000000000000", - "tokenAmount": "500000401127001504605" - }, - { - "timestamp": "2592000", - "ethAmount": "100000000000000000000", - "tokenAmount": "250000200563500752302" - }, - { - "timestamp": "3456000", - "ethAmount": "100000000000000000000", - "tokenAmount": "125000100281750376151" - }, - { - "timestamp": "4320000", - "ethAmount": "100000000000000000000", - "tokenAmount": "62500050140875188075" - }, - { - "timestamp": "8640000", - "ethAmount": "100000000000000000000", - "tokenAmount": "1953126566902349627" - } - ] - }, - { - "initialPriceEthAmount": "100000000000000000000", - "initialPriceTokenAmount": "1200000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100000000000000000000", - "tokenAmount": "2400000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100000000000000000000", - "tokenAmount": "2239280976159023558506" - }, - { - "timestamp": "172800", - "ethAmount": "100000000000000000000", - "tokenAmount": "2089323028077116076900" - }, - { - "timestamp": "432000", - "ethAmount": "100000000000000000000", - "tokenAmount": "1697057636317903887040" - }, - { - "timestamp": "864000", - "ethAmount": "100000000000000000000", - "tokenAmount": "1200000962704803611053" - }, - { - "timestamp": "1728000", - "ethAmount": "100000000000000000000", - "tokenAmount": "600000481352401805526" - }, - { - "timestamp": "2592000", - "ethAmount": "100000000000000000000", - "tokenAmount": "300000240676200902763" - }, - { - "timestamp": "3456000", - "ethAmount": "100000000000000000000", - "tokenAmount": "150000120338100451381" - }, - { - "timestamp": "4320000", - "ethAmount": "100000000000000000000", - "tokenAmount": "75000060169050225690" - }, - { - "timestamp": "8640000", - "ethAmount": "100000000000000000000", - "tokenAmount": "2343751880282819552" - } - ] - }, - { - "initialPriceEthAmount": "100000000000000000000", - "initialPriceTokenAmount": "1500000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100000000000000000000", - "tokenAmount": "3000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100000000000000000000", - "tokenAmount": "2799101220198779448133" - }, - { - "timestamp": "172800", - "ethAmount": "100000000000000000000", - "tokenAmount": "2611653785096395096126" - }, - { - "timestamp": "432000", - "ethAmount": "100000000000000000000", - "tokenAmount": "2121322045397379858800" - }, - { - "timestamp": "864000", - "ethAmount": "100000000000000000000", - "tokenAmount": "1500001203381004513816" - }, - { - "timestamp": "1728000", - "ethAmount": "100000000000000000000", - "tokenAmount": "750000601690502256908" - }, - { - "timestamp": "2592000", - "ethAmount": "100000000000000000000", - "tokenAmount": "375000300845251128454" - }, - { - "timestamp": "3456000", - "ethAmount": "100000000000000000000", - "tokenAmount": "187500150422625564227" - }, - { - "timestamp": "4320000", - "ethAmount": "100000000000000000000", - "tokenAmount": "93750075211312782113" - }, - { - "timestamp": "8640000", - "ethAmount": "100000000000000000000", - "tokenAmount": "2929689850353524441" - } - ] - }, - { - "initialPriceEthAmount": "100000000000000000000", - "initialPriceTokenAmount": "2000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100000000000000000000", - "tokenAmount": "4000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100000000000000000000", - "tokenAmount": "3732134960265039264177" - }, - { - "timestamp": "172800", - "ethAmount": "100000000000000000000", - "tokenAmount": "3482205046795193461501" - }, - { - "timestamp": "432000", - "ethAmount": "100000000000000000000", - "tokenAmount": "2828429393863173145067" - }, - { - "timestamp": "864000", - "ethAmount": "100000000000000000000", - "tokenAmount": "2000001604508006018421" - }, - { - "timestamp": "1728000", - "ethAmount": "100000000000000000000", - "tokenAmount": "1000000802254003009210" - }, - { - "timestamp": "2592000", - "ethAmount": "100000000000000000000", - "tokenAmount": "500000401127001504605" - }, - { - "timestamp": "3456000", - "ethAmount": "100000000000000000000", - "tokenAmount": "250000200563500752302" - }, - { - "timestamp": "4320000", - "ethAmount": "100000000000000000000", - "tokenAmount": "125000100281750376151" - }, - { - "timestamp": "8640000", - "ethAmount": "100000000000000000000", - "tokenAmount": "3906253133804699254" - } - ] - }, - { - "initialPriceEthAmount": "100000000000000000000", - "initialPriceTokenAmount": "2400000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100000000000000000000", - "tokenAmount": "4800000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100000000000000000000", - "tokenAmount": "4478561952318047117012" - }, - { - "timestamp": "172800", - "ethAmount": "100000000000000000000", - "tokenAmount": "4178646056154232153801" - }, - { - "timestamp": "432000", - "ethAmount": "100000000000000000000", - "tokenAmount": "3394115272635807774080" - }, - { - "timestamp": "864000", - "ethAmount": "100000000000000000000", - "tokenAmount": "2400001925409607222106" - }, - { - "timestamp": "1728000", - "ethAmount": "100000000000000000000", - "tokenAmount": "1200000962704803611053" - }, - { - "timestamp": "2592000", - "ethAmount": "100000000000000000000", - "tokenAmount": "600000481352401805526" - }, - { - "timestamp": "3456000", - "ethAmount": "100000000000000000000", - "tokenAmount": "300000240676200902763" - }, - { - "timestamp": "4320000", - "ethAmount": "100000000000000000000", - "tokenAmount": "150000120338100451381" - }, - { - "timestamp": "8640000", - "ethAmount": "100000000000000000000", - "tokenAmount": "4687503760565639105" - } - ] - }, - { - "initialPriceEthAmount": "100000000000000000000", - "initialPriceTokenAmount": "3000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100000000000000000000", - "tokenAmount": "6000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100000000000000000000", - "tokenAmount": "5598202440397558896266" - }, - { - "timestamp": "172800", - "ethAmount": "100000000000000000000", - "tokenAmount": "5223307570192790192252" - }, - { - "timestamp": "432000", - "ethAmount": "100000000000000000000", - "tokenAmount": "4242644090794759717600" - }, - { - "timestamp": "864000", - "ethAmount": "100000000000000000000", - "tokenAmount": "3000002406762009027632" - }, - { - "timestamp": "1728000", - "ethAmount": "100000000000000000000", - "tokenAmount": "1500001203381004513816" - }, - { - "timestamp": "2592000", - "ethAmount": "100000000000000000000", - "tokenAmount": "750000601690502256908" - }, - { - "timestamp": "3456000", - "ethAmount": "100000000000000000000", - "tokenAmount": "375000300845251128454" - }, - { - "timestamp": "4320000", - "ethAmount": "100000000000000000000", - "tokenAmount": "187500150422625564227" - }, - { - "timestamp": "8640000", - "ethAmount": "100000000000000000000", - "tokenAmount": "5859379700707048882" - } - ] - }, - { - "initialPriceEthAmount": "100000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "100000000000000000000", - "tokenAmount": "20000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "100000000000000000000", - "tokenAmount": "18660674801325196320886" - }, - { - "timestamp": "172800", - "ethAmount": "100000000000000000000", - "tokenAmount": "17411025233975967307506" - }, - { - "timestamp": "432000", - "ethAmount": "100000000000000000000", - "tokenAmount": "14142146969315865725336" - }, - { - "timestamp": "864000", - "ethAmount": "100000000000000000000", - "tokenAmount": "10000008022540030092109" - }, - { - "timestamp": "1728000", - "ethAmount": "100000000000000000000", - "tokenAmount": "5000004011270015046054" - }, - { - "timestamp": "2592000", - "ethAmount": "100000000000000000000", - "tokenAmount": "2500002005635007523027" - }, - { - "timestamp": "3456000", - "ethAmount": "100000000000000000000", - "tokenAmount": "1250001002817503761513" - }, - { - "timestamp": "4320000", - "ethAmount": "100000000000000000000", - "tokenAmount": "625000501408751880756" - }, - { - "timestamp": "8640000", - "ethAmount": "100000000000000000000", - "tokenAmount": "19531265669023496273" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "100", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000000", - "tokenAmount": "200" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000000", - "tokenAmount": "186" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000000", - "tokenAmount": "174" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "141" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "100" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "50" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "25" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "12" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "6" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "0" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000000", - "tokenAmount": "2000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000000", - "tokenAmount": "1866067480132519632" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000000", - "tokenAmount": "1741102523397596730" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "1414214696931586572" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "1000000802254003009" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "500000401127001504" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "250000200563500752" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "125000100281750376" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "62500050140875188" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "1953126566902349" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000000", - "tokenAmount": "20000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000000", - "tokenAmount": "18660674801325196320" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000000", - "tokenAmount": "17411025233975967307" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "14142146969315865725" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "10000008022540030092" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "5000004011270015046" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "2500002005635007523" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "1250001002817503761" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "625000501408751880" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "19531265669023496" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "100000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000000", - "tokenAmount": "200000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000000", - "tokenAmount": "186606748013251963208" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000000", - "tokenAmount": "174110252339759673075" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "141421469693158657253" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "100000080225400300921" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "50000040112700150460" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "25000020056350075230" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "12500010028175037615" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "6250005014087518807" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "195312656690234962" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "1000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000000", - "tokenAmount": "2000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000000", - "tokenAmount": "1866067480132519632088" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000000", - "tokenAmount": "1741102523397596730750" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "1414214696931586572533" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "1000000802254003009210" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "500000401127001504605" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "250000200563500752302" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "125000100281750376151" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "62500050140875188075" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "1953126566902349627" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "1200000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000000", - "tokenAmount": "2400000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000000", - "tokenAmount": "2239280976159023558506" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000000", - "tokenAmount": "2089323028077116076900" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "1697057636317903887040" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "1200000962704803611053" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "600000481352401805526" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "300000240676200902763" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "150000120338100451381" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "75000060169050225690" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "2343751880282819552" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "1500000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000000", - "tokenAmount": "3000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000000", - "tokenAmount": "2799101220198779448133" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000000", - "tokenAmount": "2611653785096395096126" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "2121322045397379858800" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "1500001203381004513816" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "750000601690502256908" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "375000300845251128454" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "187500150422625564227" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "93750075211312782113" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "2929689850353524441" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "2000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000000", - "tokenAmount": "4000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000000", - "tokenAmount": "3732134960265039264177" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000000", - "tokenAmount": "3482205046795193461501" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "2828429393863173145067" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "2000001604508006018421" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "1000000802254003009210" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "500000401127001504605" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "250000200563500752302" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "125000100281750376151" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "3906253133804699254" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "2400000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000000", - "tokenAmount": "4800000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000000", - "tokenAmount": "4478561952318047117012" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000000", - "tokenAmount": "4178646056154232153801" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "3394115272635807774080" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "2400001925409607222106" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "1200000962704803611053" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "600000481352401805526" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "300000240676200902763" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "150000120338100451381" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "4687503760565639105" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "3000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000000", - "tokenAmount": "6000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000000", - "tokenAmount": "5598202440397558896266" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000000", - "tokenAmount": "5223307570192790192252" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "4242644090794759717600" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "3000002406762009027632" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "1500001203381004513816" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "750000601690502256908" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "375000300845251128454" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "187500150422625564227" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "5859379700707048882" - } - ] - }, - { - "initialPriceEthAmount": "1000000000000000000000", - "initialPriceTokenAmount": "10000000000000000000000", - "tokenPriceAtTimestamps": [ - { - "timestamp": "1", - "ethAmount": "1000000000000000000000", - "tokenAmount": "20000000000000000000000" - }, - { - "timestamp": "86400", - "ethAmount": "1000000000000000000000", - "tokenAmount": "18660674801325196320886" - }, - { - "timestamp": "172800", - "ethAmount": "1000000000000000000000", - "tokenAmount": "17411025233975967307506" - }, - { - "timestamp": "432000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "14142146969315865725336" - }, - { - "timestamp": "864000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "10000008022540030092109" - }, - { - "timestamp": "1728000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "5000004011270015046054" - }, - { - "timestamp": "2592000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "2500002005635007523027" - }, - { - "timestamp": "3456000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "1250001002817503761513" - }, - { - "timestamp": "4320000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "625000501408751880756" - }, - { - "timestamp": "8640000", - "ethAmount": "1000000000000000000000", - "tokenAmount": "19531265669023496273" - } - ] - } - ] -} From 9d22be91d5565d8c662306db86b4cec14bbb442d Mon Sep 17 00:00:00 2001 From: Ivan Zhelyazkov Date: Mon, 20 Nov 2023 14:20:41 +0200 Subject: [PATCH 10/10] carbon pol eth conversion - minor fixes --- contracts/pol/CarbonPOL.sol | 33 ++++++++++++++++++------- contracts/pol/interfaces/ICarbonPOL.sol | 8 ++++-- test/forge/CarbonPOL.t.sol | 28 ++++++++++----------- 3 files changed, 44 insertions(+), 25 deletions(-) diff --git a/contracts/pol/CarbonPOL.sol b/contracts/pol/CarbonPOL.sol index e5817f96..5a01356e 100644 --- a/contracts/pol/CarbonPOL.sol +++ b/contracts/pol/CarbonPOL.sol @@ -207,6 +207,13 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils return _tradingEnabled(token); } + /** + * @inheritdoc ICarbonPOL + */ + function amountAvailableForTrading(Token token) external view returns (uint128) { + return _amountAvailableForTrading(token); + } + /** * @inheritdoc ICarbonPOL */ @@ -218,9 +225,9 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils uint128 tradeReturn = MathEx .mulDivF(currentPrice.targetAmount, tradeInput, currentPrice.sourceAmount) .toUint128(); - // revert if not enough token balance - if (tradeReturn > token.balanceOf(address(this))) { - revert InsufficientTokenBalance(); + // revert if not enough amount available for trade + if (tradeReturn > _amountAvailableForTrading(token)) { + revert InsufficientAmountForTrading(); } return tradeReturn; } @@ -229,9 +236,9 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils * @inheritdoc ICarbonPOL */ function expectedTradeInput(Token token, uint128 tokenAmount) public view validToken(token) returns (uint128) { - // revert if not enough token balance for trade - if (tokenAmount > token.balanceOf(address(this))) { - revert InsufficientTokenBalance(); + // revert if not enough amount available for trade + if (tokenAmount > _amountAvailableForTrading(token)) { + revert InsufficientAmountForTrading(); } Price memory currentPrice = tokenPrice(token); // revert if current price is not valid @@ -302,9 +309,6 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils } function _sellETHForBNT(uint128 amount) private returns (uint128) { - if (_ethSaleAmount.current < amount) { - revert InsufficientEthForSale(); - } uint128 bntRequired = expectedTradeInput(NATIVE_TOKEN, amount); // revert if trade requires 0 bnt if (bntRequired == 0) { @@ -387,6 +391,17 @@ contract CarbonPOL is ICarbonPOL, Upgradeable, ReentrancyGuardUpgradeable, Utils emit EthSaleAmountUpdated(prevEthSaleAmount, newEthSaleAmount); } + /** + * @dev returns the token amount available for trading + */ + function _amountAvailableForTrading(Token token) private view returns (uint128) { + if (token == NATIVE_TOKEN) { + return _ethSaleAmount.current; + } else { + return uint128(token.balanceOf(address(this))); + } + } + /** * @dev validate token helper */ diff --git a/contracts/pol/interfaces/ICarbonPOL.sol b/contracts/pol/interfaces/ICarbonPOL.sol index 0837c316..c4368c28 100644 --- a/contracts/pol/interfaces/ICarbonPOL.sol +++ b/contracts/pol/interfaces/ICarbonPOL.sol @@ -13,8 +13,7 @@ interface ICarbonPOL is IUpgradeable { error InvalidTrade(); error TradingDisabled(); error InsufficientNativeTokenSent(); - error InsufficientTokenBalance(); - error InsufficientEthForSale(); + error InsufficientAmountForTrading(); struct Price { uint128 sourceAmount; @@ -76,6 +75,11 @@ interface ICarbonPOL is IUpgradeable { */ function tradingEnabled(Token token) external view returns (bool); + /** + * @notice returns the amount available for trading for the token + */ + function amountAvailableForTrading(Token token) external view returns (uint128); + /** * @notice returns the expected trade output (tokens received) given an token amount sent */ diff --git a/test/forge/CarbonPOL.t.sol b/test/forge/CarbonPOL.t.sol index 9d9b7ea7..01516cb3 100644 --- a/test/forge/CarbonPOL.t.sol +++ b/test/forge/CarbonPOL.t.sol @@ -953,21 +953,21 @@ contract CarbonPOLTest is TestFixture { uint256 tokenBalance = token1.balanceOf(address(carbonPOL)); uint128 amount = uint128(tokenBalance) + 1; // get expected trade input - vm.expectRevert(ICarbonPOL.InsufficientTokenBalance.selector); + vm.expectRevert(ICarbonPOL.InsufficientAmountForTrading.selector); carbonPOL.expectedTradeInput(token1, amount); } - /// @dev test should revert expected input for native token if not enough token balance - function testShouldRevertExpectedTradeInputIfNotEnoughNativeTokenBalanceForTrade() public { + /// @dev test should revert expected input for native token if not enough current sale amount for trade + function testShouldRevertExpectedTradeInputIfNotEnoughNativeTokenSaleAmountForTrade() public { vm.prank(admin); // enable native token to test carbonPOL.enableTradingETH(ICarbonPOL.Price({ sourceAmount: 10000, targetAmount: 100000000 })); // set timestamp to 5 days vm.warp(5 days); - uint256 ethBalance = NATIVE_TOKEN.balanceOf(address(carbonPOL)); + uint128 saleAmount = carbonPOL.ethSaleAmount().current; // get expected trade input - vm.expectRevert(ICarbonPOL.InsufficientTokenBalance.selector); - carbonPOL.expectedTradeInput(NATIVE_TOKEN, uint128(ethBalance) + 1e18); + vm.expectRevert(ICarbonPOL.InsufficientAmountForTrading.selector); + carbonPOL.expectedTradeInput(NATIVE_TOKEN, saleAmount + 1e18); } /// @dev test should revert expected return if not enough token balance @@ -983,24 +983,24 @@ contract CarbonPOLTest is TestFixture { uint128 expectedInput = carbonPOL.expectedTradeInput(token1, uint128(tokenBalance)); uint128 amount = expectedInput + 1; // expect revert - vm.expectRevert(ICarbonPOL.InsufficientTokenBalance.selector); + vm.expectRevert(ICarbonPOL.InsufficientAmountForTrading.selector); carbonPOL.expectedTradeReturn(token1, amount); } - /// @dev test should revert expected return if not enough token balance - function testShouldRevertExpectedReturnIfNotEnoughNativeTokenBalanceForTrade() public { + /// @dev test should revert expected return for native token if not enough current sale amount for the trade + function testShouldRevertExpectedReturnIfNotEnoughNativeTokenSaleAmountForTrade() public { vm.startPrank(admin); // enable token to test carbonPOL.enableTradingETH(ICarbonPOL.Price({ sourceAmount: 10000, targetAmount: 100000000 })); vm.stopPrank(); // set timestamp to 5 days vm.warp(5 days); - uint256 ethBalance = address(carbonPOL).balance; + uint128 saleAmount = carbonPOL.ethSaleAmount().current; // get expected trade input - uint128 expectedInput = carbonPOL.expectedTradeInput(NATIVE_TOKEN, uint128(ethBalance)); - uint128 amount = uint128(expectedInput) + 1e18; + uint128 expectedInput = carbonPOL.expectedTradeInput(NATIVE_TOKEN, saleAmount); + uint128 amount = expectedInput + 1; // expect revert - vm.expectRevert(ICarbonPOL.InsufficientTokenBalance.selector); + vm.expectRevert(ICarbonPOL.InsufficientAmountForTrading.selector); carbonPOL.expectedTradeReturn(NATIVE_TOKEN, amount); } @@ -1084,7 +1084,7 @@ contract CarbonPOLTest is TestFixture { // trade a bit over 100 eth uint128 sourceAmount = 100 ether + 1; // expect trade to revert - vm.expectRevert(ICarbonPOL.InsufficientEthForSale.selector); + vm.expectRevert(ICarbonPOL.InsufficientAmountForTrading.selector); carbonPOL.trade(token, sourceAmount); vm.stopPrank(); }