Skip to content

Conversation

@leonardishere
Copy link
Contributor

No description provided.

… createLockSigned, increaseAmount, and increaseAmountSigned
…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
kyzooghost and others added 30 commits August 3, 2022 23:15
…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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants