-
Notifications
You must be signed in to change notification settings - Fork 35
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
Merge develop to audit/freeze #79
Merged
Merged
Conversation
This file contains 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
Added more tests
- Removed the outdated provision contract in favor of directly funding liquidity pools via bond pool. The bond pool funding process requires team approval, is discretionary, and therefore done manually - Refactored tests
- Dropped redundant store address from `deploy` function of `cxTokenFactory` and `VaultFactory` contracts. - Refactored dependent contracts according to this change. - Refactored tests
Removed Cover Provision
Fix/redundant store
The recoverable contract enables protocol admins to recover accidentally-sent ERC20 tokens to the Neptune Mutual protocol contracts. https://docs.neptunemutual.com/usage/recovering-cryptocurrencies This pull request helps maintain compatibility with some tokens which do not properly return a boolean value to indicate the transfer state by dropping the require statements on the return value of IERC20.transfer.
…-check Removed ERC-20 Force Transfers
Added validation checks to `addCover` function
Validations for `addCover`
Dropped the redundant and wrong check `AccessControlLibV1.mustBeCoverManager(s)`
…s-whitelist-acl Updated ACL on `updateCoverUsersWhitelist`
Added the missing functionality of burning PODs whenever liquidity is removed.
Burn PODs While Removing Liquidity
Dropped unused and redundant statement on the function `getReportingUnstakenAmountInternal`.
…n-amount Refactored `getReportingUnstakenAmountInternal`
- Persisted the cover creation timestamp when a new cover is created - Refactored the `decreaseStake` function to make it publicly accessible - Cover creators can optionally withdraw their full stake after 365 days of cover creation - Refactored events `StakeAdded` and `StakeRemoved` to add “account” argument
Only allow to exit if liquidity provider can unstake all of their NPM
Fixed `decreaseStake` issue
Fixed withdrawal of liquidity stake while exit
Fix state update interval and calculation of deposit amount for lending
## Lag: Coverage lag is a specified time period that can be set globally or on a per-cover basis to delay the start of coverage. The coverage of a policy begins at the EOD timestamp of the policy purchase date plus the coverage lag. This allows us to defend against time-based opportunistic attacks, which occur when an attacker purchases coverage after an incident has occurred but before the incident has been reported. ## Blacklist: Blacklisted accounts are unable to claim their cxTokens. Cover managers can use the blacklist feature to prohibit an account from claiming their cover. This usually happens when we suspect a policyholder of being the attacker. After performing KYC, we may be able to lift the blacklist.
Coverage Lag, Exclusion, and Blacklist
Implemented a block height offset feature so that there is a distance of at least a couple of blocks between deposits and withdrawals.
Vault Block Height Offset
Added `capitalizePool` function on the reassurance contract. This feature transfers a portion of the reassurance fund back to the cover liquidity pool to minimize liquidity provider loss. The `capitalizePool` can be called multiple times before finalization if the cover creator adds more liquidity to the reassurance pool. - Refactored to enable the reassurance contract to hold custody of the reassurance funds - Dropped external reassurance vault - Refactored `addCover` function to include reassurance rate - Refactored the `claim` function to keep an account of claims payout paid - Added `capitalizePool` function as explained above - Refactored `finalize` function to revert if reassurance transferrable amount is detected Other Changes - Refactored tests - Fixed some slither issues - Generated keys and ABIs - Updated the documentation
Reassurance: Capitalize Cover Pool
- Added NpmPriceOracle contract implementing Uniswap TWAP and Fair LP token pricing - Refactored PriceLibV1 to use the oracle - Refactored bond contract to use the oracle - Refactored the protocol initializer to include price oracle contract - Dropped redundant contracts PriceDiscovery and and its interface - For consistency, refactored abbreviation in function names to conform to camel case standard - Refactored `getCoverPoolSummaryInternal` of `CoverUtilV1` - Refactored tests - Updated keys and ABIs
Uniswap v2 TWAP and Fair LP Token Pricing
Bumps [cross-fetch](https://github.com/lquixada/cross-fetch) from 2.2.5 to 2.2.6. - [Release notes](https://github.com/lquixada/cross-fetch/releases) - [Commits](lquixada/cross-fetch@v2.2.5...v2.2.6) --- updated-dependencies: - dependency-name: cross-fetch dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
…rn/cross-fetch-2.2.6 Bump cross-fetch from 2.2.5 to 2.2.6
Fixed and added more tests
Refactored `StoreBase` and `BaseLibV1` to use `safeTransfer` for the recovery feature.
- Added `deleteStrategy` feature in the `LiquidityEgnine` contract - Updated `callerMustBeStrategyContract` to accept both active and disabled strategies
…abled Withdraw from Disabled
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.
Merging the latest development version to the audit/freeze branch