@@ -72,16 +72,16 @@ const defaultConfig: Config = {
72
72
paymentTokenSweepVault : "0x598513C77236Bd5821CCC7bc3E3a585F3FeC9fb1" , // WBTC-1 escrow
73
73
priceOne : 100000000n ,
74
74
} ,
75
- // mBASIS: {
76
- // tokenContract: "0x2a8c22E3b10036f3AEF5875d04f8441d4188b656",
77
- // redemptionInstantFeeBps: 50n,
78
- // depositorContract: "0xa8a5c4FF4c86a459EBbDC39c5BE77833B3A15d88",
79
- // redeemerContract: "0x0D89C1C4799353F3805A3E6C4e1Cbbb83217D123",
80
- // oracleContract: "0xE4f2AE539442e1D3Fb40F03ceEbF4A372a390d24",
81
- // paymentToken: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", // USDC
82
- // paymentTokenSweepVault: "0xb93d4928f39fbcd6c89a7dfbf0a867e6344561be", // USDC-1 escrow
83
- // priceOne: 100000000n,
84
- // },
75
+ mBASIS : {
76
+ tokenContract : "0x2a8c22E3b10036f3AEF5875d04f8441d4188b656" ,
77
+ redemptionInstantFeeBps : 50n ,
78
+ depositorContract : "0xa8a5c4FF4c86a459EBbDC39c5BE77833B3A15d88" ,
79
+ redeemerContract : "0x0D89C1C4799353F3805A3E6C4e1Cbbb83217D123" ,
80
+ oracleContract : "0xE4f2AE539442e1D3Fb40F03ceEbF4A372a390d24" ,
81
+ paymentToken : "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" , // USDC
82
+ paymentTokenSweepVault : "0xb93d4928f39fbcd6c89a7dfbf0a867e6344561be" , // USDC-1 escrow
83
+ priceOne : 100000000n ,
84
+ } ,
85
85
} ,
86
86
87
87
[ base . id ] : {
@@ -236,7 +236,6 @@ export class StrategyMidas {
236
236
swapParams . amount ,
237
237
true ,
238
238
getAddress ( mToken . paymentToken ) ,
239
- getAddress ( mToken . paymentToken ) ,
240
239
)
241
240
242
241
// redeeming into USDC is the actual swap
@@ -722,7 +721,8 @@ export class StrategyMidas {
722
721
if ( isAmountMToken ) {
723
722
const fee = ( amount * mToken . redemptionInstantFeeBps ) / 10_000n
724
723
amountIn = amount
725
- amountOutMin = ( ( amount - fee ) * mTBILLPriceUSD ) / mToken . priceOne
724
+ amountOutMin =
725
+ ( ( ( amount - fee ) * mTBILLPriceUSD ) / mToken . priceOne / scale ) * scale // truncate above payment token decimals
726
726
amountOut = amountOutMin / scale
727
727
} else {
728
728
amountIn =
0 commit comments