Skip to content

Commit

Permalink
test: update SF and ISF tests
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlak committed Dec 7, 2023
1 parent a04d148 commit e3b61e0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/TestG3MCreatePool.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ pragma solidity ^0.8.4;
import "./Setup.sol";

contract TestG3MCreatePool is Setup {
using FixedPointMathLib for *;

function test_SF_computeISF() public view {
uint256 x = 0.05 ether;
uint256 y = G3MStrategyLib.computeISFunction(x);
console.log(y);
}

function test_SF_computeSF() public view {
uint256 w0 = 0.05 ether;
uint256 w1 = 0.9 ether;
uint256 t = 0.5 ether;
uint256 fw0 = G3MStrategyLib.computeISFunction(w0);
console.log(fw0);
uint256 fw1 = G3MStrategyLib.computeISFunction(w1);
console.log(fw1);
uint256 weightX = G3MStrategyLib.computeSFunction(t, fw1 - fw0, fw0);
console.log(weightX);
}

function deployTokens(
IPortfolio subject,
bool createPair
Expand Down

0 comments on commit e3b61e0

Please sign in to comment.