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

Feat/audit part6 #165

Merged
merged 4 commits into from
Sep 10, 2024
Merged

Feat/audit part6 #165

merged 4 commits into from
Sep 10, 2024

Conversation

chefburger
Copy link
Collaborator

No description provided.

@@ -23,11 +25,12 @@ abstract contract ProtocolFees is IProtocolFees, Owner {
/// @inheritdoc IProtocolFees
IVault public immutable vault;

uint256 private immutable controllerGasLimit;
// a percentage of the block.gaslimit denoted in basis points, used as the gas limit for fee controller calls
// 100 bps is 1%, at 30M gas, the limit is 300K
Copy link
Collaborator

Choose a reason for hiding this comment

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

(just comment) this mean likely 300k on eth, and 1mil gas on bsc chain

uint256 balance = currency.balanceOfSelf();
VaultReserve.setVaultReserve(currency, balance);
if (currency.isNative()) {
VaultReserve.setVaultReserve(CurrencyLibrary.NATIVE, 0);
Copy link
Collaborator

@ChefMist ChefMist Sep 9, 2024

Choose a reason for hiding this comment

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

i wonder if we can have a helper function so its clearer eg. VaultReserve.clearVaultReserve() or something

and within the helper function, we can document why its set currencyLibrary.Native and 0 amount

Copy link
Collaborator

Choose a reason for hiding this comment

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

if agreeable, we can create an issue to tackle in another PR (so it doesn't pollute this)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link

Choose a reason for hiding this comment

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

😎hello

ChefMist
ChefMist previously approved these changes Sep 9, 2024
@chefburger
Copy link
Collaborator Author

@ChefSnoopy Feel free to add any retrospective comments

@chefburger chefburger merged commit 857b4bf into main Sep 10, 2024
2 checks passed
@chefburger chefburger deleted the feat/audit-part6 branch September 10, 2024 01:58
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