Platform: Code4rena
Start Date: 21/08/2023
Pot Size: $125,000 USDC
Total HM: 26
Participants: 189
Period: 16 days
Judge: GalloDaSballo
Total Solo HM: 3
Id: 278
League: ETH
Rank: 73/189
Findings: 2
Award: $142.58
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: LokiThe5th
Also found by: 0xPsuedoPandit, 0xTiwa, 0xnev, 0xvj, Evo, Jiamin, Juntao, QiuhaoLi, T1MOH, Udsen, circlelooper, crunch, eeshenggoh, gjaldon, hals, josephdara, kutugu, minhtrng, niki, umarkhatab_465
96.3292 USDC - $96.33
Always returning true even if the DpxethPrice is price is not above the upper peg
the Dpxeth is 18 decimals
Manual
Decimal
#0 - c4-pre-sort
2023-09-09T05:24:51Z
bytes032 marked the issue as duplicate of #549
#1 - c4-pre-sort
2023-09-12T05:19:53Z
bytes032 marked the issue as sufficient quality report
#2 - c4-judge
2023-10-20T18:27:47Z
GalloDaSballo marked the issue as satisfactory
#3 - c4-judge
2023-10-20T18:28:21Z
GalloDaSballo changed the severity to 3 (High Risk)
🌟 Selected for report: 0xWagmi
Also found by: 836541, Bauchibred, GangsOfBrahmin, Hama, IceBear, Inspecktor, Matin, MohammedRizwan, catellatech, erebus, lsaudit, niki, okolicodes, ravikiranweb3, tapir, vangrim, zaevlad
46.2486 USDC - $46.25
https://github.com/code-423n4/2023-08-dopex/blob/eb4d4a201b3a75dd4bddc74a34e9c42c71d0d12f/contracts/perp-vault/PerpetualAtlanticVaultLP.sol#L282-L285 https://github.com/code-423n4/2023-08-dopex/blob/eb4d4a201b3a75dd4bddc74a34e9c42c71d0d12f/contracts/perp-vault/PerpetualAtlanticVaultLP.sol#L118-L124
First depositor can break minting of shares
Upon first deposit, the supply will be 0. The attacker will transact with an amount = 1 wei to mint 1 wei of shares. Then the attacker will transfer some value of asset directly to the contract. For this example, the attacker transfers 10,000 tokens.
Next, a subsequent depositor attempts to mint shares with 5,000 tokens.
shares = 5000 tokens * 1 wei / 10,000 tokens = 0 due to precision loss.
it will return 0 the converToShares and it it will revert the function
The function will revert every time, except if the second depositor deposit more than the transferred tokens that first depositor transfer to the contract
Manual
Mint a certain number of shares and transfer them to address(0) within the constructor.
Token-Transfer
#0 - c4-pre-sort
2023-09-07T13:33:36Z
bytes032 marked the issue as duplicate of #863
#1 - c4-pre-sort
2023-09-11T09:10:41Z
bytes032 marked the issue as sufficient quality report
#2 - c4-judge
2023-10-18T12:41:47Z
GalloDaSballo changed the severity to 2 (Med Risk)
#3 - c4-judge
2023-10-18T12:53:35Z
GalloDaSballo marked the issue as satisfactory