Skip to content
This repository has been archived by the owner on Mar 2, 2023. It is now read-only.

WIP - review architecture #192

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

WIP - review architecture #192

wants to merge 1 commit into from

Conversation

OxMarco
Copy link
Contributor

@OxMarco OxMarco commented Oct 3, 2022

No description provided.

@OxMarco OxMarco changed the title review architecture WIP - review architecture Oct 3, 2022
Comment on lines +271 to +281
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

Reentrancy in BaseStrategy.securitisePosition(uint256,address) (contracts/strategies/BaseStrategy.sol#271-281): External calls: - IERC20(position.owedToken).safeTransferFrom(msg.sender,position.lender,position.principal + position.fees) (contracts/strategies/BaseStrategy.sol#279) State variables written after the call(s): - positions[positionID].lender = newLender (contracts/strategies/BaseStrategy.sol#280)
@@ -0,0 +1,22 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.8.12;

Check warning

Code scanning / Slither

Incorrect versions of Solidity

Pragma version>=0.8.12 (contracts/interfaces/IInterestRateModel.sol#2) necessitates a version too recent to be trusted. Consider deploying with 0.6.12/0.7.6/0.8.7
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.8.12;

Check warning

Code scanning / Slither

Incorrect versions of Solidity

Pragma version>=0.8.12 (contracts/interfaces/ISVGImageGenerator.sol#2) necessitates a version too recent to be trusted. Consider deploying with 0.6.12/0.7.6/0.8.7
@@ -0,0 +1,53 @@
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.8.12;

Check warning

Code scanning / Slither

Incorrect versions of Solidity

Pragma version>=0.8.12 (contracts/strategies/InterestRateModel.sol#2) necessitates a version too recent to be trusted. Consider deploying with 0.6.12/0.7.6/0.8.7
contract InterestRateModel is IInterestRateModel {
using GeneralMath for uint256;

uint256 public immutable MAX_RATE;

Check warning

Code scanning / Slither

Conformance to Solidity naming conventions

Variable InterestRateModel.MAX_RATE (contracts/strategies/InterestRateModel.sol#14) is not in mixedCase
uint256 internal constant DEGRADATION_COEFFICIENT = 21600; // six hours
uint24 internal constant TIME_FEE_WINDOW = 84600;

Check warning

Code scanning / Slither

Unused state variable

VaultMath.TIME_FEE_WINDOW (contracts/libraries/VaultMath.sol#14) is never used in VaultMath (contracts/libraries/VaultMath.sol#10-62)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant