CertiK reviewed Shentu Chain (Shentu - Restaking) on 7 Nov 2024: 6 findings, 0 critical; 5 marked fixed, 1 open.
Report hosted on skynet.certik.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 1 | 0 | 0 |
| Medium | 0 | 0 | 2 |
| Low | 0 | 0 | 3 |
Repository: - toolkit-restaking-service File: - toolkit-restaking-service/service/restake/restake.go The core logic of the `restake` function is to withdraw the staked assets and rewards from various validators at regular intervals, acting as the grantee, and then restake these withdrawn assets to generate additional returns. However, during this process, the `processRestake` function withdraws all staked assets using the `AuthzMsgWithdrawDelegatorReward` function, but when it restakes, it only delegates to the first validator in the `AllowValidatorAddrs` list. ```go =105 // Step 2: Redelegate the rewards amounts := cc.FilterCoinReceivedAmounts(txResp, grant.Granter) delegations := []stakingtypes.MsgDelegate{ { DelegatorAddress: grant.Granter, ValidatorAddress: grant.AllowValidatorAddrs[0], Amount: sdk.NewCoin(cc.Denom, sdk.NewInt(amounts)), }, } msgExec2 := cc.AuthzMsgDelegate(delegations) txHash, err = rs.handleTransaction(grant.Granter, msgExec2, priv, cc, clientCtx) ``` This `restake` logic is flawed. The correct approach is to record the staked assets received from different validators and restake them separately to ensure proper asset allocation across all specified validators. This incorrect restaking logic causes the originally distributed stakes across multiple validators to be concentrated into a single validator's address. This undoubtedly alters the user's staking strategy and could potentially lead to a loss in staking rewards.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (86)
1,044 projects reviewed · 1,375 reports · latest May 2025
See CertiK’s auditsSomething 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