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

Gas Optimizations #162

Open
code423n4 opened this issue Jul 2, 2022 · 1 comment
Open

Gas Optimizations #162

code423n4 opened this issue Jul 2, 2022 · 1 comment
Labels
bug Something isn't working G (Gas Optimization)

Comments

@code423n4
Copy link
Contributor

  1. Value can be set as immutable

1.) File : Proposal-Store.sol Proposal-Store.sol

address private UniGovModAcct;
  1. sing short reason string can be used for saving more gas

Every reason string takes at least 32 bytes. Use short reason strings that fits in 32 bytes or it will become more expensive.

Tool Used

Manual Review

Occurances

main/contracts/NoteInterest.sol#L167 "only the admin may set the base rate"; -> change "only admin"
main/contracts/NoteInterest.sol#L180 "only the admin may set the adjuster coefficient" -> change "only admin"
main/contracts/NoteInterest.sol#L193 "only the admin may set the update frequency" -> change "only admin"
main/contracts/Stableswap/BaseV1-periphery.sol#L104 "BaseV1Router: IDENTICAL_ADDRESSES" -> change "ID" //Identical_Addresses
main/contracts/CNote.sol#L105 "Accountant has not been correctly supplied" -> change "ANCS" //Accountant not correct supplied
main/contracts/CNote.sol#L147 "TOKEN_TRANSFER_OUT_FAILED"
main/contracts/CNote.sol#L148 "cNote::doTransferOut: TransferOut Failed"
main/contracts/Treasury/TreasuryDelegator.sol#L31 "GovernorBravoDelegator::setImplementation: admin only" -> change "only admin"
main/contracts/Treasury/TreasuryDelegator.sol#L32 "GovernorBravoDelegator::setImplementation: invalid implementation address" -> "inv_addr"
@code423n4 code423n4 added bug Something isn't working G (Gas Optimization) labels Jul 2, 2022
code423n4 added a commit that referenced this issue Jul 2, 2022
@GalloDaSballo
Copy link
Collaborator

2.1k from immutable, rest is negligible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working G (Gas Optimization)
Projects
None yet
Development

No branches or pull requests

2 participants