Spheron V1

Spheron V1 Smart Contract Audit Report

Share
Share
EVMEVM
DePINEscrow
EVMEVM
DePINEscrow

QuillAudits audited the Spheron V1 smart contracts on EVM between Oct 11, 2024 and Nov 21, 2024. The audit found 13 issues: 6 medium, 4 low, 3 informational, of which 0 resolved and 13 acknowledged.

Project Description

Spheron Network is a decentralized compute platform designed to connect GPU providers with developers and businesses in need of computational resources.

Timeline

S1
Oct 11, 2024
IA
Nov 21, 2024
S2
Nov 21, 2024

Scope of Audit

The Scope of the Audit was to analyse the Code security,Quality and correctness of Spheron Contracts.

Methodology: the QuillAudits smart contract audit process.

speedometer
0
50%
60%
70%
90%
100%
96.6%
AUDIT SCORE
icon

High

Medium

Low

Informational

open0000
acknowledged0643
partially resolved0000
resolved0000
Spheron V1

Spheron V1

Medium Severity Issues

Fee on Transfer Tokens doesn't work with Escrow.sol

Acknowledged
arrow-right
Description

Some tokens have a fee on transfer, for example USDT. Usually such fee is not enabled but could be re-enabled at any time.
With this fee enabled the deposit() and withdraw() function would receive slightly less tokens than the amounts requested in the function parameter. This will create an accounting problem, as the whole amount variable gets added in unlock Tokens mapping but actually it will receive slightly less tokens than amount.
So in mapping it should add the actual received amount.
As main functionality is dependent on Lock and Unlock Tokens this should be handled correctly

Recommendation

Check the balanceOf() tokens before and after a safeTransfer() or safeTransferFrom().Use the difference as the amount of tokens sent/received.

Malicious Admin can steal away provider earnings

Acknowledged
arrow-right
Description

Malicious Admin can steal away provider earnings Whenever provider or user calls closeLease(), malicious admin can frontrun this transaction and increase the protocolPerc to a very high value such that the very major part of tokens as fees.
Now as protocolPerc has been set to almost 99% usingsetProviderFeePercentage() So provider would get very less amount of tokens as earnings and other major amount (99%) goes as fees to protocol.
Here providerAmount would be only 1% of total amount and protocolFee would 99% of total amount.

Contract

https://github.com/spheronFdn/protocol-contracts/blob/main/contracts/compute/Compute

Recommendation

There should be a max cap above which admin can't set the fees above that threshold.

Malicious User would pay less tokens to provider under certain conditions

Acknowledged
arrow-right
Description

Malicious User would pay less tokens even if he has used the service provider by provider more than the specified time in the order.
Lets understand using an example:
1. There is a matched order between user and provider and the conditions are `order.numOfBlocks   = 100` and `acceptedPrice = 1e18`
2. Let's say after passing of 200 blocks the provider calls `closeLease()` to close the lease.
3. As user has used the service for 200 blocks he should pay tokens for 200 blocks.
4. But user would only pay the tokens for 100 blocks of service.
5. So it would be loss to provider as he will not receive tokens for remaining 100 blocks.
6. According to our example loss of 100e18 to provider

Contract

https://github.com/spheronFdn/protocol-contracts/blob/main/contracts/compute/Compute

Recommendation

Provider should get tokens according to total time the service used by user and not according to numOfBlocks in order

No pause state checked during withdrawProviderEarnings(),withdrawFizzN odeEarnings() and withdrawProtocolFees

Acknowledged
arrow-right
Description

There is no check while calling withdrawProviderEarnings() , withdrawFizzNodeEarnings() and with drawProtocolFees that the withdrawls are in pause state or not.If pauseWithdrawal has been set to true there should be no withdrawals from the protocol.But by calling withdrawProviderEarnings() , withdrawFizzNodeEarnings() and withdrawProtocolFees they can withdraw funds even though the pauseWithdrawal has been set to true.It breaks the core functionality of the protocol

Recommendation

The above two functions should have a check like :
require(!pauseWithdrawal, "Withdrawal is paused");

-The above check is important to halt every type of withdrawal when the withdrawals are paused.

Provider would not able to withdraw earnings if providerRewardWallet is contract addresss

Acknowledged
arrow-right
Description

Provider would not be able to claim earnings if providerRewardWallet is set as contract address.Let's suppose a provider has added himself into registry and has set providerRewardWallet to contract address where he wants the fund.
Now when he wants to claim his earnings via Escrow.withdrawProviderEarnings() he would not be able to claim due to the below check require(msg.sender == providerRewardWallet, "Not Provider Reward Wallet"); So due to above check the provider would not be able to claim as contract address doesn't have withdrawProviderEarnings function selector and whenever the provider calls withdrawProviderEarn ings() from his address it would revert due to above condition. "Not Provider Reward Wallet"

Contract

https://github.com/spheronFdn/protocol-contracts/blob/main/contracts/payment/Es

Recommendation

One of the solution is to check the providerRewardWallet is not set as contract address. Another solution is allow only provider to withdraw his earnings and make an extra argument in withdraw ProviderEarnings() at which address he to wants to receive his earnings.

createLease() & closeAndRenewLease() would fail whenever it get’s called

Acknowledged
arrow-right
Description

Taking Example of createLease()(same applies for closeAndRenewLease)
- Whenever createLease() gets called the function would throw error.
- createLease() gets called from Bid.sol::matchOrder().
- In createLease() there is a onlyBidContract() modifier which passes as msg.sender is Bid
contract. Inside createLease(),escrow.lockToken() gets called :
escrow.lockTokens(order.creator, order.token, _toPrecision(leaseCostPlusFee, token.decimals));- lockTokens() contains a onlyRole(DEFAULT_ADMIN_ROLE) which means only admin can call
this function but in our case msg.sender would be computeLease contract address so
lockTokens() function will fail due to the
onlyRole(DEFAULT_ADMIN_ROLE) modifier.

Contract

https://github.com/spheronFdn/protocol-contracts/blob/main/contracts/compute/

Recommendation

Should check that who originated the transaction instead of checking msg.sender in modifier

Low Severity Issues

Informational Issues

Appendix

Disclaimer

Spheron V1

Spheron V1

Medium Severity Issues
Low Severity Issues
Informational Issues
Appendix
Disclaimer
View Report PDF

Get an Audit done today for your Smart Contract

Join 1500+ leaders who secured themselves from losing Billion Dollars

cta-banner
cta-banner-bgcta-banner-bg-mobile

Related audits

WE SECURE EVERYTHING YOU BUILD.

From day-zero risk mapping to exchange-ready audits, QuillAudits helps projects grow with confidence. Smart contracts, dApps, infrastructure, compliance: secured end to end.

QuillAudits Logo


ISO 27001Circle Alliance Program
Uniswap FoundationAethiropt-collectivePolygon SPNBNB Chain Kickstart

All Rights Reserved. © 2026. QuillAudits - LLC