Skip to content

Comments

Add initial protocol events#13

Merged
sisyphusSmiling merged 1 commit intogio/refactor-pool-creation-updatedfrom
gio/add-events
Jun 20, 2025
Merged

Add initial protocol events#13
sisyphusSmiling merged 1 commit intogio/refactor-pool-creation-updatedfrom
gio/add-events

Conversation

@sisyphusSmiling
Copy link
Contributor

Stacked on: #10

Description

  • Add events identifying primary position management actions

@sisyphusSmiling sisyphusSmiling self-assigned this Jun 17, 2025
@sisyphusSmiling sisyphusSmiling added the enhancement New feature or request label Jun 17, 2025
@sisyphusSmiling sisyphusSmiling changed the title add initial protocol events Add initial protocol events Jun 17, 2025
@sisyphusSmiling sisyphusSmiling merged commit f9e1bfa into gio/refactor-pool-creation-updated Jun 20, 2025
1 check passed
@sisyphusSmiling sisyphusSmiling deleted the gio/add-events branch June 20, 2025 18:54
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants