Platform: Code4rena
Start Date: 16/12/2022
Pot Size: $60,500 USDC
Total HM: 12
Participants: 58
Period: 5 days
Judge: Trust
Total Solo HM: 4
Id: 196
League: ETH
Rank: 36/58
Findings: 1
Award: $43.54
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: yixxas
Also found by: 0x52, 0xAgro, 0xSmartContract, 0xhacksmithh, Aymen0909, Bnke0x0, Bobface, Breeje, Diana, Franfran, HE1M, HollaDieWaldfee, IllIllI, Jeiwan, RaymondFam, Rolezn, SaharDevep, Secureverse, SmartSek, ak1, bin2chen, brgltd, chrisdior4, gz627, imare, ladboy233, lukris02, oyc_109, rvierdiiev, shark, tnevler, unforgiven, wait
43.5439 USDC - $43.54
Context:
return _target;
L47
Recommendation:
Choose named return variable or return statement. It is unnecessary to use both.
Context:
function _auctionCurrentPrice(uint256 id, uint256 startTime, INFTEDA.Auction memory auction)
L114 (id)
Context:
function lastUpdated() external view override returns (uint256) {
L81 (external function can not go after public function)
Description:
According to official solidity documentation functions should be grouped according to their visibility and ordered:
constructor
receive function (if exists)
fallback function (if exists)
external
public
internal
private
Within a grouping, place the view and pure functions last.
Recommendation:
Put the functions in the correct order according to the documentation.
Context:
contract PaprToken is ERC20 {
L6 deletefunction uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata _data) external {
L234function burnPaprFromAuctionFees(uint256 amount) external override onlyOwner {
L386function _addCollateralToVault(address account, IPaprController.Collateral memory collateral) internal {
L413function _removeCollateral(
L424function _increaseDebt(
L456function _reduceDebt(address account, ERC721 asset, address burnFrom, uint256 amount) internal {
L481function _reduceDebtWithoutBurn(address account, ERC721 asset, uint256 amount) internal {
L486function _increaseDebtAndSell(
L493function _purchaseNFTAndUpdateVaultIfNeeded(Auction calldata auction, uint256 maxPrice, address sendTo)
L519function _handleExcess(uint256 excess, uint256 neededToSaveVault, uint256 debtCached, Auction calldata auction)
L532function _maxDebt(uint256 totalCollateraValue, uint256 cachedTarget) internal view returns (uint256) {
L556library EDAPrice {
L7 deletelibrary OracleLibrary {
L8 deleteContext:
/// @return selector indicating succesful receiving of the NFT
L158 (Change succesful to successful)/// @param auction The defintion of the auction
L46 (Change defintion to definition)/// @dev Derived from the auction. Identitical auctions cannot exist simultaneously
L58 (Change Identitical to Identical)/// @notice if liquidations are currently locked, meaning startLiquidationAuciton will revert
L237 (Change startLiquidationAuciton to startLiquidationAuction)Context:
/// @dev vaults are uniquely identified by the address of the vault owner and the address of the collateral token used in the vault
L66/// @notice removes debt from a vault and burns it by buying it on Uniswap in exchange for the controller's underlying token
L164/// @notice the multiplier for the starting price of an auction, applied to the current price of the collateral in papr tokens
L257/// @notice fee paid by the vault owner when their vault is liquidated if there was excess debt credited to their vault, in bips
L260Description:
Maximum suggested line length is 120 characters.
#0 - c4-judge
2022-12-25T16:22:01Z
trust1995 marked the issue as grade-b