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

Excess balance handling #27

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Excess balance handling #27

wants to merge 5 commits into from

Conversation

ephess
Copy link
Contributor

@ephess ephess commented Feb 26, 2024

No description provided.

@ephess ephess requested a review from thogard785 February 26, 2024 01:44
Copy link
Contributor

@jj1980a jj1980a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Copy link
Contributor

@BenSparksCode BenSparksCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as well!

I've just changed the VALIDATOR_SHARE_BASE and STAKE_RATIO constants to use uint256 instead of uint24. We save a little bit of gas this way because we don't need to convert to uint256 for the math, and there's also no benefit in using smaller vars as they each get stored in their own 32 bytes slots as constants anyway.

Changing to uint256 for those constants makes submitFlashBid and submitFlashBidWithRefund functions a little bit cheaper and makes the contract slightly smaller.

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.

3 participants