Platform: Code4rena
Start Date: 05/07/2023
Pot Size: $390,000 USDC
Total HM: 136
Participants: 132
Period: about 1 month
Judge: LSDan
Total Solo HM: 56
Id: 261
League: ETH
Rank: 98/132
Findings: 3
Award: $61.03
🌟 Selected for report: 0
🚀 Solo Findings: 0
58.8874 USDC - $58.89
ARBTriCryptoOracle is used to determine price of LP token of tricrypto (USDT, WBTC, WETH) on arbitrum. This pool is susceptible to re-entrancy due to bug in vyper 0.2.15.
and hence get_virtual_price
can be manipulated which is used for pricing LP tokens.
Arbitrum tricrypto allows to exchange/swap with native ETH as recepient
self.D
variable impacting calculation of get_virtual_price
in rest of the call contextManual Review
Use latest crvUSD tricrypto pool and wait for curve team to release oracle for that or use offchain oracle
Oracle
#0 - c4-pre-sort
2023-08-05T06:47:06Z
minhquanym marked the issue as duplicate of #704
#1 - c4-judge
2023-09-13T08:58:02Z
dmvt marked the issue as satisfactory
#2 - c4-judge
2023-09-20T20:12:27Z
dmvt changed the severity to 2 (Med Risk)
🌟 Selected for report: 0xWaitress
Also found by: Ack, BPZ, Breeje, LosPollosHermanos, Madalad, Nyx, Ruhum, SaeedAlipoor01988, ayeslick, c7e7eff, carrotsmuggler, cergyk, dirk_y, hack3r-0m, iglyx, kaden, kodyvim, kutugu, ladboy233, ltyu, mojito_auditor, n1punp, rvierdiiev, unsafesol, zzzitron
2.1417 USDC - $2.14
glpRewardRouter.mintAndStakeGlp(address(weth), wethAmount, 0, 0);
Here, minUSDG = 0 and minGlp = 0 means no slippage checks.
This can be sandwitched in certain conditions in which delta between min and max glp price is higher due to following factors:
However, there is mint and burn fee of 0.1% on GLP and hence in usual conditions, it would be rare perform profitable sandwitch.
Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.
Manual Review
Add one of min output amount in mintAndStakeGlp (ref: https://github.com/RageTrade/delta-neutral-gmx-vaults/blob/main/contracts/libraries/DnGmxJuniorVaultManager.sol#L288-L300 )
Oracle
#0 - c4-pre-sort
2023-08-06T03:23:24Z
minhquanym marked the issue as duplicate of #220
#1 - c4-judge
2023-09-19T11:41:45Z
dmvt marked the issue as duplicate of #245
#2 - c4-judge
2023-09-22T22:18:44Z
dmvt marked the issue as satisfactory