Hunt prep
Before you test SKALE contest
What 13 disclosed reports say about SKALE contest: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing
Not written yet for this program. The numbers below are up to date.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Access control lesson | 5 | 0 | – | – | $0 |
| Business logic lesson | 5 | 0 | – | – | $0 |
| Smart contracts lesson | 3 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Reentrancy in MessageProxyForSchain leads to replay attacks
The issue was fixed by adding a messageInProgressLocker modifier to postIncomingMessages, as was already done in MessageProxyForMainnet.
Disclosed
-
When transferring tokens native on SKALE to Ethereum with TokenManagerERC20.exitToMainERC20() , the tokens on the schain will be frozen on TokenManagerERC20 , but they will not receive tokens on Ethereum
The issue was mitigated by adding a check that prevents sending native SKALE tokens to mainnet.
Disclosed
-
TokenManagerERC20.sol uses transferFrom() instead of safeTransferFrom()
Use OpenZeppelin's SafeERC20 safeTransfer and safeTransferFrom functions, which handle the return value check and non-standard tokens.
Disclosed
-
transferredAmount on mainnet can be drained if a malicious account can mint more tokens on Schain
Minting on the Schain token should be restricted so it can only happen through the bridge, for example by using an immutable minter address instead of a role.
Disclosed
-
NFT owner can change token URI
The owner of an NFT should not be allowed to change its token URI.
Disclosed
-
Loss of pending messages (if any) in case removeConnectedChain is called
The report recommends checking for pending messages and reverting if any exist, or implementing a local pause before removal; the project acknowledges the issue and work is pending.
Disclosed
-
Gas pricing can be used to extort funds from users of SChain owner
The refund should use a gas price oracle rather than tx.gasprice, or a maximum gas price should be set with incentives for nodes to submit below it; the report states the issue was resolved via a pull request.
Disclosed
-
Transactions can be replayed when a connectedChain is removed and then reconnected
The recommendation is to keep the counters unchanged when removing and reconnecting a chain, only toggling the inited flag instead of deleting or resetting the counters.
Disclosed
-
Centralisation risk: admin role of TokenManagerEth can rug pull all Eth from the bridge
The function setEthErc20Address should be removed because ethErc20 is set during initialisation and does not need to change.
Disclosed
-
Schain owners can rug pull users’ funds
Add a long time lock for killing so users have plenty of time to get their funds out before a kill.
Disclosed
-
Not compatible with Rebasing/Deflationary/Inflationary tokens
The contract should be updated to check the vault balance before and after transfers to account for fees or interest, or such tokens should be rejected.
Disclosed
-
BURNER_ROLE can burn any amount of EthErc20 from an arbitrary address
The forceBurn function should be changed so that only the owner can burn their own tokens.
Disclosed
-
S2S Transfer from the origin schain to another schain with automatic deploy disabled can cause funds to be frozen
The report recommends caching the target schain's automaticDeploy setting and only allowing S2S transfers when it is enabled, plus a 24-hour timelock before disabling it; the project acknowledged the issue and assigned work on the roadmap.
Disclosed