Skip to content

Commit

Permalink
feat: add G3MStrategy wip
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlak committed Nov 15, 2023
1 parent fc77c19 commit 41b313b
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions contracts/strategies/G3MStrategy.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity 0.8.19;

import "./IG3MStrategy.sol";

contract G3MStrategy is IG3MStrategy {
function afterCreate(
uint64 poolId,
bytes calldata strategyArgs
) external returns (bool success) { }

function beforeSwap(
uint64 poolId,
bool sellAsset,
address swapper
) external returns (bool, int256) { }

function validateSwap(
uint64 poolId,
int256 invariant,
uint256 reserveX,
uint256 reserveY
) external view returns (bool, int256) { }

function getAmountOut(
uint64 poolId,
bool sellAsset,
uint256 amountIn,
address swapper
) external view returns (uint256) { }

function getSpotPrice(uint64 poolId)
external
view
returns (uint256 price)
{ }

function getMaxOrder(
uint64 poolId,
bool sellAsset,
address swapper
) external view returns (Order memory) { }

function simulateSwap(
Order memory order,
uint256 timestamp,
address swapper
)
external
view
returns (bool success, int256 prevInvariant, int256 postInvariant)
{ }

function getInvariant(uint64 poolId) external view returns (int256) { }

function validatePool(uint64 poolId)
external
view
override
returns (bool)
{ }
}

0 comments on commit 41b313b

Please sign in to comment.