@@ -1218,12 +1218,12 @@ export class LlammaTemplate {
1218
1218
return ( await contract . exchange ( i , j , _amount , _minRecvAmount , { ...crvusd . options , gasLimit } ) ) . hash
1219
1219
}
1220
1220
1221
- public async swapEstimateGas ( i : number , j : number , amount : number | string , slippage = 0.5 ) : Promise < number > {
1221
+ public async swapEstimateGas ( i : number , j : number , amount : number | string , slippage = 0.1 ) : Promise < number > {
1222
1222
if ( ! ( await this . swapIsApproved ( i , amount ) ) ) throw Error ( "Approval is needed for gas estimation" ) ;
1223
1223
return await this . _swap ( i , j , amount , slippage , true ) as number ;
1224
1224
}
1225
1225
1226
- public async swap ( i : number , j : number , amount : number | string , slippage = 0.5 ) : Promise < string > {
1226
+ public async swap ( i : number , j : number , amount : number | string , slippage = 0.1 ) : Promise < string > {
1227
1227
await this . swapApprove ( i , amount ) ;
1228
1228
return await this . _swap ( i , j , amount , slippage , false ) as string ;
1229
1229
}
@@ -1270,12 +1270,12 @@ export class LlammaTemplate {
1270
1270
return ( await contract . liquidate ( address , _minAmount , isEth ( this . collateral ) , { ...crvusd . options , gasLimit } ) ) . hash
1271
1271
}
1272
1272
1273
- public async liquidateEstimateGas ( address : string , slippage = 0.5 ) : Promise < number > {
1273
+ public async liquidateEstimateGas ( address : string , slippage = 0.1 ) : Promise < number > {
1274
1274
if ( ! ( await this . liquidateIsApproved ( address ) ) ) throw Error ( "Approval is needed for gas estimation" ) ;
1275
1275
return await this . _liquidate ( address , slippage , true ) as number ;
1276
1276
}
1277
1277
1278
- public async liquidate ( address : string , slippage = 0.5 ) : Promise < string > {
1278
+ public async liquidate ( address : string , slippage = 0.1 ) : Promise < string > {
1279
1279
await this . liquidateApprove ( address ) ;
1280
1280
return await this . _liquidate ( address , slippage , false ) as string ;
1281
1281
}
@@ -1294,12 +1294,12 @@ export class LlammaTemplate {
1294
1294
return await this . liquidateApprove ( )
1295
1295
}
1296
1296
1297
- public async selfLiquidateEstimateGas ( slippage = 0.5 ) : Promise < number > {
1297
+ public async selfLiquidateEstimateGas ( slippage = 0.1 ) : Promise < number > {
1298
1298
if ( ! ( await this . selfLiquidateIsApproved ( ) ) ) throw Error ( "Approval is needed for gas estimation" ) ;
1299
1299
return await this . _liquidate ( crvusd . signerAddress , slippage , true ) as number ;
1300
1300
}
1301
1301
1302
- public async selfLiquidate ( slippage = 0.5 ) : Promise < string > {
1302
+ public async selfLiquidate ( slippage = 0.1 ) : Promise < string > {
1303
1303
await this . selfLiquidateApprove ( ) ;
1304
1304
return await this . _liquidate ( crvusd . signerAddress , slippage , false ) as string ;
1305
1305
}
@@ -1607,13 +1607,13 @@ export class LlammaTemplate {
1607
1607
) ) . hash
1608
1608
}
1609
1609
1610
- private async leverageCreateLoanEstimateGas ( collateral : number | string , debt : number | string , range : number , slippage = 0.5 ) : Promise < number > {
1610
+ private async leverageCreateLoanEstimateGas ( collateral : number | string , debt : number | string , range : number , slippage = 0.1 ) : Promise < number > {
1611
1611
this . _checkLeverageZap ( ) ;
1612
1612
if ( ! ( await this . createLoanIsApproved ( collateral ) ) ) throw Error ( "Approval is needed for gas estimation" ) ;
1613
1613
return await this . _leverageCreateLoan ( collateral , debt , range , slippage , true ) as number ;
1614
1614
}
1615
1615
1616
- private async leverageCreateLoan ( collateral : number | string , debt : number | string , range : number , slippage = 0.5 ) : Promise < string > {
1616
+ private async leverageCreateLoan ( collateral : number | string , debt : number | string , range : number , slippage = 0.1 ) : Promise < string > {
1617
1617
this . _checkLeverageZap ( ) ;
1618
1618
await this . createLoanApprove ( collateral ) ;
1619
1619
return await this . _leverageCreateLoan ( collateral , debt , range , slippage , false ) as string ;
@@ -1767,12 +1767,12 @@ export class LlammaTemplate {
1767
1767
return ( await contract . repay_extended ( this . deleverageZap , [ routeIdx , _collateral , _minRecv ] , { ...crvusd . options , gasLimit } ) ) . hash
1768
1768
}
1769
1769
1770
- private async deleverageRepayEstimateGas ( collateral : number | string , slippage = 0.5 ) : Promise < number > {
1770
+ private async deleverageRepayEstimateGas ( collateral : number | string , slippage = 0.1 ) : Promise < number > {
1771
1771
this . _checkDeleverageZap ( ) ;
1772
1772
return await this . _deleverageRepay ( collateral , slippage , true ) as number ;
1773
1773
}
1774
1774
1775
- private async deleverageRepay ( collateral : number | string , slippage = 0.5 ) : Promise < string > {
1775
+ private async deleverageRepay ( collateral : number | string , slippage = 0.1 ) : Promise < string > {
1776
1776
this . _checkDeleverageZap ( ) ;
1777
1777
return await this . _deleverageRepay ( collateral , slippage , false ) as string ;
1778
1778
}
0 commit comments