@@ -85,28 +85,23 @@ contract NAVTest is DSTest, Math {
uint dueDate = now + 2 days;
uint amount = 50 ether;
(,,uint NAVIncrease) = borrow(tokenId, nftValue, amount, dueDate);
- emit log_named_uint("nav", 1);
// check FV
uint normalizedDueDate = feed.uniqueDayTimestamp(dueDate);
- emit log_named_uint("nav", 1);
uint FV = 55.125 ether; // 50 * 1.05 ^ 2 = 55.125
assertEq(feed.dateBucket(normalizedDueDate), FV);
// FV/(1.03^2)
assertEq(feed.currentNAV(), 51.960741582371777180 ether);
// only on loan so current NAV should be equal to borrow increase
assertEq(feed.currentNAV(), NAVIncrease);
assertEq(feed.totalValue(), 51.960741582371777180 ether);
- emit log_named_uint("nav", 1);
hevm.warp(now + 1 days);
// FV/(1.03^1)
assertEq(feed.currentNAV(), 53.519490652735515520 ether);
assertEq(feed.totalValue(), 53.519490652735515520 ether);
hevm.warp(now + 1 days);
// FV/(1.03^0)
assertEq(feed.currentNAV(), 55.125 ether);
- emit log_named_uint("nav", 1);
assertEq(feed.totalValue(), 55.125 ether);
- emit log_named_uint("nav", 1);
}
@@ -326,8 +321,8 @@ contract NAVTest is DSTest, Math {
}
function testWriteOffs() public {
- pile.setReturn("rates_pie", 100 ether);
- pile.setReturn("rates_chi", ONE);
+ pile.setReturn("rate_debt", 100 ether);
+
// default is two different write off groups both with 100 ether in debt
// 60% -> 40% write off
// 80% -> 20% write off
message:
李蓝天:改动分类:原因:
刘志浩:改动分类:原因: