The AaaveDivaWrapper
emits an event and returns a variable for most of the functions, but most impportantly for this submission - removeLiquidity
and batchRemoveLiquidity
.
However, there are no event emissions nor return variable in addLiquidity
and batchAddLiquidity
.
Which is inconsistent with the rest of the contract.
IAaveDivaWrapper
does not have an event that corresponds to an event where a user adds liquidity - either in batchAddLiquidity
or addLiquidity
.
There are events that correspond to the remainder of actions that happen via AaveDivaWrapper
and AaveDivaWrapperCore
.
In fact, all event emissions are handled and emitted via AaveDivaWrapperCore
.
Here are the return variable declarations and event emissions for removeLiquidity
events. The same logic is used in batchRemoveLiquidity
- the event is emitted after each iteration, and the return variable _amountReturned
is stored in an array and returned as an array after all iterations.
However, the addLiquidity
and batchAddLiquidity
functions do not emit any event or return a value that symbolizes the amount of liquidity added.
When a user adds liquidity to a pool via AaveDivaWrapper
- neither a return variable symbolizing the amount of liquidity added nor an event emission of the add liquidity event will be done.
The function can follow the consistency of the rest of the contract if an event is emitted along with the addLiquidity
event and a return variable of amount
of liquidity added.
For batchAddLiquidity
, follow the logic of removeLiquidity
- storing the amount of liquidity added after each iteration in an array and return the array of amount
s after all iteration. In AaveDivaWrapperCore
- emit an event after each iteration, same flow as in batchRemoveLiquidity
.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.