code-423n4 / 2021-08-floatcapital-findings

0 stars 0 forks source link

LongShort.sol & YieldManagerAave.sol: Verify / derive input arguments #56

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

hickuphh3

Vulnerability details

Impact

The following are assumed to be the case when YieldManagerAave is deployed:

Similarly, it is also assumed that the _yieldManager's paymentToken is equal to the input _paymentToken in LongShort#createNewSyntheticMarket()

In the scenario any of the assumptions above do not hold true, attempts to initialize the market should fail.

Nevertheless, potential mistakes can be avoided by spending a bit of gas to perform verification of some (or all) of the assumptions made above.

Recommended Mitigation Steps

DenhamPreen commented 3 years ago

Non-critical but valuable feedback 🙌