In registerCollateralToken where msg.sender gives approve for wTokenContract and also for collateralTokenContract
_collateralTokenContract has a special function for increasing the allowance but wTokenContract doesnt have that.
When registerCollateralToken is registered. and people start calling _addLiquidity it does transfer collateralAmount to Diva which means diva uses the allowance. If too many people call addliquidity increasing the sent amount to Diva which means the allowance decreases. It can result in allowance dropping to 0 and not being able to addliquidity until somone calls removeLiquidity or redeemPositionToken
Medium
Manual Review
Add increase allowance for the wTokenContract
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.