Submitted by immeas
https://github.com/code-423n4/2022-08-olympus/blob/main/src/modules/TRSRY.sol#L60
I am bordering between this being medium and low, but since this is, granted under very unlikely circumstances, hindering intended transfers to work I am submitting it as medium. That said, I dont think this scenario is very likely since it requires a trusted contract not part of initial release(? no contract in repo used a loan) to take a large loan from TRSRY.
This will cause test to fail on TRANSFER_FAILED due to TRSRY not having the tokens to transfer but getReserveBalance says it has, since capacity is determined based on non-existing tokens.
Same is applicable for low market bonds since they are created based on the same capacity.
vs code + tests
Determine capacity from actual tokens held by treasury.
ind-igo (Olympus) confirmed and commented:
