Klink Finance

CertiKFiles named in the report

CertiK reviewed Klink Finance on 7 Feb 2025: 11 findings, 0 critical; 3 marked fixed, 2 acknowledged, 6 open.

No open critical findings
Open the reportOpen Klink Finance’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings11

Statuses are the security firm’s own, from its report.

SeverityOpenAcknowledgedFixed
Critical000
High300
Medium021
Low302
MediumInsufficient Reward Balance Can Prevent User WithAcknowledged

When a user attempts to withdraw, the contract checks whether its `rewardBalance` is sufficient to cover both the user’s staked principal and the calculated reward. If the `rewardBalance` is too low, the entire withdrawal transaction reverts, preventing the user from retrieving any funds—including their principal. In this scenario, the user’s only option is to perform an `emergencyWithdraw`, which forfeits all accumulated rewards. ```solidity=419 function _withdraw(address from) private returns (bool) { uint256 reward = _calculate(from, deposits[from].endTime); reward = reward.add(deposits[from].rewards); uint256 amount = deposits[from].depositAmount; require(reward <= rewardBalance, "Not enough rewards"); ```

MediumThird-Party DependenciesAcknowledged

The contract interacts with an external ERC-20 token contract at `tokenAddress_`, assumed in this context to be `KlinkToken`. Although the audit treats external contracts as black boxes and presumes they operate correctly, in reality, third-party contracts may be vulnerable or malicious if compromised. Specifically, the function `_payto` and `_hasAllowance` modifier (shown below) depends on the externally provided tokenAddress without validating its authenticity or security: ```solidity modifier _hasAllowance(address allower, uint256 amount) { // Make sure the allower has provided the right allowance. ERC20Interface = IERC20(tokenAddress); uint256 ourAllowance = ERC20Interface.allowance(allower, address(this)); require(amount <= ourAllowance, "Make sure to add enough allowance"); _; } function _payTo( address allower, address receiver, uint256 amount ) private _hasAllowance(allower, amount) returns (bool) { ERC20Interface = IERC20(tokenAddress); ERC20Interface.safeTransferFrom(allower, receiver, amount); return true; } ``` Because the contract assumes that the external token behaves according to the ERC-20 standard, any breach, misimplementation, or malicious update to that third-party token could lead to loss of user funds. For example, if the ERC-20 contract is compromised to always return a high allowance or to trigger harmful callbacks, the staking contract would be unaware of this abnormal behavior and could execute logic with unintended consequences.

Contracts in scope

No deployed address is recorded for this audit.

The report names a repository or files. Open the report to see its scope.

Repository and files the report names (2)

  • contracts/Token.sol
  • contracts/Staking.sol

Part of Klink Finance’s security record

Klink Finance
Audits1 audit by 1 firmLast audit Feb 2025, by CertiK.
Critical findingsNo open critical findingsIn 1 report.
Open Klink Finance’s security record

Security firm

CertiK

1,044 projects reviewed · 1,375 reports · latest May 2025

See CertiK’s audits

Something wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.

Tell us