Submitted by jonah1005, also found by cmichel and gpersoon
LongShort should not shares the same Yield Manager between different markets
The LongShort contract would not stop different markets from using the same yield manager contracts. Any extra aToken in the yield manager would be considered as market incentives in function distributeYieldForTreasuryAndReturnMarketAllocation. Thus, using the same yield manager for different markets would break the markets and allow users to withdraw fund that doesnt belong to them. YieldManagerAave.sol L179-L204
Given the fluency of programming skills the dev shows, I believe they wouldnt make this mistake on deployment. Still, I think theres space to improve in the YieldManagerAave contract. IMHO. As its tightly coupled with longshort contract and its market logic, a initialize market function in the yield manager seems more reasonable.
JasoonS (Float) confirmed:
DenhamPreen (Float) resolved:
