mycelium-ethereum / perpetual-pools-contracts

Repo for Tracer Pool Swaps Protocol
26 stars 13 forks source link

Cap changeInterval at 100% #456

Closed CalabashSquash closed 2 years ago

CalabashSquash commented 2 years ago

Motivation

The theoretical largest change in mintingFee that could happen in a single update interval is by 100% (either moving from 100% minting fee to 0%, or vise-versa). Therefore, we can set the maximum PoolCommitter::changeInterval to be 100%.

This also eliminates possibilities of changeInterval being so large that arithmetic overflows.

Changes