DeFiFoundry
20,000 USDC
View results
Submission Details
Severity: low
Invalid

`IFjordPoints.sol` is Incomplete and Missing Many Functions In the Interface

Summary

IFjordPoints.sol is missing many key functions making it almost unusable as an interface.

Vulnerability Details

See the interface here

See the contract here

Do you see any functions missing in the interface? I definitely do....

Impact

This will inhibit adoption and ease of use for the protocol.

Tools Used

Foundry and manual review

Recommendations

Replace the old current interface with code below which is a complete interface for the FjordPoints.sol contract. This will replace the current IFjordPoints.sol interface.

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.4;
interface Interface {
error CallerDisallowed();
error DistributionNotAllowedYet();
error InvalidAddress();
error NotAuthorized();
error TotalStakedAmountZero();
error UnstakingAmountExceedsStakedAmount();
event Approval(address indexed owner, address indexed spender, uint256 value);
event Debugging(uint256 indexed pendingPoints);
event PointsClaimed(address indexed user, uint256 amount);
event PointsDistributed(uint256 points, uint256 pointsPerToken);
event Staked(address indexed user, uint256 amount);
event Transfer(address indexed from, address indexed to, uint256 value);
event Unstaked(address indexed user, uint256 amount);
function EPOCH_DURATION() external view returns (uint256);
function PRECISION_18() external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function balanceOf(address account) external view returns (uint256);
function burn(uint256 amount) external;
function burnFrom(address account, uint256 amount) external;
function claimPoints() external;
function decimals() external view returns (uint8);
function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool);
function distributePoints() external;
function increaseAllowance(address spender, uint256 addedValue) external returns (bool);
function lastDistribution() external view returns (uint256);
function name() external view returns (string memory);
function onStaked(address user, uint256 amount) external;
function onUnstaked(address user, uint256 amount) external;
function owner() external view returns (address);
function pointsPerEpoch() external view returns (uint256);
function pointsPerToken() external view returns (uint256);
function setOwner(address _newOwner) external;
function setPointsPerEpoch(uint256 _points) external;
function setStakingContract(address _staking) external;
function staking() external view returns (address);
function symbol() external view returns (string memory);
function totalPoints() external view returns (uint256);
function totalStaked() external view returns (uint256);
function totalSupply() external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
function users(address)
external
view
returns (uint256 stakedAmount, uint256 pendingPoints, uint256 lastPointsPerToken);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.