Skip to content

isBorrowCollateralized tests#361

Open
MishaShWoof wants to merge 6 commits into
feat/service-patchfrom
test/isBorrowCollateralized-functionality
Open

isBorrowCollateralized tests#361
MishaShWoof wants to merge 6 commits into
feat/service-patchfrom
test/isBorrowCollateralized-functionality

Conversation

@MishaShWoof

@MishaShWoof MishaShWoof commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

Tests for isBorrowCollateralized function in Comet

@VladyslavPerederWoof VladyslavPerederWoof changed the base branch from main to feat/service-patch March 25, 2026 10:18

@VladyslavPerederWoof VladyslavPerederWoof left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need tests for:

Case when the user has a couple of collaterals, and liquidity will be enough to cover the borrow position in the middle (e.g., 4 collaterals, liquidity calculation exits on the 3rd collateral)

In a case where the user will take a loan, has 3 collaterals, and only the last one will cover the debt.

Case on proper liquidity calculation with all 24 collaterals. Huge loan, and all 24 collaterals are used for covering debt.

Case when all 24 supplied collaterals will not cover the debt.

Each case is described separately. For the last 2 cases, use a separate describe block 24 collaterals.

Comment thread test/is-borrow-collateralized-test.ts Outdated
Comment thread test/is-borrow-collateralized-test.ts Outdated
Comment thread test/is-borrow-collateralized-test.ts Outdated
Comment thread test/is-borrow-collateralized-test.ts Outdated
Comment thread test/is-borrow-collateralized-test.ts Outdated
Comment thread test/is-borrow-collateralized-test.ts Outdated
Comment thread test/is-borrow-collateralized-test.ts Outdated
Comment thread test/is-borrow-collateralized-test.ts Outdated
Comment thread test/is-borrow-collateralized-test.ts Outdated
Comment thread test/is-borrow-collateralized-test.ts Outdated
Comment thread test/is-borrow-collateralized-test.ts Outdated
Comment thread test/is-borrow-collateralized-test.ts Outdated
Comment thread test/is-borrow-collateralized-test.ts Outdated
Comment thread test/is-borrow-collateralized-test.ts Outdated
Comment thread test/is-borrow-collateralized-test.ts Outdated
@VladyslavPerederWoof VladyslavPerederWoof added the Tests Tests refactoring label Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tests Tests refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants