STFX security record

Ethereum, Solanastfx.ioGitHub

As of 21 Oct 2026, STFX has 2 audit reports by 2 security firms on Trustblock; the latest is by Zellic, dated 13 Apr 2023. Those reports list no open critical findings.

Critical findings
No open critical findings
Across 2 reports.
Open the latest report
Your label, live
Get the label for your site

Record last updated . It holds audits and findings, contracts and incidents up to Oct 2026. Trustblock does not review code.

Audits2

Newest first

AuditSecurity firmDateScopeCritical findingsReport
STFX security assessmentSecurity firm: ZellicDate: Scope: Not recorded (see the report)No open critical findingsOpen · GitHub
STFXSecurity firm: CertiKDate: Scope: Files named in the reportNo open critical findingsOpen · skynet.certik.com

Findings21

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

SeverityOpenAcknowledgedFixed
Critical000
High012
Medium013
Low0113
HighCentralization Related RisksSTFX · CertiK · 12 Dec 2022Acknowledged

In the contract **gmx/Reader.sol**, the role **owner** has authority over the following functions: - function setDex(), to set `dex` address. - function setOwner(), to change the owner of the contract. Any compromise to the **owner** account may allow a hacker to take advantage of this authority and change the config for the protocol. In the contract **StfxVault.sol**, the role **admin** has authority over the following functions: - function closePosition(), to close the stfx position. - function cancelOrder(), to cancel the pending order. - function distributeProfits(), to distribute profits to users. - function closeLiquidatedVault(), to close the stfx liquidated by the dex. - function cancelVault(), to cancel the empty or expired stfx. - function cancelStfAfterOpening(), to cancel the pending stfx. - function cancelStfAfterPositionDeadline(), to cancel the stf after a month and close the position as a market order. - function pause() and unpause(), to set the pause status. **AND** The role `owner` has authority over the following functions: - function setCapacityPerStf(), to set the max capacity of collateral which can be raised per stf. - function setMinInvestmentAmount(), to set the min investment of collateral an investor can invest per stf. - function setMaxInvestmentAmount() and setMaxLeverage(), to set max leverage and invest amount. - function setMinLeverage(), to set min leverage. - function setMaxFundraisingPeriod(), to set the max fundraising period. - function setMaxDeadlineForPosition(), to set the max deadline a position can be open for an stf. - function setManagerFee(), to set the manager fee percent. - function setProtocolFee(), to set the protocol fee percent. - function setOwner(), to set owner. - function setStfxImplementation(), to set the new stfx implementation. - function setReader(), to set the reader. - function setFundDeadline(), to set the fundDeadline. - function setUsdc(), to set usdc address. - function setWeth(), to set weth address. - function setAdmin(), to set admin. - function setReferrerCode(), to set referralCode. - function setIsManagingFund(), to set the isManagingFund. - function withdraw(), withdrawToken(), withdrawFromStf(), to withdraw fund from the contracts. Any compromise to the **owner** and **admin** accounts may allow a hacker to take advantage of this authority and bring unpredictable damages to the project. In the contract `Presale` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and bring unpredictable damages to the project. ![](https://accelerator-tasks-prod.acc.corp.certik.com/057d6fe4e7f0435b89c05406bdf82d53/diagrams/centralization_Presale-Presale-_owner.svg) In the contract `STFXToken` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and bring unpredictable damages to the project. ![](https://accelerator-tasks-prod.acc.corp.certik.com/057d6fe4e7f0435b89c05406bdf82d53/diagrams/centralization_STFXToken-STFXToken-_owner.svg)

Open the report
MediumMissing process of flag `closed`STFX · CertiK · 12 Dec 2022Acknowledged

The bool variable `closed` is defaulted to false. And when `block.chainid == 10`, it is not set to true. So the status of the `stf` is not changed after the function `closePosition()` is called.

Open the report
Lowadmin operationsSTFX · CertiK · 12 Dec 2022Acknowledged

We understand that if anyone can become a manager, the project team should have control over managers. When the admin receives complaints and decides to take over the stf, the admin himself/herself may not represent the wishes of every investor that trusts the manager. Investors join the manager's stf, which means they trust the manager. But the admin has not been able to obtain the approval of investors, as long as the admin interferes with the stfx, there is bound to be a part of the users opposed.

Open the report
LowChecks on hardcoded chainIdSTFX · CertiK · 12 Dec 2022Acknowledged

According to the logic, the protocol on different chains will interact with different `stfx` implementations. While it is not recommended to use the check in hard code. It's recommended to directly convert the address to `IStfxGmx` or `IStfxPerp` in constructor of the contract.

Open the report
LowIncompatibility With Deflationary TokensSTFX · CertiK · 12 Dec 2022Acknowledged

The contract `vault` receives collateral tokens from the user and allows the manager to invest. The collateral token should not be deflationary tokens because the amount recorded is not the really received amount but the parameter amount(before tax). When transferring standard ERC20 deflationary tokens, the input amount may not be equal to the received amount due to the charged (and burned) transaction fee. As a result, this may not meet the assumption behind these low-level asset-transferring routines and will bring unexpected balance inconsistencies.

Open the report
LowLogical issue about leverageSTFX · CertiK · 12 Dec 2022Acknowledged

The manager can choose leverage to open the position. In the high-leverage position, a margin call is required inevitably. But the protocol seems not to support the operation, since the manager can not flexibly use the funds and he/she can only open one position.

Open the report
LowLogical issue of function `cancelOrder()`STFX · CertiK · 12 Dec 2022Acknowledged

According to the comment of the function `cancelOrder()`, the parameter `_isOpen` is used to decide which type of order to close. When `_isOpen` is false, it's assumed that the function should revert if the status is OPENED.

Open the report
LowLogical issue of function getPrice() in `perp/ReaSTFX · CertiK · 12 Dec 2022Acknowledged

According to the logic of the protocol, the function `getPrice()` should return the instant price of the `baseToken`. While the price is not from Price Oracle but the function of the `baseToken` itself. Since the implementation of `baseToken` is not found in scope. We hope the team to elaborate more on the price consult mechanism of `baseToken`.

Open the report
LowMissing Emit EventsSTFX · CertiK · 12 Dec 2022Acknowledged

Functions that update state variables should emit relevant events as notifications.

Open the report
LowModifier `onlyManager` not usedSTFX · CertiK · 12 Dec 2022Acknowledged

The modifier `onlyManager` is not used in the contract.

Open the report
Show 3 more
LowRedundant commentSTFX · CertiK · 12 Dec 2022Acknowledged

The comment at line 122 is redundant because it describes the condition that could happen in closing positions but it appears in the function `openPosition()`. And it is not aligned with the surrounding codes.

Open the report
LowThird Party DependenciesSTFX · CertiK · 12 Dec 2022Acknowledged

The contract is serving as the underlying entity to interact with 3rd party **ClearingHouse** protocols. The scope of the audit treats 3rd party entities as black boxes and assumes their functional correctness. However, in the real world, 3rd parties can be compromised and this may lead to lost or stolen assets. Additionally, upgrades of 3rd parties can possibly create severe impacts, such as increasing fees of 3rd parties, migrating to new LP pools, etc. In file `gmx/Reader.sol`: - **IGmxVault(dex.vault)**.`shortableTokens()` (line 49) - **IGmxVaultPriceFeed(vaultPriceFeed)**.`getPrice()` (line 59) In file `gmx/Stfx.sol`: - **IGmxPositionRouter()**.`minExecutionFee()` (line 123, 194, 249) - **IGmxRouter()**.`approvePlugin()` (line 138, 210) - **IGmxOrderBook()**.`createIncreaseOrder()` (line 139) - **IGmxPositionRouter()**.`createIncreasePosition()` (line 154) - **IGmxOrderBook()**.`createDecreaseOrder()` (line 211) - **IGmxPositionRouter()**.`createDecreasePosition()` (line 217) - **IGmxOrderBook()**.`cancelIncreaseOrder()` (line 246) - **IGmxOrderBook()**.`cancelDecreaseOrder()` (line 259) - **IGmxReader()**.`getAmountOut()` (line 338, 350) - **IGmxRouter()**.`swap()` (line 357) In file `perp/Reader.sol`: - **IMarketRegistry()**.`hasPool()` (line 23) - **IBaseToken()**.`getIndexPrice()` (line 35) In file `perp/Stfx.sol`: - **IClearingHouse()**.`openPosition()` (line 77, 91) - **IclearingHouse()**.`closePosition()` (line 111) In file `StfxVault.sol`: - **IGmxVault()**.`getPosition()` (line 230)

Open the report
LowUnchecked Value of ERC-20 `transfer()`/`transferFSTFX · CertiK · 12 Dec 2022Acknowledged

The linked `transfer()`/`transferFrom()` invocations do not check the return value of the function call, which should yield `true` in the case of proper ERC-20 implementation.

Open the report

Contracts

No deployed address is recorded for these audits.

The reports name a repository or files. Open a report to see its scope.

The repositories and files the reports name

Show this on your site

Is this your project? Show this record on your own website. The label states what the record holds, links to this page and updates by itself. It is free and needs no sign-in.

Content

Facts

Automatic: the three strongest facts of this project’s own record (its last audit and two more), highlighted. They update with the record. Picking a fact turns Automatic off.

Fixed as
Language

Style

Layout
Theme
Accent
Corners

Format

Size
Date
Embed as
HTML
<head>
<script src="https://widget.trustblock.run/project-widget.min.js" defer></script>
</head>
<body>
<div
data-tb-project-widget
data-tb-project-slug="stfx"
></div>
</body>

Paste the code where the label should appear. It uses no API credit and updates by itself.

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