Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow perp cap to be adjustable #317

Merged
merged 1 commit into from
Nov 9, 2023
Merged

Conversation

0xdomrom
Copy link
Contributor

@0xdomrom 0xdomrom commented Nov 9, 2023

Summary

Due to potential issues around max leverage and feed manipulation, it makes sense to make these bounds adjustable. The higher the leverage allowed, the tighter these bounds should be.

Also change the multiplicative property to be an absolute value of param * spot as the cap (*-1 for negative), rather than param / spot for the negative side

Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Merging #317 (902da7d) into master (f21f3e1) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #317   +/-   ##
=======================================
  Coverage   97.92%   97.93%           
=======================================
  Files          30       30           
  Lines        1496     1500    +4     
  Branches      274      275    +1     
=======================================
+ Hits         1465     1469    +4     
  Misses          3        3           
  Partials       28       28           
Files Coverage Δ
src/feeds/LyraSpotDiffFeed.sol 100.00% <100.00%> (ø)

@0xdomrom 0xdomrom merged commit 7152616 into master Nov 9, 2023
4 checks passed
@0xdomrom 0xdomrom deleted the feat/make-perp-caps-adjustable branch November 9, 2023 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants