Skip to content

E2E asset borrow test fails for asset worth more than ~10k$ #398

@Rozengarden

Description

@Rozengarden

Among the e2e assets test, some of them are testing for revert when going above supply & borrow caps

function e2eTestAsset(

To do this the vaults get seeded with 100k$ of collateral and 10k$ of asset to be tested.

uint256 collateralAssetAmount = _getTokenAmountByDollarValue(pool, collateralConfig, 100000);

uint256 testAssetAmount = _getTokenAmountByDollarValue(pool, testAssetConfig, 10000);

When the tested asset can be borrowed the test will set borrow cap to 1 and check that borrowing 11**decimals asset revert with the error being that the borrow cap have been reached (BORROW_CAP_EXCEEDED). However if 11**decimals asset is worth moar than 10k$ the test will revert with INVALID_AMOUNT instead as we are trying to borrow moar than the supply.

amount: 11 ** testAssetConfig.decimals,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions