Platform: Code4rena
Start Date: 03/07/2023
Pot Size: $40,000 USDC
Total HM: 14
Participants: 74
Period: 7 days
Judge: alcueca
Total Solo HM: 9
Id: 259
League: ETH
Rank: 27/74
Findings: 2
Award: $70.62
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: 0xprinc
Also found by: 0x11singh99, 0xAnah, 0xWaitress, 0xkazim, 2997ms, 33audits, 404Notfound, 8olidity, CRIMSON-RAT-REACH, CyberPunks, DanielWang888, Deekshith99, Eeyore, Eurovickk, Inspecktor, JGcarv, John, Jorgect, Kaysoft, LosPollosHermanos, MohammedRizwan, Qeew, QiuhaoLi, Rolezn, TheSavageTeddy, Topmark, Trust, Udsen, a3yip6, alexzoid, bigtone, codegpt, erebus, fatherOfBlocks, ginlee, glcanvas, hunter_w3b, josephdara, kaveyjoe, kutugu, mahdirostami, max10afternoon, oakcobalt, peanuts, pfapostol, ptsanev, qpzm, radev_sw, ravikiranweb3, sces60107, seth_lawson, te_aut, twcctop, zhaojie, ziyou-
17.5208 USDC - $17.52
In Aquifer.sol in function boreWell
sue structure instead of bytes calldata immutableData
.
<br>
Better use structured parameter, for better integration, because it's complicated to understand
whole new protocol with assembler code to understand how to create new Well.
Better to create structure like:
struct WellInit { address [] tokens; address [] pumps; // ... and so on }
Please, fix Typos:
// Rerserve Increasing or staying the same.
-> reserve
<br>
Multi-block MEV resistence reserves
-> resistance
<br>
* recieves
s * b_i / S of each underlying token.
-> receives
#0 - c4-pre-sort
2023-07-13T14:46:00Z
141345 marked the issue as high quality report
#1 - c4-pre-sort
2023-07-14T05:51:21Z
141345 marked the issue as low quality report
#2 - c4-judge
2023-08-04T21:25:12Z
alcueca marked the issue as grade-a
53.0984 USDC - $53.10
During an audit I've compared Basin code with uniswap V2, because it has similar idea, and use similar approach. Yes, Basin has significant changes, but they have similar idea:
So, during audit I paid special attention to the exchange of tokens, the addition/deletion of liquidity and compliance with all invariants.
Manual review
From my point of view current architecture is well designed, because swap function uses transferFrom, this will be better for external services and libs to integrate. <br> Moreover authors thought about multiple swaps and created shift function.
Code is well documented and tested. A lot of controversial points are explained in the comments to the code.
There is no centralization risks because anyone can deploy any Well with any parameters.
Mechanism is similar to Uniswap V2.
lastSwapPrice
Pump or TWAP
Pump or any other service;In Systemic risk I can attribute the inability to continue trading if the reserve of one of the tokens becomes equal to 0, and this is possible, this may lead to the shutdown of the entire protocol. Agree it is better to be able to trade but with an incredibly bad price than to receive transaction revert.
30 hours
#0 - c4-pre-sort
2023-07-12T12:21:24Z
141345 marked the issue as high quality report
#1 - c4-sponsor
2023-08-03T20:30:45Z
publiuss marked the issue as sponsor acknowledged
#2 - c4-judge
2023-08-05T20:14:27Z
alcueca marked the issue as grade-b