Add initial protocol events#13
Merged
sisyphusSmiling merged 1 commit intogio/refactor-pool-creation-updatedfrom Jun 20, 2025
Merged
Add initial protocol events#13sisyphusSmiling merged 1 commit intogio/refactor-pool-creation-updatedfrom
sisyphusSmiling merged 1 commit intogio/refactor-pool-creation-updatedfrom
Conversation
joshuahannan
approved these changes
Jun 18, 2025
f9e1bfa
into
gio/refactor-pool-creation-updated
1 check passed
sisyphusSmiling
added a commit
that referenced
this pull request
Jun 25, 2025
* feat: Restore AlpenFlow implementation with supporting contracts - TidalProtocol: 100% restoration of Dieter's AlpenFlow functionality - Oracle-based pricing and health calculations - Deposit rate limiting and position queues - Advanced health management functions - Async position updates - MOET: Mock stablecoin for multi-token testing - TidalPoolGovernance: Role-based governance system - AlpenFlow_dete_original: Reference implementation Note: Old tests removed as they're incompatible with new contracts. Updated tests coming in follow-up PR. No breaking changes. Foundation for multi-token lending protocol. * fix: Add MOET and TidalPoolGovernance to flow.json for deployment * remove DeFiBlocks interface definitions from TidalProtocol contract * update InternalPosition.topUpSource to value field from reference * fix PriceOracle conformance .price() calls * Update cadence/contracts/TidalProtocol.cdc * Assign TokenState.lastUpdate as current block timestamp on init * update error message * remove TidalGovernance contract * add select contract, tranasction, script, and test changes from #6 * update DeFiBlocks submodule to latest main * add new DFB dependencies to flow.json * fix PositionSink/Source conflict with IdentifiableStruct.id() * update PositionSource fields from access(all) to access(self) * add check on FungibleToken defining contract conformance when token added * remove unused methods from test_helpers.cdc * remove redundant TidalProtocol position sink/source definitions * remove comment notes * fix insufficient funds on rebalance error by minting MOET instead of pulling from topUpSource * remove contract debug logs * add behavioral test cases for position creation & under/overcollateralization rebalancing * remove unused methods, structs & implement TODOs * protects against underflow on TokenState.updateCredit/DebitBalance * restrict access on Position's privileged methods * update minor contract formatting * update DeFiBlocks with latest changes merged to main * update DeFiBlocks to latest * fix MOET deposit logic * fix import syntax * add initial protocol events (#13) * update position rebalance transaction comments * fix fundsAvailableAboveTargetHealthAfterDepositing when effectiveDebtAfterDeposit == 0.0 * Update contract comments & reorganize for readability (#12) * update PositionDetails and PositionBalance comments and fields * consolidate public methods to the bottom of the contract * remove comment references to restored functionality * update contract comments * update contract comments and reorganize for clarity * update contract and construct internal methods * update contract comments * revert changes to PositionDetails balances field * update contract comments * Update cadence/contracts/TidalProtocol.cdc Co-authored-by: Joshua Hannan <joshua.hannan@flowfoundation.org> * update interest index & balance type comments --------- Co-authored-by: Joshua Hannan <joshua.hannan@flowfoundation.org> * Update .gitmodules --------- Co-authored-by: kgrgpg <keshav.pg@gmail.com> Co-authored-by: Joshua Hannan <joshua.hannan@flowfoundation.org> Co-authored-by: Alex <12097569+nialexsan@users.noreply.github.com>
This file contains hidden or 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
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.
Stacked on: #10
Description