Skip to content

Commit

Permalink
Update higher collateral test
Browse files Browse the repository at this point in the history
  • Loading branch information
Bushstar committed Sep 12, 2022
1 parent 3d239f2 commit c2995a9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/functional/feature_higher_collateral_factor.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,20 @@ def take_dusd_loan(self):
self.nodes[0].generate(1)

# Deposit DUSD and DFI to vault
self.nodes[0].deposittovault(vault_id, self.address, f"1.5@{self.symbolDFI}")
self.nodes[0].deposittovault(vault_id, self.address, f"1.8675@{self.symbolDFI}")
self.nodes[0].generate(1)
self.nodes[0].deposittovault(vault_id, self.address, f"1.5@{self.symbolDUSD}")
self.nodes[0].generate(1)

# Take DUSD loan greater than collateral amount
self.nodes[0].takeloan({ "vaultId": vault_id, "amounts": f"2.49@{self.symbolDUSD}"})
self.nodes[0].generate(1)
self.nodes[0].generate(5)

# Check that we are on 150% collateral ratio
vault = self.nodes[0].getvault(vault_id)
assert_equal(vault['collateralRatio'], 150)
assert_equal(vault['informativeRatio'], Decimal('150.00000000'))
assert_equal(vault['collateralValue'], Decimal('3.73500000'))
assert_equal(vault['collateralRatio'], 165)
assert_equal(vault['informativeRatio'], Decimal('164.75903614'))
assert_equal(vault['collateralValue'], Decimal('4.10250000'))
assert_equal(vault['loanValue'], Decimal('2.49000000'))

def take_multiple_loans(self):
Expand Down

0 comments on commit c2995a9

Please sign in to comment.