Conversation
src/zkbob/ZkBobCompoundingMixin.sol
Outdated
| } | ||
|
|
||
| uint256 deltaShares = yieldVault.withdraw(toClaimAmount, address(this), address(this)); | ||
| investedSharesAmount = currentInvestedSharesAmount - deltaShares; |
There was a problem hiding this comment.
I am not sure, if there is no rounding problems.
Maybe it is better to pass shares as an argument and add check on balance in the code
20623dc to
39254e9
Compare
| address interestReceiver; | ||
| // operator address (or address(0) if permissionless) | ||
| address yieldOperator; | ||
| } |
There was a problem hiding this comment.
Is the scenario of negative apr considered?
There was a problem hiding this comment.
There are 2 possible snearios - we want to close the position in the vault or don't want.
It can be checked by comparing to variables - totalInvestedAssets and previewWithdraw(totalInvestedShares)
So, offchain bot can monitor these 2 variables and notify, when our tvl become less than users deposits. After that the team can decide, if position should be closed.
Insufficiency in tvl can be fullfilled by us just by transferring tokens.
So, in code function for closing position should be added, and possibility to decrease totalInvestedAmount manually by transferring tokens to pool
…yield-erc4626-support # Conflicts: # script/scripts/DeployZkBobPoolModules.s.sol # src/zkbob/ZkBobPool.sol # src/zkbob/utils/ZkBobAccounting.sol # test/interfaces/IZkBobPoolAdmin.sol # test/zkbob/ZkBobPool.t.sol
39254e9 to
0d46f96
Compare
src/zkbob/ZkBobCompoundingMixin.sol
Outdated
| uint256 rebalancedAssets = allAssets; | ||
|
|
||
| yieldVault.withdraw(allAssets, address(this), address(this)); | ||
| if (allAssets > currentInvestedAssetsAmount) { |
There was a problem hiding this comment.
This comparation can be inaccurate, better to compare amount after real withdrawa
…-support # Conflicts: # src/infra/EnergyRedeemer.sol # src/zkbob/ZkBobPool.sol # src/zkbob/ZkBobPoolUSDCMigrated.sol # src/zkbob/utils/ZkBobAccounting.sol # test/interfaces/IZkBobPoolAdmin.sol # test/zkbob/ZkBobPool.t.sol
13bf6a7 to
43cbede
Compare
… feat/yield-erc4626-support # Conflicts: # src/zkbob/ZkBobCompoundingMixin.sol # test/zkbob/ZkBobPool.t.sol
No description provided.