-
Notifications
You must be signed in to change notification settings - Fork 3
feat/SolaceNative (WIP) #279
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
Open
leonardishere
wants to merge
63
commits into
main
Choose a base branch
from
feat/SolaceNative
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…iting lock contracts
… and ERC721EnhancedInitializable.sol bugs
… createLockSigned, increaseAmount, and increaseAmountSigned
…ding rate mechanic
…ding rate mechanic
…to GaugeController.sol
…ing premium charges
…te change during UnderwritingLockVoting.chargePremiums, added _tokenholders Enumerable set to GaugeController to avoid bug from assuming mass of uwe total supply sits in the underwriting locker
…nd avoiding 0->1 SSTORE penalty
…0x more gas-efficient implementation
…trange bug now appear in hardhat test when attempt to call UnderwritingLocker.withdraw
* write and test FluxMegaOracle.sol * write and test UnderwritingPool.sol * change variable names * deploy FluxMegaOracle and UnderwritingPool on goerli * add enumeration to tokens in FluxMegaOracle * potentially save some SSTOREs in UnderwritingPool * add calculateIssue, calculateRedeem, pause, and events to UWP * write UnderwritingEquity.sol * test UnderwritingEquity.sol * change UnderwritingPool valueOf methods * updates to comments * redeploy oracle, uwp, and uwe on goerli. deposit into uwe
* Created /native in contracts, and related insurance gauge and underwriting lock contracts * completed v1 of UnderwritingLocker.sol and IUnderwritingLocker.sol * completed first draft for UnderwritingLockVoter and related interface * completed first draft for GaugeController.sol and interface * save repo before update @openzeppelin/contracts dependency * fixed compilation bugs to point where notifying of ERC721Enhanced.sol and ERC721EnhancedInitializable.sol bugs * successful npx hardhat compile * replaced require statements with custom errors * manually linted gauge contract code * started writing unit test for UnderwriterLocker, done for createLock, createLockSigned, increaseAmount, and increaseAmountSigned * merged emergencywithdraw logic into withdraw for UnderwritingLocker.sol * to-do withdraw function tests for underwritingLocker.sol * did withdrawInPart unit test for UnderwritingLocker * completed unit tests for withdrawInPartMultiple() for UnderwritingLocker.sol * completed UnderwritingLocker.test.ts * completed setLockManagerMultiple test for UnderwritingLockVoting.sol * implemented withdraw burn mechanic into UnderwritingLocker.sol * completed UnderwritingLocker.test.ts with new withdrawal burn and funding rate mechanic * completed UnderwritingLocker.test.ts with new withdrawal burn and funding rate mechanic * added extra sanity checks for underwritinglocker.test.ts * added voting premium mechanic to UnderwritingLockVoting.sol * added voting premium mechanic to UnderwritingLockVoting.sol * completed more vote() function tests for UnderwritingLockVoting.sol * completed vote() tests for UnderwritingLockVoting.sol * save state before changing architecture to move processVotes() logic to GaugeController.sol * completed draft for moving processVotes() to GaugeController.sol * optimised assembly block for UnderwritingLockVoting.sol * optimised assembly block for GaugeController.sol * altered underwritinglocker to enable state variable change during voting premium charges * added chargePremium function to UnderwritingLocker to enable lock state change during UnderwritingLockVoting.chargePremiums, added _tokenholders Enumerable set to GaugeController to avoid bug from assuming mass of uwe total supply sits in the underwriting locker * fixed few more edge cases for voting and charging premiums * vote() and voteMultiple() integration tests working for UnderwritingLockVoting.sol * vote() and voteMultiple() integration tests working for UnderwritingLockVoting.sol * completed first draft for UnderwritingLockVoting.test.ts * completed first block for GaugeController.test.ts * started revamp to address => multiple votes scheme * refactored processGaugeWeights() function on UnderwritingLockVoting.sol * more refactoring on address => multiple votes scheme * more refactoring gauge contracts for unbounded loop DDOS resistance and avoiding 0->1 SSTORE penalty * rewrote UnderwritingLockVoting.test.ts to fit new contract * added more anti-ddos features, swapped out _sqrt implementation for 40x more gas-efficient implementation * further ddos tests for gauge voting system * started basic unit tests for GaugeController.test.ts * fixed commenting and completed basic unit test kit for GaugeController * fixed subtle indexing bug with saveupdatestate mechanism in GaugeController * did coverage tests for gauge contracts * increased unit test coverage % for vanity * did slither analysis && removed console logs * did aurora-testnet deploy script for gauge system * trivial linting changes * changed burn mechanism to call burn() instead of transfer to address(0x1) * added updated role to GaugeController & UnderwritingLockVoting, but strange bug now appear in hardhat test when attempt to call UnderwritingLocker.withdraw * fixed hardhat testing bug mentioned in previous commit * deploy on goerli Co-authored-by: Andrew Leonard <leonardishere@gmail.com>
* Created /native in contracts, and related insurance gauge and underwriting lock contracts * completed v1 of UnderwritingLocker.sol and IUnderwritingLocker.sol * completed first draft for UnderwritingLockVoter and related interface * completed first draft for GaugeController.sol and interface * save repo before update @openzeppelin/contracts dependency * fixed compilation bugs to point where notifying of ERC721Enhanced.sol and ERC721EnhancedInitializable.sol bugs * successful npx hardhat compile * replaced require statements with custom errors * manually linted gauge contract code * started writing unit test for UnderwriterLocker, done for createLock, createLockSigned, increaseAmount, and increaseAmountSigned * merged emergencywithdraw logic into withdraw for UnderwritingLocker.sol * to-do withdraw function tests for underwritingLocker.sol * did withdrawInPart unit test for UnderwritingLocker * completed unit tests for withdrawInPartMultiple() for UnderwritingLocker.sol * completed UnderwritingLocker.test.ts * completed setLockManagerMultiple test for UnderwritingLockVoting.sol * implemented withdraw burn mechanic into UnderwritingLocker.sol * completed UnderwritingLocker.test.ts with new withdrawal burn and funding rate mechanic * completed UnderwritingLocker.test.ts with new withdrawal burn and funding rate mechanic * added extra sanity checks for underwritinglocker.test.ts * added voting premium mechanic to UnderwritingLockVoting.sol * added voting premium mechanic to UnderwritingLockVoting.sol * completed more vote() function tests for UnderwritingLockVoting.sol * completed vote() tests for UnderwritingLockVoting.sol * save state before changing architecture to move processVotes() logic to GaugeController.sol * completed draft for moving processVotes() to GaugeController.sol * optimised assembly block for UnderwritingLockVoting.sol * optimised assembly block for GaugeController.sol * altered underwritinglocker to enable state variable change during voting premium charges * added chargePremium function to UnderwritingLocker to enable lock state change during UnderwritingLockVoting.chargePremiums, added _tokenholders Enumerable set to GaugeController to avoid bug from assuming mass of uwe total supply sits in the underwriting locker * fixed few more edge cases for voting and charging premiums * vote() and voteMultiple() integration tests working for UnderwritingLockVoting.sol * vote() and voteMultiple() integration tests working for UnderwritingLockVoting.sol * completed first draft for UnderwritingLockVoting.test.ts * completed first block for GaugeController.test.ts * write and test FluxMegaOracle.sol * write and test UnderwritingPool.sol * started revamp to address => multiple votes scheme * refactored processGaugeWeights() function on UnderwritingLockVoting.sol * more refactoring on address => multiple votes scheme * change variable names * more refactoring gauge contracts for unbounded loop DDOS resistance and avoiding 0->1 SSTORE penalty * rewrote UnderwritingLockVoting.test.ts to fit new contract * added more anti-ddos features, swapped out _sqrt implementation for 40x more gas-efficient implementation * deploy FluxMegaOracle and UnderwritingPool on goerli * further ddos tests for gauge voting system * started basic unit tests for GaugeController.test.ts * fixed commenting and completed basic unit test kit for GaugeController * fixed subtle indexing bug with saveupdatestate mechanism in GaugeController * did coverage tests for gauge contracts * increased unit test coverage % for vanity * did slither analysis && removed console logs * did aurora-testnet deploy script for gauge system * trivial linting changes * add enumeration to tokens in FluxMegaOracle * potentially save some SSTOREs in UnderwritingPool * add calculateIssue, calculateRedeem, pause, and events to UWP * write UnderwritingEquity.sol * test UnderwritingEquity.sol * change UnderwritingPool valueOf methods * updates to comments * redeploy oracle, uwp, and uwe on goerli. deposit into uwe * start DepositHelper.sol * remove voting from DepositHelper.sol * changed burn mechanism to call burn() instead of transfer to address(0x1) * added updated role to GaugeController & UnderwritingLockVoting, but strange bug now appear in hardhat test when attempt to call UnderwritingLocker.withdraw * fixed hardhat testing bug mentioned in previous commit * deploy on goerli * test DepositHelper.sol and deploy on goerli * reverted @OpenZeppelin dependencies to ~4.3.2 * fix some tests * cleanup contracts. rename utils to avoid collision * create SolaceMegaOracle.sol * redeploy on goerli * added getVotingDelegators function to UnderwritingLockVoting * added voteForMultipleVoters and removeVotesForMultipleVoters functions Co-authored-by: kyzooghost <jeffersonzjtang@gmail.com>
* Created /native in contracts, and related insurance gauge and underwriting lock contracts * completed v1 of UnderwritingLocker.sol and IUnderwritingLocker.sol * completed first draft for UnderwritingLockVoter and related interface * completed first draft for GaugeController.sol and interface * save repo before update @openzeppelin/contracts dependency * fixed compilation bugs to point where notifying of ERC721Enhanced.sol and ERC721EnhancedInitializable.sol bugs * successful npx hardhat compile * replaced require statements with custom errors * manually linted gauge contract code * started writing unit test for UnderwriterLocker, done for createLock, createLockSigned, increaseAmount, and increaseAmountSigned * merged emergencywithdraw logic into withdraw for UnderwritingLocker.sol * to-do withdraw function tests for underwritingLocker.sol * did withdrawInPart unit test for UnderwritingLocker * completed unit tests for withdrawInPartMultiple() for UnderwritingLocker.sol * completed UnderwritingLocker.test.ts * completed setLockManagerMultiple test for UnderwritingLockVoting.sol * implemented withdraw burn mechanic into UnderwritingLocker.sol * completed UnderwritingLocker.test.ts with new withdrawal burn and funding rate mechanic * completed UnderwritingLocker.test.ts with new withdrawal burn and funding rate mechanic * added extra sanity checks for underwritinglocker.test.ts * added voting premium mechanic to UnderwritingLockVoting.sol * added voting premium mechanic to UnderwritingLockVoting.sol * completed more vote() function tests for UnderwritingLockVoting.sol * completed vote() tests for UnderwritingLockVoting.sol * save state before changing architecture to move processVotes() logic to GaugeController.sol * completed draft for moving processVotes() to GaugeController.sol * optimised assembly block for UnderwritingLockVoting.sol * optimised assembly block for GaugeController.sol * altered underwritinglocker to enable state variable change during voting premium charges * added chargePremium function to UnderwritingLocker to enable lock state change during UnderwritingLockVoting.chargePremiums, added _tokenholders Enumerable set to GaugeController to avoid bug from assuming mass of uwe total supply sits in the underwriting locker * fixed few more edge cases for voting and charging premiums * vote() and voteMultiple() integration tests working for UnderwritingLockVoting.sol * vote() and voteMultiple() integration tests working for UnderwritingLockVoting.sol * completed first draft for UnderwritingLockVoting.test.ts * completed first block for GaugeController.test.ts * write and test FluxMegaOracle.sol * write and test UnderwritingPool.sol * started revamp to address => multiple votes scheme * refactored processGaugeWeights() function on UnderwritingLockVoting.sol * more refactoring on address => multiple votes scheme * change variable names * more refactoring gauge contracts for unbounded loop DDOS resistance and avoiding 0->1 SSTORE penalty * rewrote UnderwritingLockVoting.test.ts to fit new contract * added more anti-ddos features, swapped out _sqrt implementation for 40x more gas-efficient implementation * deploy FluxMegaOracle and UnderwritingPool on goerli * further ddos tests for gauge voting system * started basic unit tests for GaugeController.test.ts * fixed commenting and completed basic unit test kit for GaugeController * fixed subtle indexing bug with saveupdatestate mechanism in GaugeController * did coverage tests for gauge contracts * increased unit test coverage % for vanity * did slither analysis && removed console logs * did aurora-testnet deploy script for gauge system * trivial linting changes * add enumeration to tokens in FluxMegaOracle * potentially save some SSTOREs in UnderwritingPool * add calculateIssue, calculateRedeem, pause, and events to UWP * write UnderwritingEquity.sol * test UnderwritingEquity.sol * change UnderwritingPool valueOf methods * updates to comments * redeploy oracle, uwp, and uwe on goerli. deposit into uwe * start DepositHelper.sol * remove voting from DepositHelper.sol * changed burn mechanism to call burn() instead of transfer to address(0x1) * added updated role to GaugeController & UnderwritingLockVoting, but strange bug now appear in hardhat test when attempt to call UnderwritingLocker.withdraw * fixed hardhat testing bug mentioned in previous commit * deploy on goerli * test DepositHelper.sol and deploy on goerli * reverted @OpenZeppelin dependencies to ~4.3.2 * fix some tests * cleanup contracts. rename utils to avoid collision * create SolaceMegaOracle.sol * redeploy on goerli * added getVotingDelegators function to UnderwritingLockVoting * added voteForMultipleVoters and removeVotesForMultipleVoters functions * forgot scripts * fix tests (somehow broke with npm) Co-authored-by: kyzooghost <jeffersonzjtang@gmail.com>
* write and test FluxMegaOracle.sol * write and test UnderwritingPool.sol * change variable names * deploy FluxMegaOracle and UnderwritingPool on goerli * add enumeration to tokens in FluxMegaOracle * potentially save some SSTOREs in UnderwritingPool * add calculateIssue, calculateRedeem, pause, and events to UWP * write UnderwritingEquity.sol * test UnderwritingEquity.sol * change UnderwritingPool valueOf methods * updates to comments * redeploy oracle, uwp, and uwe on goerli. deposit into uwe * allow uwp contract to be upgraded in uwe * deposithelper reads uwp from uwe * cleanup * redeploy on goerli * cleanup * redeploy on goerli
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.