Skip to content

Commit

Permalink
Merge pull request #237 from pods-finance/develop
Browse files Browse the repository at this point in the history
Changed Fees structure
  • Loading branch information
Robsonsjre authored May 3, 2021
2 parents f9397d2 + b856bc7 commit 8252386
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions contracts/amm/OptionAMMFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ contract OptionAMMFactory is IOptionAMMFactory {
) external override returns (address) {
require(address(_pools[_optionAddress]) == address(0), "OptionAMMFactory: Pool already exists");

FeePool feePoolTokenA = new FeePool(_stableAsset, 35, 4);
FeePool feePoolTokenB = new FeePool(_stableAsset, 15, 4);
FeePool feePoolTokenA = new FeePool(_stableAsset, 15, 3);
FeePool feePoolTokenB = new FeePool(_stableAsset, 15, 3);

OptionAMMPool pool = new OptionAMMPool(
_optionAddress,
Expand Down
4 changes: 2 additions & 2 deletions test/amm/OptionAMMPool.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ scenarios.forEach(scenario => {
const tokensSpent = buyerStrikeAmountBeforeTrade.sub(buyerStrikeAmountAfterTrade)
expect(tradeDetails.amountBIn).to.be.equal(tokensSpent)

const feesBN = (new BigNumber(tokensSpent.toString()).multipliedBy(new BigNumber(0.005))).toFixed(0, 2)
const feesBN = (new BigNumber(tokensSpent.toString()).multipliedBy(new BigNumber(0.03))).toFixed(0, 2)
const fees = toBigNumber(feesBN.toString())
const feeContractA = await ethers.getContractAt('FeePool', feeAddressA)
const feeContractB = await ethers.getContractAt('FeePool', feeAddressB)
Expand Down Expand Up @@ -845,7 +845,7 @@ scenarios.forEach(scenario => {

const [poolOptionAmountAfterTrade, poolStrikeAmountAfterTrade] = await optionAMMPool.getPoolBalances()

const feesBN = (new BigNumber(numberOfTokensToReceive.toString()).multipliedBy(new BigNumber(0.005))).toFixed(0, 2)
const feesBN = (new BigNumber(numberOfTokensToReceive.toString()).multipliedBy(new BigNumber(0.03))).toFixed(0, 2)
const fees = toBigNumber(feesBN.toString())

expect(poolStrikeAmountBeforeTrade).to.eq(poolStrikeAmountAfterTrade.add(numberOfTokensToReceive).add(fees))
Expand Down

0 comments on commit 8252386

Please sign in to comment.