Skip to content

Commit

Permalink
chore(doc): add comment on calculus
Browse files Browse the repository at this point in the history
  • Loading branch information
zgorizzo69 committed Jan 24, 2022
1 parent 5e2212a commit ae563b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 0 additions & 6 deletions test/contracts/Foundry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { CurveRegistry } from "../../artifacts/types/CurveRegistry";
import { Foundry } from "../../artifacts/types/Foundry";
import { Hub } from "../../artifacts/types/Hub";
import { WeightedAverage } from "../../artifacts/types/WeightedAverage";
import { VaultRegistry } from "../../artifacts/types/VaultRegistry";
import {
calculateCollateralReturned,
calculateCollateralToDepositFromZero,
Expand All @@ -18,19 +17,14 @@ import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers";
import { Signer, BigNumber } from "ethers";
import { BancorABDK } from "../../artifacts/types/BancorABDK";
import { ERC20 } from "../../artifacts/types/ERC20";
import { MeTokenFactory } from "../../artifacts/types/MeTokenFactory";
import { MeTokenRegistry } from "../../artifacts/types/MeTokenRegistry";
import { MigrationRegistry } from "../../artifacts/types/MigrationRegistry";
import { SingleAssetVault } from "../../artifacts/types/SingleAssetVault";
import { mineBlock } from "../utils/hardhatNode";
import { Fees } from "../../artifacts/types/Fees";
import { MeToken } from "../../artifacts/types/MeToken";
import { expect } from "chai";
import { UniswapSingleTransferMigration } from "../../artifacts/types/UniswapSingleTransferMigration";
import { hubSetup } from "../utils/hubSetup";
import { text } from "stream/consumers";
import { clearConfigCache } from "prettier";
import Decimal from "decimal.js";
import { ICurve } from "../../artifacts/types";

const setup = async () => {
Expand Down
4 changes: 3 additions & 1 deletion test/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,9 @@ export const calculateStepwiseTokenReturned = (
return res.minus(totalSupply).toNumber();
};

// return balancePooled - stepBalance
// calculate balancePooled - (New_Steps * stepY * stepX + (New_Steps+1) * New_Supply_in_Step *stepY)
// New_Steps=ROUNDDOWN(Supply- token_Burn)/B2)
// New_Supply_in_Step=Supply - token_Burn - New_Steps*stepX
export const calculateStepwiseCollateralReturned = (
stepX: number,
stepY: number,
Expand Down

0 comments on commit ae563b0

Please sign in to comment.