Napier
Details
Scope
My Submission
Reward Amounts
Critical
-
$50,000 maximum payout
-
Payout shall not exceed 10% of funds at risk at time of submission
Severity Criteria
Critical Definition
-
Definite and significant loss of funds without limitations of external conditions
-
Definite and significant freezing of funds for >1 year without limitations of external conditions
General Notes
-
Sherlock’s Criteria for Issue Validity guide (used in Sherlock audit contests) can be a helpful resource for more context on out-of-scope issues, etc. but nothing in the guide should overrule the definitions above
-
A coded Proof of Concept (POC) with instructions to run the POC is required
-
If the protocol team has the ability to take measures (upgrade the contract, pause the contract, etc.) against an exploit, the potential damage is limited to a 1-hour exploit period before it is assumed that the protocol team takes measures to prevent further damage
Platform Rules
Please review the Sherlock Bug Bounty Platform Rules before submitting any vulnerability.
Known Issues and Acceptable Risks
General
-
We are aware that depositing tokens in advance into adapters can manipulate a parameter in events such as Issue . There shouldn't be any financial losses.
-
According to Invariant testing, balances in Tranche can be less than issuance fees in accounting in underlying assets in some cases (We found there may be a slight insolvency in some cases).
-
Cross-contract Reentrancy
-
Attack scenario: The current Tricrypto implementation exchange method with a callback, allowing an malicious user to reenter the Napier exchange method and let Tricrypto return manipulated value.
-
Solution: We think it’s impossible to fix this issue on our side. Curve team is working on new version of Tricrypto, which removes callback method that can cause kinds of reentrancy. We heard the new version is in audit stage. See here and here for more details. As a mitigation, only authorized caller can call NapierPool swap method.
-
Removing tons of liquidity at once and burning most of total supply.
-
Property: NapierPool.removeLiquidity shouldn't change proportion of reserves.
-
Issue: When a user burn most of total supply of LP token, proportion of reserves can change.
-
https://github.com/Napier-Lab/v1-pool/issues/80
-
https://github.com/napierfi/v1-pool/blob/1df5198c5844c7fab050b57f57289435aabcdf43/test/fuzz/pool/Liquidity.t.sol#L76
-
Solution: We haven’t found a solution but we think it wouldn’t cause critical issue. We want to make sure this wouldn’t be an security issue.
LST/LRT Integration
-
claimWithdraw functions on some adapters are a public function though the function may change vault share price, which may cause kinds of front running.
-
Redeeming vault share can be blocked (DoS) because of waiting period of LST/LRT withdrawal
-
swapETHForPT function on MetapoolRouter can't swap exact amount of token.
-
Some adapters don't support multiple requests for unstaking LST because some of protocols are not compatible with our code base. We implemented some functions to exit stake positions. Buffer may not fully mitigate the waiting period for unstaking. Kinds of DoS issues may be invalid.
Previous Audits
Additional Context
Chains in scope
- Ethereum
Expected tokens
-
Any Standard ERC-20 Token (no fee-on-transfer tokens & no Tokens with Hooks)
-
Lido & Frax Unstake NFTs (ERC-721)
Trusted integrations
-
LST and LRT protocols
-
Balancer finance flash loan and admins
-
Curve,TriCrypto and TwoCrypto
Trusted protocol roles
-
Protocol internal roles.
Permissioned function requirements
For LST Adapters
-
requestWithdrawal and requestWithdrwalAll
-
Restricted access if calling function cause a vault share price may change.
-
setRebalancer
-
Restricted access. Owner can call this function. Setting zero address is allowed.
-
Withdraw
-
Restricted access if calling function cause a vault share price may change.
-
Functions related to swap or swapper contract on adapter
-
Restricted access
-
SetTranche
-
Admin can set only once Tranche address
-
prefundedDeposit/prefundedRedeem
-
An authorized Tranche can call this function.
Offchain mechanisms and procedures
-
Tolen balances on adapters, available buffer on adapters and current buffer percentage is monitored.
-
There are bots to rebalance vaults when users run out of buffer.
Protocol Resources
Max Rewards
50,000 USDCStatus
Live since
Last updated
LIVE
Aug 20, 2024, 12:56 AM
Aug 20, 2024, 12:56 AM