Orcania DEX

CertiKFiles named in the report

CertiK reviewed Orcania (Orcania DEX) on 12 Sep 2022: 17 findings, 4 critical; 14 marked fixed, 3 open.

4 critical findings, fixed
Open the reportOpen Orcania’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings17

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

SeverityOpenAcknowledgedFixed
Critical004
High101
Medium001
Low208
HighInitial Token DistributionOpen

Tokens are sent to the deployer `msg.sender` when deploying the contract. This could be a centralization risk as the deployer can distribute tokens without obtaining the consensus of the community.

LowCheck Effect Interaction Pattern ViolatedOpen

The order of external call/transfer should follow the check-effect-interaction pattern. A reentrancy attack can occur when the contract creates a function that makes an external call to another untrusted contract before resolving any effects. If the attacker can control the untrusted contract, they can make a recursive call back to the original function, repeating interactions that would have otherwise not run after the external call resolved the effects.

LowPotential Reentrancy AttackOpen

A reentrancy attack can occur when the contract creates a function that makes an external call to another untrusted contract before resolving any effects. If the attacker can control the untrusted contract, they can make a recursive call back to the original function, repeating interactions that would have otherwise not run after the external call resolved the effects. Those mentioned functions are for swapping or setting liquidity, the external `IERC20(token).transferFrom()` functions, which cannot be fully trusted, are called before updating state variables, so there is a risk of reentrancy attack at these locations. ### External call(s) ```solidity=90 IERC20(tokenIn).transferFrom(msg.sender, address(this), amountIn); ``` * This call transfers tokens. ### State variables written after the call(s) ```solidity=92 uint256 amountOut = SwapTokenForOCA(tokenIn, amountIn); ``` * This function call executes the following assignment(s). * In `DEX.SwapTokenForOCA`, * `_tokenOCAbalance[token] -= amountOut` --- ### External call(s) ```solidity=100 IERC20(tokenIn).transferFrom(msg.sender, address(this), amountIn); ``` * This call transfers tokens. ### State variables written after the call(s) ```solidity=102 uint256 amountOut = SwapTokenForOCA(tokenIn, amountIn); ``` * This function call executes the following assignment(s). * In `DEX.SwapTokenForOCA`, * `_tokenOCAbalance[token] -= amountOut` ```solidity=103 uint256 amountOut1 = SwapOCAForToken(tokenOut, amountOut); ``` * This function call executes the following assignment(s). * In `DEX.SwapOCAForToken`, * `amountOut = mul(amountIn,IERC20(token).balanceOf(address(this)),999) / ((_tokenOCAbalance[token] += amountIn) * 1000)` --- ### External call(s) ```solidity=111 IERC20(tokenIn).transferFrom(msg.sender, address(this), amountIn); ``` * This call transfers tokens. ### State variables written after the call(s) ```solidity=113 uint256 amountOut = SwapTokenForOCA(tokenIn, amountIn); ``` * This function call executes the following assignment(s). * In `DEX.SwapTokenForOCA`, * `_tokenOCAbalance[token] -= amountOut` ```solidity=114 uint256 amountOut1 = SwapOCAForCoin(amountOut); ``` * This function call executes the following assignment(s). * In `DEX.SwapOCAForCoin`, * `amountOut = (amountIn * address(this).balance * 999) / ((_tokenOCAbalance[address(0)] += amountIn) * 1000)` --- ### External call(s) ```solidity=169 IERC20(token).transferFrom(msg.sender, address(this), amount); ``` * This call transfers tokens. ```solidity=170 OCA.transferFrom(msg.sender, address(this), OCAamount); ``` * This call sends OCAs. ### State variables written after the call(s) ```solidity=176 _points[msg.sender][token] = userPoints; ``` ```solidity=177 _points[address(this)][token] = OCAamount - userPoints; ``` ```solidity=174 _tokenOCAbalance[token] = OCAamount; ``` --- ### External call(s) ```solidity=193 IERC20(token).transferFrom(msg.sender, address(this), amount); ``` * This call transfers tokens. ### State variables written after the call(s) ```solidity=201 _points[msg.sender][token] += userPoints; ``` ```solidity=202 _points[address(this)][token] += earnedPoints - userPoints; ```

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 (3)

  • DEX/DEX.sol
  • OCA/OMS.sol
  • OCA/OCA.sol

Part of Orcania’s security record

Orcania
Audits1 audit by 1 firmLast audit Sep 2022, by CertiK.
Critical findingsNo open critical findingsIn that report, 4 critical findings were reported. Each is marked fixed by the firm that reported it.
Open Orcania’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