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

Liquidity, Lending Period, and Withdrawal Window #7

Merged
merged 3 commits into from Feb 28, 2022

Conversation

binpmxstn
Copy link
Contributor

@binpmxstn binpmxstn commented Feb 27, 2022

  • Because of block gas limit, exploded the addCover function to addCover and deployVault.
  • New events added: VaultDeployed
  • Fixed a bug getCoverFeeInfoInternal which caused revert exceptions because of zero values due to precision loss (uint division)
  • For brevity, rearranged input arguments in _getCoverFeeRate
  • Refactored and renamed getCoverableInternal to getStablecoinBalanceOfCoverPoolInternal
  • Fixed mistake in getPriceInternal
  • Added check mustBeDuringWithdrawalPeriod in RoutineInvokerLibV1
  • Fixed a bug in withdrawRewardsInternal of StakingPoolLib now sending correct fee to the treasury address
  • Added a new check mustHaveStoppedCoverStatus in ValidationLibV1
  • Fixed bug of calculateLiquidityInternal
  • Refactored getInfoInternal of VaultLibV1.
  • Dropped events: MinLiquidityPeriodSet
  • Dropped obsolete function addLiquidityInternalOnly from the Vault contract
  • Refactored Vault's getInfo function; deleted lockup period and added withdrawal open and close dates.
  • For brevity, renamed Policy contract's getCoverable to getAvailableLiquidity
  • Dropped obsolete minLiquidityPeriod configuration constant from protocol initialization function
  • Refactored ClaimsProcessor's setClaimPeriod function to also accept cover keys. If a cover key is not specified, it sets the default/fallback claim period.
  • Added coverKey to ClaimPeriodSet event. #subgraph #frontend
  • Added a warning note in _finalize logic to NOT RESET staking information
  • Updated _resolve function to get claim period by cover key. In other words, each cover now has its own claim period.
  • Added unstakeWithClaim to IUnstakable
  • Refactored unstakeWithClaim in Unstakable to be an override
  • Refactored, added, and rearranged addCover input arguments. Dropped: initialLiquidity. Added: floor, ceiling, claimPeriod.
  • Fixed bug in addCover which now checks the NPM input against minimum cover creation stake instead of minium first reporting stake.
  • Fixed a bug info getUnstakeInfoFor. Now returns 0 as reward if called after finalization.
  • Refactored IUniswapV2RouterLike
  • Updated Fakes: FakeUniswapV2RouterLike
  • Refactored unit tests
  • Refactored deployment script, composer, and utils
  • Updated ABIs
  • Updated documentation
  • Updated keys

@notes

Subgraph:

  • New events added: VaultDeployed
  • Dropped events: MinLiquidityPeriodSet
  • Added coverKey to ClaimPeriodSet event. #subgraph #frontend

Frontend:

  • Because of block gas limit, exploded the addCover function to addCover and deployVault.
  • Refactored, added, and rearranged addCover input arguments. Dropped: initialLiquidity. Added: floor, ceiling, claimPeriod.
  • Refactored Vault's getInfo function; deleted lockup period and added withdrawal open and close dates.
  • Added unstakeWithClaim to IUnstakable

- Because of block gas limit, exploded the `addCover` function to `addCover` and `deployVault`.
- New events added: `VaultDeployed`
- Fixed a bug `getCoverFeeInfoInternal` which caused revert exceptions because of zero values due to precision loss (uint division)
- For brevity, rearranged input arguments in `_getCoverFeeRate`
- Refactored and renamed `getCoverableInternal` to `getStablecoinBalanceOfCoverPoolInternal`
- Fixed mistake in `getPriceInternal`
- Added check `mustBeDuringWithdrawalPeriod` in RoutineInvokerLibV1
- Fixed a bug in `withdrawRewardsInternal` of `StakingPoolLib` now sending correct fee to the treasury address
- Added a new check `mustHaveStoppedCoverStatus` in ValidationLibV1
- Fixed bug of `calculateLiquidityInternal`
- Refactored `getInfoInternal` of `VaultLibV1`.
- Dropped events: `MinLiquidityPeriodSet`
- Dropped obsolete function `addLiquidityInternalOnly` from the Vault contract
- Refactored Vault's `getInfo` function; deleted lockup period and added withdrawal open and close dates.
- For brevity, renamed Policy contract's `getCoverable` to `getAvailableLiquidity`
- Dropped obsolete `minLiquidityPeriod` configuration constant from protocol initialization function
- Refactored ClaimsProcessor's `setClaimPeriod` function to also accept cover keys. If a cover key is not specified, it sets the default/fallback claim period.
- Added coverKey to `ClaimPeriodSet` event. #subgraph #frontend
- Added a warning note in `_finalize` logic to NOT RESET staking information
- Updated `_resolve` function to get claim period by cover key. In other words, each cover now has its own claim period.
- Added `unstakeWithClaim` to IUnstakable
- Refactored `unstakeWithClaim` in Unstakable to be an override
- Refactored, added, and rearranged `addCover` input arguments. Dropped: initialLiquidity. Added: floor, ceiling, claimPeriod.
- Fixed bug in `addCover` which now checks the NPM input against minimum cover creation stake instead of minium first reporting stake.
- Fixed a bug info `getUnstakeInfoFor`. Now returns 0 as reward if called after finalization.
- Refactored `IUniswapV2RouterLike`
- Updated Fakes: `FakeUniswapV2RouterLike`
- Refactored unit tests
- Refactored deployment script, composer, and utils
- Updated ABIs
- Updated documentation
- Updated keys
@binpmxstn binpmxstn merged commit 9a447ab into develop Feb 28, 2022
@binpmxstn binpmxstn deleted the fix/liquidity-lending-withdrawal branch February 28, 2022 16:28
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.

None yet

1 participant