Skip to content

Commit

Permalink
fix kton interest
Browse files Browse the repository at this point in the history
  • Loading branch information
hujw77 committed Jun 19, 2024
1 parent 94b4971 commit 7009e7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/deposit/Deposit.sol
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ contract Deposit is

function computeInterest(uint256 value, uint256 months) public view returns (uint256) {
uint256 interest = INTERESTS[months];
return value * interest / 10_000;
return value * interest / 10_000 / 10_000;
}

function isClaimRequirePenalty(uint256 id) public view returns (bool) {
Expand Down
5 changes: 3 additions & 2 deletions test/deposit/Deposit.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ contract DepositTest is Test, ERC721Holder {
for (uint256 m = 1; m < 37; m++) {
uint256 interest = Deposit(deposit).INTERESTS(m);

safeconsole.log(_computeInterest(UNIT, m));
// assertEq(Deposit(deposit).computeInterest(UNIT, m), _computeInterest(UNIT, m));
// safeconsole.log(_computeInterest(UNIT, m));
// safeconsole.log(Deposit(deposit).computeInterest(UNIT, m));
assertEq(Deposit(deposit).computeInterest(UNIT, m) / 10000000000, _computeInterest(UNIT, m) / 10000000000);
}
}

Expand Down

0 comments on commit 7009e7d

Please sign in to comment.