-
Notifications
You must be signed in to change notification settings - Fork 1
WIP - review architecture #192
base: master
Are you sure you want to change the base?
Conversation
function securitisePosition(uint256 positionID, address newLender) external onlyOwner { | ||
Position memory position = positions[positionID]; | ||
position.fees += interestRateModel.computeTimeFees( | ||
position.principal, | ||
position.interestRate, | ||
block.timestamp - position.createdAt | ||
); | ||
|
||
IERC20(position.owedToken).safeTransferFrom(msg.sender, position.lender, position.principal + position.fees); | ||
positions[positionID].lender = newLender; | ||
} |
Check warning
Code scanning / Slither
Reentrancy vulnerabilities
@@ -0,0 +1,22 @@ | |||
// SPDX-License-Identifier: BUSL-1.1 | |||
pragma solidity >=0.8.12; |
Check warning
Code scanning / Slither
Incorrect versions of Solidity
@@ -0,0 +1,16 @@ | |||
// SPDX-License-Identifier: BUSL-1.1 | |||
pragma solidity >=0.8.12; |
Check warning
Code scanning / Slither
Incorrect versions of Solidity
@@ -0,0 +1,53 @@ | |||
// SPDX-License-Identifier: BUSL-1.1 | |||
pragma solidity >=0.8.12; |
Check warning
Code scanning / Slither
Incorrect versions of Solidity
contract InterestRateModel is IInterestRateModel { | ||
using GeneralMath for uint256; | ||
|
||
uint256 public immutable MAX_RATE; |
Check warning
Code scanning / Slither
Conformance to Solidity naming conventions
uint256 internal constant DEGRADATION_COEFFICIENT = 21600; // six hours | ||
uint24 internal constant TIME_FEE_WINDOW = 84600; |
Check warning
Code scanning / Slither
Unused state variable
No description provided.