Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
EviLord032 committed Apr 18, 2024
1 parent c1a79a9 commit e79fe1e
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions scenario/LiquidationBotScenario.ts
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ scenario(
{
filter: async (ctx) => matchesDeployment(ctx, [{network: 'mainnet'}, {network: 'polygon'}, {network: 'arbitrum'}]),
tokenBalances: {
$comet: { $base: 100000 },
$comet: { $base: 1000000 },
},
cometBalances: {
albert: {
Expand Down Expand Up @@ -589,11 +589,6 @@ scenario(

const borrowCapacity = await borrowCapacityForAsset(comet, albert, 0);
const borrowAmount = (borrowCapacity.mul(90n)).div(100n);
const baseAssetAddress = await comet.baseToken();
const baseAsset = _context.getAssetByAddress(baseAssetAddress);
if(ethers.BigNumber.from(await baseAsset.balanceOf(comet.address)).lt(borrowAmount)) {
await _context.sourceTokens(ethers.BigNumber.from(await baseAsset.balanceOf(comet.address)).sub(borrowAmount).toBigInt(), baseToken, comet.address);
}

await albert.withdrawAsset({
asset: baseToken,
Expand Down Expand Up @@ -660,7 +655,7 @@ scenario(
{
filter: async (ctx) => matchesDeployment(ctx, [{network: 'mainnet'}, {network: 'polygon'}, {network: 'arbitrum'}]),
tokenBalances: {
$comet: { $base: 100000 },
$comet: { $base: 1000000 },
},
cometBalances: {
albert: {
Expand Down Expand Up @@ -706,9 +701,6 @@ scenario(
const borrowCapacity = await borrowCapacityForAsset(comet, albert, 0);
const borrowAmount = (borrowCapacity.mul(90n)).div(100n);

if(baseToken === '0xc2132D05D31c914a87C6611C10748AEb04B58e8F') {
await _context.sourceTokens(borrowAmount.toBigInt(), baseToken, comet.address);
}
await albert.withdrawAsset({
asset: baseToken,
amount: borrowAmount
Expand Down

0 comments on commit e79fe1e

Please sign in to comment.