-
Notifications
You must be signed in to change notification settings - Fork 2
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
Remove deposits maximum total assets limit #332
Conversation
We want to remove the maximum limit for funds held by stBTC contract to accept deposits without any cap.
Since stBTC doesn't have max total assets limit anymore, we don't need to track the limits in the BitcoinDepositor contract.
We no longer need to queue the stake requests as there is no limit for stBTC deposits.
✅ Deploy Preview for acre-dapp-testnet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
We remove test contracts used to test upgradeability as these tests fell like testing OpenZeppelin plugin. Every change to the V1 contract requires us to reflect the changes in the test contracts which is a pain for maintanance.
Reflect changes from V1 contracts in V2 contracts defined for upgrades testing.
We don't need this TODO as minimum deposit amount is managed by `minStake` function.
|
/// @param depositKey Deposit key identifying the deposit. | ||
/// @param caller Address that finalized the stake request. | ||
/// @param queuedAmount Amount of queued tBTC tokens. | ||
event StakeRequestQueued( |
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.
This event is also being used in dApp subgraphs e.g. one of the usage is in acre-bitcoin-depositor.ts
. There are other places. We should probably let know front-end folks about this change.
Same for other deleted events
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.
The function has just one property, so we can rename it.
Updated in d38052d |
This PR is a follow-up from #332. Since we removed deposit requests queueing we can combine `finalizeBridging` and `finalizeStake` functions. We include a couple of other small changes in this PR to optimize gas usage. Before: ``` | AcreBitcoinDepositor · finalizeStake · - · - · 208140 · 9 · - │ ·························|···················|·············|·············|··············|···············|·············· | AcreBitcoinDepositor · initializeStake · 145693 · 145717 · 145711 · 8 · - │ ``` After: ``` | AcreBitcoinDepositor · finalizeStake · 176104 · 204304 · 192218 · 14 · - │ ·························|···················|·············|·············|··············|···············|·············· | AcreBitcoinDepositor · initializeStake · 145886 · 145910 · 145903 · 7 · - │ ```
We no longer want to enforce a maximum limit for total assets under management. In this PR we remove code related to the maximum total assets limit in stBTC contract.
Additionally, the Bitcoin Depositor contract can be simplified as it won't need to queue deposits anymore due to the maximum assets limit being reached.