Skip to content

Commit

Permalink
Merge pull request #712 from OasisDEX/kk/revert-fl-changes
Browse files Browse the repository at this point in the history
chore: revert fl changes
  • Loading branch information
halaprix authored Nov 15, 2024
2 parents 498c6ad + 1040389 commit 57668db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/dma-library/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oasisdex/dma-library",
"version": "0.6.78",
"version": "0.6.79",
"typings": "lib/index.d.ts",
"types": "lib/index.d.ts",
"main": "lib/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { AdjustRiskDownArgs } from '@dma-library/operations/aave/multiply/v3/adj
import { AdjustRiskUpArgs } from '@dma-library/operations/aave/multiply/v3/adjust-risk-up'
import { resolveAaveLikeMultiplyOperations } from '@dma-library/operations/aave-like/resolve-aavelike-operations'
import { getAaveTokenAddresses } from '@dma-library/strategies/aave/common'
import { FlashloanProvider, IOperation, SwapData } from '@dma-library/types'
import { IOperation, SwapData } from '@dma-library/types'
import { resolveFlashloanProvider } from '@dma-library/utils/flashloan/resolve-provider'
import { feeResolver } from '@dma-library/utils/swap'
import * as Domain from '@domain'
Expand Down Expand Up @@ -146,8 +146,8 @@ export async function buildAdjustFlashloan(
debtToken: args.debtToken.symbol,
collateralToken: args.collateralToken.symbol,
})
// We dont use the if Spark condition since on L2s non Maker FLS are used for multiply operations
if (dependencies.protocolType === 'Spark' || flashloanProvider !== FlashloanProvider.DssFlash) {

if (dependencies.protocolType === 'Spark') {
// Need to add fees to the swap amount
const fromSwapAmountBeforeFees = swap.fromTokenAmount.plus(preSwapFee)
const receivedAmountAfterSwap = swap.minToTokenAmount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { FEE_BASE, ONE, TYPICAL_PRECISION } from '@dma-common/constants'
import { amountFromWei, amountToWei } from '@dma-common/utils/common'
import { resolveAaveLikeMultiplyOperations } from '@dma-library/operations/aave-like/resolve-aavelike-operations'
import { SAFETY_MARGIN } from '@dma-library/strategies/aave-like/multiply/close/constants'
import { FlashloanProvider, IOperation, SwapData } from '@dma-library/types'
import { IOperation, SwapData } from '@dma-library/types'
import { resolveFlashloanProvider } from '@dma-library/utils/flashloan/resolve-provider'
import { feeResolver } from '@dma-library/utils/swap'
import * as Domain from '@domain'
Expand Down Expand Up @@ -105,8 +105,8 @@ export async function buildCloseFlashloan(
debtToken: args.debtToken.symbol,
collateralToken: args.collateralToken.symbol,
})
// We dont use the if Spark condition since on L2s non Maker FLS are used for multiply operations
if (dependencies.protocolType === 'Spark' || flashloanProvider !== FlashloanProvider.DssFlash) {

if (dependencies.protocolType === 'Spark') {
// This covers off the situation where debt balances accrue interest
const amountToFlashloan = dependencies.currentPosition.debt.amount.times(
ONE.plus(SAFETY_MARGIN),
Expand Down

0 comments on commit 57668db

Please sign in to comment.