Platform: Code4rena
Start Date: 22/03/2024
End Date: 05/04/2024
Period: 14 days
Status: Completed
Pot Size: $36,500 USDC
Participants: 17
Reporter: thebrittfactor
Judge: Lambda
Id: 323
League: POLKADOT
carrotsmuggler | 1/17 | $8,470.73 | 4 | 2 | 0 | 2 | 0 | 0 | 0 | 0 |
ZanyBonzy | 2/17 | $4,955.72 | 4 | 1 | 0 | 1 | 0 | - | 0 | - |
zhaojie | 3/17 | $3,420.86 | 3 | 1 | 0 | 1 | 0 | - | 0 | 0 |
AM | 4/17 | $3,054.79 | 2 | 1 | 0 | 0 | 0 | - | 0 | 0 |
ihtishamsudo | 5/17 | $3,012.88 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
TheSchnilch | 6/17 | $1,175.02 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
Bauchibred | 7/17 | $946.78 | 3 | 0 | 0 | 1 | 0 | - | 0 | - |
djxploit | 8/17 | $908.39 | 2 | 0 | 0 | 2 | 0 | 0 | 0 | 0 |
Aymen0909 | 9/17 | $903.86 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
n4nika | 10/17 | $746.92 | 2 | 0 | 0 | 1 | 0 | - | 0 | 0 |
Auditor per page
Note for C4 wardens: Anything included in this Publicly Known Issues
section is considered a publicly known issue and is ineligible for awards.
No publicly known issues
The following substrate modules are used by Acala Network to implement staking and earning functionality and are in scope for this audit:
Incentives: Substrate module for staking LP tokens, keeping track of shares and incentives for staking pools.
Rewards: Used by the incentives module to calculate and distribute rewards to users.
Earning: Implements a bond/locked token system, which allows users to lock their tokens for a period of time.
Incentives: Each period, pools will accumulate incentives and rewards are distributed to them from RewardsSource. Each pool can receive multiple incentives. Users can claim rewards from the pool at any time. Deduction rate is configurable and is applied to the rewards when they are claimed. When a user adds liquidity to the pool, they receive shares, and withdrawn rewards are adjusted accordingly so the new user will start with no reward.
Rewards: This module contains the base methods for calculating and distributing rewards. It is used by the incentives module to calculate and distribute rewards to users.
Earning: Users will bond/lock their tokens for a period of time. Unbonding/unlocking is possible by paying a fee/penalty, or requesting to unbond/unlock and waiting for the unbonding period to finish before you can withdraw. The module implements a set of hooks that can be used by other modules (i.e. Incentives) to implement staking.
The following modules are out of scope for this audit. They are not used by the modules in scope and are not required for the functionality of the protocol. They are included in the repository to make it easier to run the tests.
- If you have a public code repo, please share it here: https://github.com/AcalaNetwork/Acala - How many contracts are in scope?: 3 - Total SLoC for these contracts?: 1135 - How many external imports are there?: 1 - How many separate interfaces and struct definitions are there for the contracts within scope?: 5 - Does most of your code generally use composition or inheritance?: Composition - How many external calls?: 0 - What is the overall line coverage percentage provided by your tests?: 85 - Is this an upgrade of an existing system?: No - Check all that apply (e.g. timelock, NFT, AMM, ERC20, rollups, etc.): ERC-20 Token, Non ERC-20 Token, Timelock function - Is there a need to understand a separate part of the codebase / get context in order to audit this part of the protocol?: No - Please describe required context: - Does it use an oracle?: No - Describe any novel or unique curve logic or mathematical models your code uses: - Is this either a fork of or an alternate implementation of another project?: Yes - Does it use a side-chain?: - Describe any specific areas you would like addressed:
Refer to this guide for detailed instructions to setup dev env.
Please ensure you working directory is ./src
cargo build
cargo test
Employees of Acala Foundation and employees' family members are ineligible to participate in this audit.