Pool fees can be set to be greater than 100%
TomAFrench opened this issue · comments
Here we treat _state.fee
as if it were bounded above by 10000
.
portfolio/contracts/Portfolio.sol
Lines 376 to 377 in ef7d189
When creating a pool however, you can set its fee/priority fee to an arbitrary uint16
, i.e. fee <= 65535
.
portfolio/contracts/Portfolio.sol
Lines 526 to 536 in ef7d189
You can trace this up to the external function multiprocess
with no input validation on it. It's then possible to create pools with fees in excess of 100% which will then revert on any swap.
Ah, I see we do this after the fact here.