Hunt prep
Before you test Canto
What 66 disclosed reports say about Canto: 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 15
Ideas drawn from this program's disclosed reports and our class lessons. None of them is a known bug: each is a place to look, and the reports linked under it are why. Check the current scope before testing anything.
-
1
Check other modules for unregistered message servers
Business logic Read the lesson
Report 57949 showed the govshuttle module never registered its MsgServer, so governance messages silently failed. Audit every other Canto module's RegisterServices to confirm each registers both query and message servers, and test that a proposal carrying each message type actually executes.
From the lessons: Initialise and setup functions on newly deployed contracts.
-
2
Verify amino.name tags across all Canto message types
Business logic Read the lesson
Report 57950 found mismatched amino.name tags broke LegacyAmino signing for several messages. Extend the same generative test to every Canto-specific message type and check that the registered concrete names match the proto tags, since one mismatch was already found and siblings may share the flaw.
From the lessons: Initialise and setup functions on newly deployed contracts.
-
3
Check signer annotations on all custom messages
Business logic Read the lesson
Report 57948 showed MsgSwapOrder lacked a signer annotation so it never worked on Canto nodes. Review every custom message in the Canto modules for a missing or wrong signer option and test that each can actually be signed and routed.
From the lessons: Initialise and setup functions on newly deployed contracts.
-
4
Probe coinswap and onboarding balance loops for gas exhaustion
Report 57947 showed a pool balance function iterating over all denominations, letting an attacker inflate gas by sending many tokens. Look for the same unbounded iteration pattern in other balance or escrow reads in the coinswap and onboarding modules and test with many denominations.
-
5
Test whitelist removal paths for stranded backing funds
Business logic Read the lesson
Report 58193 showed delisting a USDC version stranded withdrawals. Exercise the whitelist and version-management logic in the ASD contracts to see whether removing or changing an entry leaves holders unable to redeem, and whether remaining holders can drain the other version.
From the lessons: Vault deposit, withdraw and redeem functions across yield and staking...
-
6
Audit router approval and refund handling
Business logic Read the lesson
Reports 58192 and 58189 showed the ASDRouter missed an approve call and failed to refund excess native tokens. Review every external call in the router for missing approvals and every payable path for unrefunded surplus, testing the compose and redemption flows end to end.
Backed byASDRouter didn’t call ASDUSDC.approve() to to grant permission f... (2024) Native gas tokens can become stuck in ASDRouter contract (2024)From the lessons: Token transfer and approval helpers in vaults and strategies.; Cross chain routers, settlement handlers and bridge transfers.
-
7
Check hardcoded token addresses for redeploy breakage
Leaked secrets Read the lesson
Report 58191 showed the router cached the NOTE address at deployment, breaking if NOTE is redeployed. Search the Canto contracts for other cached or hardcoded token and contract addresses and check whether they are read dynamically where the underlying can change.
Backed byasdRouter.sol is at risk of DOS due to vulnerable implementation... (2024) Comptroller uses the wrong address for the WETH contract (2022)From the lessons: Check that addresses and constants baked into contract code match the...
-
8
Re-test reward accumulator precision and epoch maths
Business logic Read the lesson
Reports 58434, 58433 and 58432 found precision loss and an epoch boundary error in update_market. Re-examine the reward-per-share accumulators and epoch calculations for division-before-multiplication and boundary conditions, testing near epoch edges and with typical market supplies.
Backed byLoss of precission when calculating the accumulated CANTO per sh... (2024) secRewardsPerShare Insufficient precision (2024) update_market() nextEpoch calculation incorrect (2024)+1 more report
From the lessons: Reward accumulation updates in staking and vault contracts.
-
9
Test reward checkpoint ordering on repeat buys
Business logic Read the lesson
Report 58588 showed buying more of a held share discarded the buyer's pending reward because the checkpoint was set after the fee split. Test the buy and sell paths in the Market contract for other ordering issues where accumulators update before a user's checkpoint is read.
From the lessons: Reward accumulation updates in staking and vault contracts.
-
10
Look for missing slippage bounds in Market and swap paths
Business logic Read the lesson
Report 58587 found buy and sell lacked slippage protection. Check every swap, deposit and liquidity path in the Canto contracts for a user-supplied minimum output that is actually enforced, and whether any parameter is accepted but unused.
From the lessons: Check whether every swap, deposit or mint path enforces a user-supplie...; Swap with an incorrect slippage value and check whether the swap can b...
-
11
Probe liquidity mining tick tracking for unbounded growth
Report 58688 showed tickTracking_ could be inflated by tiny swaps across a boundary, bricking mint and burn. Test the same accrual loop with repeated boundary crossings and check the related boundary conditions in reports 58692 and 58690 for lost or under-accrued rewards.
Backed byArray Length of tickTracking_ can be purposely increased to Bric... (2023) Accrued liquidity can be lost and never be recovered for a given... (2023) If dt is not updated accurately, timeWeightedWeeklyPositionInRan... (2023)From the lessons: Reward accumulation updates in staking and vault contracts.
-
12
Check reward-setting functions verify native token transfer
Business logic Read the lesson
Report 58689 showed setConcRewards and setAmbRewards did not require matching native tokens, letting the owner draw on DEX funds. Test the reward-setting entry points and the payable modifiers on the command path (report 58691) to confirm value is actually received and accounted for.
Backed byThe Liquidity mining callpath sidecar owner can pull native toke... (2023) Rewards cannot be transferred when calling protocol command (2023)From the lessons: Yield distribution and reward treasury contracts.
-
13
Test oracle staleness and error handling after downtime
Business logic Read the lesson
Reports 60141 and 60140 showed the TWAP oracle ignores time since last observation and reverts instead of returning zero. Exercise the oracle after simulated downtime and on error paths, and check whether consumers handle a stale or reverting price safely.
Backed bySystem is Vulnerable to Downtime and has no Checks for it (2023) getUnderlyingPrice() should return 0 when errored (2023) Oracle may be attacked if an attacker can pump the tokens for th... (2022)From the lessons: Check whether the oracle can return a stale price or a deprecated pool...
-
14
Check factory period size applies to new pairs
Business logic Read the lesson
Report 60139 showed setPeriodSize only updated existing pairs, leaving new pairs on the default. Test the factory configuration flow to confirm new pairs inherit current settings, and check the unbounded allPairs loop in report 60136 for gas exhaustion.
From the lessons: Initialise and setup functions on newly deployed contracts.
-
15
Test stablecoin identification by address not symbol
Business logic Read the lesson
Report 60138 showed the oracle identifies stablecoins by symbol, allowing impersonation. Check whether other price and reserve calculations rely on symbols or decimals rather than addresses, and test with tokens of unusual decimals as in reports 60137 and 60371.
Backed byHackers can deploy token with respective name as the stable one... (2023) Calculated token0TVL may be zero under certain scenarios (2023) Wrong reserves calculated for non-19 decimals points tokens (2022)From the lessons: Price feeds, pool share weights and Curve or Balancer pool oracles use...
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Business logic lesson | 32 | 0 | – | – | $0 |
| Access control lesson | 10 | 0 | – | – | $0 |
| DoS lesson | 7 | 0 | – | – | $0 |
| Smart contracts lesson | 7 | 0 | – | – | $0 |
| Crypto lesson | 2 | 0 | – | – | $0 |
| Leaked secrets lesson | 1 | 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.
-
Incorrect names provided in RegisterConcrete calls break LegacyAmino signing method
The RegisterConcrete calls should be fixed to match the amino.name flags of all the affected messages; the team confirmed they will patch this before the v0.50 production release.
Disclosed
-
Govshuttle module does not register its transaction MsgServer
The module should register its message server in the RegisterServices function, and the project confirmed they will patch it before the v0.50 production release.
Disclosed
-
An attacker can DoS a coinswap pool
The fix changes GetPoolBalances to query only the standard coin, counterparty coin, and pool coin balances instead of all balances.
Disclosed
-
MsgSwapOrder will never work for Canto nodes
The sponsor said they will patch it before the v0.50 production release, for example by registering a custom signer resolver for the coinswap Input message.
Disclosed
-
Removing token from the whitelist may cause DoS due to limited USDC amount
The require block was removed from the withdraw function, as confirmed by the project's linked pull request.
Disclosed
-
asdRouter.sol is at risk of DOS due to vulnerable implementation of NOTE address
The router should store the cNOTE address and read the NOTE address through CNote.underlying() instead of caching it; the text links a pull request but does not state it was merged.
Disclosed
-
ASDRouter didn’t call ASDUSDC.approve() to to grant permission for crocSwapAddress to spend their ASDUSDC
The router should approve crocSwapAddress to spend ASDUSDC, for example by setting a maximum allowance in the constructor.
Disclosed
-
update_market() nextEpoch calculation incorrect
The fix is to change the nextEpoch calculation to use epoch + BLOCK_EPOCH instead of i + BLOCK_EPOCH.
Disclosed
-
Loss of precission when calculating the accumulated CANTO per share
The update_market function should be changed to multiply before dividing to avoid precision loss.
Disclosed
-
update_market() market weight incorrect
The fix is to use time (seconds) instead of block numbers for the epoch, as confirmed by the project.
Disclosed
-
secRewardsPerShare Insufficient precision
The precision should be increased by using a scaling factor of 1e27 instead of 1e18.
Disclosed
-
No slippage protection for Market functions
The protocol introduced parameters to allow users to specify slippage protection.
Disclosed
-
Users will lose rewards when buying new tokens if they already own some tokens
The order was changed so fees are split before the buyer's pending rewards are read, and the sponsor states it was fixed.
Disclosed
-
If dt is not updated accurately, timeWeightedWeeklyPositionInRangeConcLiquidity_ might be updated incorrectly
The code should be fixed by setting `dt = tickActiveEnd - time` in the `if` block (as suggested by the developer) or by updating `dt` in the `else` block as the warden proposed.
Disclosed
-
The Liquidity mining callpath sidecar owner can pull native tokens from the Dex
The functions should require that the total reward amount equals msg.value, as shown in the recommended mitigation.
Disclosed