Skip to content

Commit

Permalink
✨ lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kamikazebr committed Dec 21, 2023
1 parent ca354b8 commit 8fd711e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pkg/contracts/src/CVStrategy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ contract CVStrategy is BaseStrategy, IWithdrawMember {
weight = ip.weight;
minThresholdStakePercentage = ip.minThresholdStakePercentage;


emit Initialized(_poolId, _data);
}
/*|--------------------------------------------|*/
Expand Down Expand Up @@ -448,7 +447,7 @@ contract CVStrategy is BaseStrategy, IWithdrawMember {
}
// denom = maxRatio * 2 ** 64 / D - requestedAmount * 2 ** 64 / funds
uint256 denom = (maxRatio * 2 ** 64) / D - (_requestedAmount * 2 ** 64) / funds;
console.log("denom", denom);
console.log("denom", denom);
// uint256 denom = (maxRatio << 64).div(D).sub((_requestedAmount << 64).div(funds));
// _threshold = (weight * 2 ** 128 / D) / (denom ** 2 / 2 ** 64) * totalStaked * D / 2 ** 128
// _threshold = ((weight * 2 ** 128) / D) / ((denom ** 2) / 2 ** 64) * D / (D - decay) * (_totalStaked()) / 2 ** 64;
Expand Down
5 changes: 3 additions & 2 deletions pkg/contracts/test/AlloTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ import {MockERC20} from "allo-v2-test/utils/MockERC20.sol";
import {GasHelpers} from "allo-v2-test/utils/GasHelpers.sol";

import {CVMockStrategy} from "./CVMockStrategy.sol";
import {CVStrategy } from "../src/CVStrategy.sol";
import {CVStrategy} from "../src/CVStrategy.sol";
import {RegistryGardens} from "../src/RegistryGardensMock.sol";
// @dev Run forge test --mc TestAllo -vvvvv

contract TestAllo is Test, AlloSetup, RegistrySetupFull, Native, Errors, GasHelpers {
CVStrategy public strategy;
MockERC20 public token;
Expand Down Expand Up @@ -91,7 +92,7 @@ contract TestAllo is Test, AlloSetup, RegistrySetupFull, Native, Errors, GasHelp
// = CVStrategy.InitializeParams();
//address(_registryGardens()), 10, 1, 1, 1
params.decay = 0.9 ether / 10 ** 11; // alpha
params.maxRatio = 0.2 ether / 10 ** 11; // beta
params.maxRatio = 0.2 ether / 10 ** 11; // beta
params.weight = 0.002 ether / 10 ** 11; // RHO?
params.minThresholdStakePercentage = 0.2 ether; // 20%
params.registryGardens = address(_registryGardens());
Expand Down

0 comments on commit 8fd711e

Please sign in to comment.