Protective mechanisms
There a few mechanisms in place to mitigate risks for the users and Boros' system.
OI Cap
- There is a hard cap on the OI of any market
- To get the value from market API:
- OI Cap =
hardOICap/1e18
- OI Cap =
Closing Only Mode
- When the market dynamics becomes too extreme (for example, abnormally high price volatility or low liquidity), the Closing Only Mode will be automatically turned on
- When Closing Only Mode is on, users will only be able to close existing positions (and not open new positions)
Max Rate Deviation
- The system disallows any market trade that happens at a rate too far away from the current mark rate.
- If a trade exceeds this limit, an error “Executed Rate Out of Range” will be displayed on the UI
- The exact requirement is as follows:
maxRateDeviationFactor=maxRateDeviationFactorBase1e4/1e4- where
maxRateDeviationFactorBase1e4is from the market API
- where
Max Bounds on Limit Order rates
- When placing a limit order, a user can’t long at a rate too high above the mark rate, or short at a rate too low below the mark rate.
- The exact mechanics is this:
- A long order rate must not exceed fu
- A short order rate must not be lower than fl
- To get the variables from the values returned from market API:
upperLimitSlope=loUpperSlopeBase1e4/ 1e4upperLimitConstant=loUpperConstBase1e4/ 1e4lowerLimitSlope=loLowerSlopeBase1e4/ 1e4lowerLimitConstant=loLowerConstBase1e4/ 1e4