code-423n4 / 2022-04-abranft-findings

0 stars 0 forks source link

QA Report #193

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

[N01] Leap-years considerations

https://github.com/code-423n4/2022-04-abranft/blob/5cd4edc3298c05748e952f8a8c93e42f930a78c2/contracts/NFTPair.sol#L111

for more precision and considering leap years you could take a year as 365.25 for more precision.

[N02] inconsistent checking of address(0) for collateral and asset contracts

https://github.com/code-423n4/2022-04-abranft/blob/5cd4edc3298c05748e952f8a8c93e42f930a78c2/contracts/NFTPair.sol#L175

you should check both, collateral and asset or none for more consistency

[N03] use enums for better readability

https://github.com/code-423n4/2022-04-abranft/blob/5cd4edc3298c05748e952f8a8c93e42f930a78c2/contracts/NFTPair.sol#L96

cryptolyndon commented 2 years ago

Seen, thanks.

[N02] checking neither would break things spectacularly; the check has a different purpose