Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

.DS_Store
# flow
*.pkey
!local/mock-incrementfi.pkey
Expand Down
4 changes: 2 additions & 2 deletions cadence/contracts/TidalYieldStrategies.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ access(all) contract TidalYieldStrategies {
access(contract) var uniqueID: DeFiActions.UniqueIdentifier?
access(self) let position: TidalProtocol.Position
access(self) var sink: {DeFiActions.Sink}
access(self) var source: {DeFiActions.Source}
access(self) var source: {DeFiActions.Source, DeFiActions.Liquidator}

init(id: DeFiActions.UniqueIdentifier, collateralType: Type, position: TidalProtocol.Position) {
self.uniqueID = id
Expand All @@ -63,7 +63,7 @@ access(all) contract TidalYieldStrategies {
}
/// Returns the amount available for withdrawal via the inner Source
access(all) fun availableBalance(ofToken: Type): UFix64 {
return ofToken == self.source.getSourceType() ? self.source.minimumAvailable() : 0.0
return ofToken == self.source.getSourceType() ? self.source.liquidationAmount() : 0.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The usage here makes sense, but don't we also need to use self.source.liquidate() somewhere when closing out the Tide?

}
/// Deposits up to the inner Sink's capacity from the provided authorized Vault reference
access(all) fun deposit(from: auth(FungibleToken.Withdraw) &{FungibleToken.Vault}) {
Expand Down
Binary file removed lib/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/TidalProtocol
Loading