Assets are not converted to shares when calculating fees #128
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-427
partial-50
Incomplete articulation of vulnerability; eligible for partial credit only (50%)
Lines of code
https://github.com/GenerationSoftware/pt-v5-vault/blob/b1deb5d494c25f885c34c83f014c8a855c5e2749/src/Vault.sol#L572-L576
Vulnerability details
Impact
Unable to calculate cost correctly
Proof of Concept
The call path to get the balance
_liquidatableBalanceOf->availableYieldBalance
analyze
Through availableYieldBalance, we know that what is returned is assert not shares
Through mintYieldFee, _increaseYieldFeeBalance we know that _yieldFeeTotalSupply is shares,and the parameter that _increaseYieldFeeBalance needs to pass is shares
So the assert is missing here and converted to shares
Tools Used
manual review
Recommended Mitigation Steps
Convert assert to shares by _convertToShares
Assessed type
Error
The text was updated successfully, but these errors were encountered: