-
Notifications
You must be signed in to change notification settings - Fork 5
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
Lock utilised capacity #39
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
# Conflicts: # test/T02User.t.sol # test/T03TokenizedVault.t.sol # test/T04Market.t.sol
kevin-fruitful
approved these changes
Dec 5, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm :)
amarinkovic
added a commit
that referenced
this pull request
Dec 9, 2022
* refactor: give more general name to locked up funds mapping * refactor: use more generic require messages for locked tokens * feat: update locked funds with utilised capacity * refactor: general locked balance getter; test defaults improvements * test: not able to trade with locked funds * feat: only entity admin can pay dividend * feat: locked funds and utilised capacity are factored by collateral ratio * 📝 docs: update natspec generated markdowns * test: harden collateral ratio test case * feat: add collateral ratio updated event * test: fix cell update test * feat: ensure enough balance available when increasing collateral ratio # Conflicts: # src/diamonds/nayms/facets/TokenizedVaultFacet.sol # src/diamonds/nayms/libs/LibEntity.sol # test/T02User.t.sol # test/T03TokenizedVault.t.sol # test/T04Entity.t.sol # test/T04Market.t.sol # test/T05TokenWrapper.t.sol
Merged
amarinkovic
added a commit
that referenced
this pull request
Dec 12, 2022
* refactor: give more general name to locked up funds mapping * refactor: use more generic require messages for locked tokens * feat: update locked funds with utilised capacity * refactor: general locked balance getter; test defaults improvements * test: not able to trade with locked funds * feat: only entity admin can pay dividend * feat: locked funds and utilised capacity are factored by collateral ratio * 📝 docs: update natspec generated markdowns * test: harden collateral ratio test case * feat: add collateral ratio updated event * test: fix cell update test * feat: ensure enough balance available when increasing collateral ratio # Conflicts: # src/diamonds/nayms/facets/TokenizedVaultFacet.sol # src/diamonds/nayms/libs/LibEntity.sol # test/T02User.t.sol # test/T03TokenizedVault.t.sol # test/T04Entity.t.sol # test/T04Market.t.sol # test/T05TokenWrapper.t.sol
amarinkovic
added a commit
that referenced
this pull request
Dec 12, 2022
* refactor: give more general name to locked up funds mapping * refactor: use more generic require messages for locked tokens * feat: update locked funds with utilised capacity * refactor: general locked balance getter; test defaults improvements * test: not able to trade with locked funds * feat: only entity admin can pay dividend * feat: locked funds and utilised capacity are factored by collateral ratio * 📝 docs: update natspec generated markdowns * test: harden collateral ratio test case * feat: add collateral ratio updated event * test: fix cell update test * feat: ensure enough balance available when increasing collateral ratio
amarinkovic
added a commit
that referenced
this pull request
Dec 14, 2022
* refactor: give more general name to locked up funds mapping * refactor: use more generic require messages for locked tokens * feat: update locked funds with utilised capacity * refactor: general locked balance getter; test defaults improvements * test: not able to trade with locked funds * feat: only entity admin can pay dividend * feat: locked funds and utilised capacity are factored by collateral ratio * 📝 docs: update natspec generated markdowns * test: harden collateral ratio test case * feat: add collateral ratio updated event * test: fix cell update test * feat: ensure enough balance available when increasing collateral ratio
amarinkovic
added a commit
that referenced
this pull request
Dec 14, 2022
* refactor: give more general name to locked up funds mapping * refactor: use more generic require messages for locked tokens * feat: update locked funds with utilised capacity * refactor: general locked balance getter; test defaults improvements * test: not able to trade with locked funds * feat: only entity admin can pay dividend * feat: locked funds and utilised capacity are factored by collateral ratio * 📝 docs: update natspec generated markdowns * test: harden collateral ratio test case * feat: add collateral ratio updated event * test: fix cell update test * feat: ensure enough balance available when increasing collateral ratio
amarinkovic
added a commit
that referenced
this pull request
Dec 14, 2022
…city (#42) * fix: only entity admin can pay dividend * Lock utilised capacity (#39) * refactor: give more general name to locked up funds mapping * refactor: use more generic require messages for locked tokens * feat: update locked funds with utilised capacity * refactor: general locked balance getter; test defaults improvements * test: not able to trade with locked funds * feat: only entity admin can pay dividend * feat: locked funds and utilised capacity are factored by collateral ratio * 📝 docs: update natspec generated markdowns * test: harden collateral ratio test case * feat: add collateral ratio updated event * test: fix cell update test * feat: ensure enough balance available when increasing collateral ratio
kevin-fruitful
pushed a commit
that referenced
this pull request
Dec 16, 2022
…city (#42) * fix: only entity admin can pay dividend * Lock utilised capacity (#39) * refactor: give more general name to locked up funds mapping * refactor: use more generic require messages for locked tokens * feat: update locked funds with utilised capacity * refactor: general locked balance getter; test defaults improvements * test: not able to trade with locked funds * feat: only entity admin can pay dividend * feat: locked funds and utilised capacity are factored by collateral ratio * 📝 docs: update natspec generated markdowns * test: harden collateral ratio test case * feat: add collateral ratio updated event * test: fix cell update test * feat: ensure enough balance available when increasing collateral ratio
amarinkovic
added a commit
that referenced
this pull request
Dec 16, 2022
…city (#42) * fix: only entity admin can pay dividend * Lock utilised capacity (#39) * refactor: give more general name to locked up funds mapping * refactor: use more generic require messages for locked tokens * feat: update locked funds with utilised capacity * refactor: general locked balance getter; test defaults improvements * test: not able to trade with locked funds * feat: only entity admin can pay dividend * feat: locked funds and utilised capacity are factored by collateral ratio * 📝 docs: update natspec generated markdowns * test: harden collateral ratio test case * feat: add collateral ratio updated event * test: fix cell update test * feat: ensure enough balance available when increasing collateral ratio
amarinkovic
added a commit
that referenced
this pull request
Dec 16, 2022
…city (#42) * fix: only entity admin can pay dividend * Lock utilised capacity (#39) * refactor: give more general name to locked up funds mapping * refactor: use more generic require messages for locked tokens * feat: update locked funds with utilised capacity * refactor: general locked balance getter; test defaults improvements * test: not able to trade with locked funds * feat: only entity admin can pay dividend * feat: locked funds and utilised capacity are factored by collateral ratio * 📝 docs: update natspec generated markdowns * test: harden collateral ratio test case * feat: add collateral ratio updated event * test: fix cell update test * feat: ensure enough balance available when increasing collateral ratio
kevin-fruitful
pushed a commit
that referenced
this pull request
Dec 16, 2022
…city (#42) * fix: only entity admin can pay dividend * Lock utilised capacity (#39) * refactor: give more general name to locked up funds mapping * refactor: use more generic require messages for locked tokens * feat: update locked funds with utilised capacity * refactor: general locked balance getter; test defaults improvements * test: not able to trade with locked funds * feat: only entity admin can pay dividend * feat: locked funds and utilised capacity are factored by collateral ratio * 📝 docs: update natspec generated markdowns * test: harden collateral ratio test case * feat: add collateral ratio updated event * test: fix cell update test * feat: ensure enough balance available when increasing collateral ratio
amarinkovic
added a commit
that referenced
this pull request
Dec 22, 2022
* fix(QSP-5): risk of initialize() twice * fix(QSP-2): avoid offer execution overflow fix(QSP-2): avoid offer execution overflow * fix(QSP-3): assert entity and policy asset match; prevent changing it * fix(QSP-6): missing validations * fix(QSP-4): prevent admin privilege loss * fix(QSP-7): unify dust checks and simplify redundant insert check * fix(QSP-8): remove dividendDeduction, reduce unnecessary complexity * fix(QSP-9): assigning duplicated stakeholders * fix(QSP-17): prevent reentrancy * fix(QSP-19): fix commission value thrown in event * fix(QSP-20): purge unused vars from appstorage, move doc into lib * fix(QSP-21): add EIP-165 support * fix(QSP-24): add explicit relation to interfaces in facets * fix(QSP-10): signature replay attack * fix(QSP-11): reentrancy guard colliding with storage slot * fix(QSP-12): risk of insolvent balance with non-standard erc20 token integration * fix(QSP-30): remove staking related requirement * fix(QSP-13): invalid policy configurations * fix(QSP-14): incorrect checks in _assertValidOffer() * fix(QSP-26): clear up comments and docs * fix(QSP-28): prevent dividend distribution guid reuse * fix(QSP-16): production rediness concern * fix(QSP-15): out-of-gas errors when adding external tokens to a protocol * fix(QSP-1): only entity admin can pay dividend and lock utilised capacity (#42) * fix: only entity admin can pay dividend * Lock utilised capacity (#39) * refactor: give more general name to locked up funds mapping * refactor: use more generic require messages for locked tokens * feat: update locked funds with utilised capacity * refactor: general locked balance getter; test defaults improvements * test: not able to trade with locked funds * feat: only entity admin can pay dividend * feat: locked funds and utilised capacity are factored by collateral ratio * 📝 docs: update natspec generated markdowns * test: harden collateral ratio test case * feat: add collateral ratio updated event * test: fix cell update test * feat: ensure enough balance available when increasing collateral ratio * fix(QSP): apply recommended best practices docs: address QS code docs comments * fix(QSP-22): lock to a specific Solidity version - v0.8.17 * ci: bump solc to v0.8.17 * fix: few slither reported warnings * ci: exclude low-level-calls rule from slither * refactor: revert interface pragma to `>= 0.8.13` due to lack of web3j support * fix(qsp-12-hotfix-deposit): use address(this) when checking balances in externalDeposit() (#45) * fix(qsp-12-hotfix): add low level call assertion checks (#43) Co-authored-by: Kevin Park <[email protected]>
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.
When creating a policy, funds should be locked in the entity's balance. One of the reasons for this is, so that the collateral cannot be used for trading or withdrawing while there are active policies that could potentially require these funds as a collateral for the claims.
Few other things are included in this pull-requests:
initPolicy
intoD03ProtocolDefaults
and few other small improvementsClickUp: CU-320z296