Open code423n4 opened 2 years ago
1. File: PuttyV2.sol#L389
function exercise(Order memory order, uint256[] calldata floorAssetTokenIds) public payable {
[1. File: PuttyV2.sol#L287]()
require(order.duration < 10_000 days, "Duration too long");
2. File: PuttyV2.sol#L499
feeAmount = (order.strike * fee) / 1000;
setBaseURI()
setFee()
1. File: PuttyV2.sol#L228-232
function setBaseURI(string memory _baseURI) public payable onlyOwner { baseURI = _baseURI; emit NewBaseURI(_baseURI); }
2. File: PuttyV2.sol#L240
function setFee(uint256 _fee) public payable onlyOwner { require(_fee < 30, "fee must be less than 3%"); fee = _fee; emit NewFee(_fee); }
QA
Functions never used internally should be declared external
1. File: PuttyV2.sol#L389
Magic numbers should be declared as constants
[1. File: PuttyV2.sol#L287]()
2. File: PuttyV2.sol#L499
Functions
setBaseURI()
andsetFee()
can lock Ether in contract forever.There is no way to remove Ether from this contract if accidentally sent to these functions.
1. File: PuttyV2.sol#L228-232
2. File: PuttyV2.sol#L240