Xshares

CertiKFiles named in the report

CertiK reviewed XShares on 5 Sep 2023: 9 findings, 1 critical; 2 marked fixed, 7 acknowledged.

1 critical finding, fixed
Open the reportOpen XShares’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings9

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

SeverityOpenAcknowledgedFixed
Critical001
High030
Medium010
Low031
HighCentralization Risks in XShares.solAcknowledged

In the contract `XSharesSharesV1` 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 modify important configurations of the contract, such as the fee amount and fee destination. ![](https://accelerator-tasks-prod.acc.corp.certik.com/11ee-47d7-7f21db10-a013-a5292976de41/diagrams/centralization_XShares-XSharesSharesV1-_owner.svg)

HighCentralized Control of Contract UpgradeAcknowledged

The “XSharesSharesV2” contract inherits upgradeable contracts, indicating that it’s part of an upgradeable system. Upgradeable contracts often pair with a proxy contract responsible for managing contract upgrades. The `admin` of the proxy has the authority to update the implementation contract (i.e., the XSharesSharesV2 contract). Any compromise of the admin account could allow a hacker to exploit this authority, potentially altering the implementation contract pointed to by the proxy, and thus executing malicious functionality within the implementation contract.

HighNo Upper Limit in **setProtocolFeePercent** and *Acknowledged

There are no upper boundaries for **setProtocolFeePercent** and **setSubjectFeePercent** function which is used to modify the protocol fee and subject fee. It is possible to set the total fee rate up to any arbitrary amount.

MediumThe regular user's share can become unsellable.Acknowledged

The contract requires the "sharesSubject" to have at least 1 share after the registration. The last share of the "sharesSubject" will become unsellable. It's possible for a regular user's share to become unsellable, and the user will lose its assets. ```sol require(supply > amount, "Cannot sell the last share"); ```

LowMissing Emit EventsAcknowledged

The smart contract contains one or more state changes related to arithmetic operations that do not emit events to communicate the changes outside the blockchain, which can lead to difficulties in tracking or verifying these changes and may affect the contract's transparency and auditability. ```solidity=147 protocolFeePercent = _feePercent; ``` --- ```solidity=151 subjectFeePercent = _feePercent; ```

LowThird-Party DependenciesAcknowledged

The "register" function allows an EOA or smart contract to register a "sharesSubject." When selling or buying shares, the "sharesSubject" address needs to receive native tokens. If the "sharesSubject" is malicious or has incorrectly implemented the payment receive feature, it can cause the "XSharesSharesV2" to malfunction. The implementation of all the "sharesSubject" instances is out of the scope of the audit.

LowUnprotected InitializerAcknowledged

One or more logic contracts do not protect their initializers. An attacker can call the initializer and assume ownership of the logic contract, whereby she can perform privileged operations that trick unsuspecting users into believing that she is the owner of the upgradeable contract. ```solidity=6 contract XSharesSharesV2 is OwnableUpgradeable { ``` - `XSharesSharesV2` is an upgradeable contract that does not protect its initializer. ```solidity=23 function initialize() public initializer { ``` - `initialize` is an unprotected initializer function.

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

  • XShares.sol

Part of XShares’s security record

XShares
Audits1 audit by 1 firmLast audit Sep 2023, by CertiK.
Critical findingsNo open critical findingsIn that report, 1 critical finding was reported. It is marked fixed by the firm that reported it.
Open XShares’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