Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3be4c4c
deploy strategies v2 to mainnet
nialexsan Feb 24, 2026
df62725
add pyusd
nialexsan Feb 24, 2026
aa4c0f0
add pyusd test
nialexsan Feb 24, 2026
45389a6
Apply suggestion from @nialexsan
nialexsan Feb 24, 2026
86d8000
add syWFLOWv
nialexsan Feb 24, 2026
f26bfe4
Merge branch 'main' into nialexsan/fyv-v2-strategy-deployment
nialexsan Feb 24, 2026
251ca86
revert renaming
nialexsan Feb 26, 2026
fa48ed7
WIP strategy
nialexsan Feb 28, 2026
5b47556
Merge branch 'nialexsan/dust-debug-flowalp' into nialexsan/fyv-v2-str…
nialexsan Mar 8, 2026
ad9f871
Merge branch 'nialexsan/dust-debug-flowalp' into nialexsan/fyv-v2-str…
nialexsan Mar 8, 2026
5f33347
generate forked tests
nialexsan Mar 9, 2026
d994f0f
generate negative tests
nialexsan Mar 9, 2026
8e9ca36
generate FUSDEV test
nialexsan Mar 9, 2026
4599115
remove todo
nialexsan Mar 9, 2026
a35ba72
fix mock strategy path
nialexsan Mar 9, 2026
8693d2a
Merge branch 'main' into nialexsan/fyv-v2-strategy-deployment
nialexsan Mar 10, 2026
b798562
update FlowALP ref
nialexsan Mar 10, 2026
45dcb9b
remove redundant rebalance calls in tests
nialexsan Mar 10, 2026
da49a3f
fix setup emulator script
nialexsan Mar 10, 2026
817cbea
tweak test
nialexsan Mar 10, 2026
3a8962a
update FlowALPv0 ref
nialexsan Mar 10, 2026
f41e7d4
additional logic
nialexsan Mar 10, 2026
c0dafee
Merge branch 'main' into nialexsan/fyv-v2-strategy-deployment
nialexsan Mar 10, 2026
3b7c5a7
fix PYUSD to MOET preswap logic
nialexsan Mar 10, 2026
37e040a
testnet setup
nialexsan Mar 11, 2026
6e4e578
add min amounts for testnet
nialexsan Mar 11, 2026
f1a51ae
Merge remote-tracking branch 'origin/main' into nialexsan/fyv-v2-stra…
nialexsan Mar 11, 2026
dc1ee72
fix mainnet setup scripts
nialexsan Mar 11, 2026
0cbb331
remove debug scripts
nialexsan Mar 11, 2026
7b77674
mainnet testing scripts
nialexsan Mar 12, 2026
45830c9
fixed access
nialexsan Mar 13, 2026
0dceb75
remove compose issuer public method
nialexsan Mar 13, 2026
0480061
remove unnecessary recreate issuer
nialexsan Mar 13, 2026
092151c
Merge remote-tracking branch 'origin/main' into nialexsan/fyv-v2-stra…
nialexsan Mar 14, 2026
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
1,937 changes: 1,597 additions & 340 deletions cadence/contracts/FlowYieldVaultsStrategiesV2.cdc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cadence/contracts/mocks/MockStrategies.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ access(all) contract MockStrategies {
}

init() {
self.IssuerStoragePath = StoragePath(identifier: "FlowYieldVaultsStrategyComposerIssuer_\(self.account.address)")!
self.IssuerStoragePath = StoragePath(identifier: "MockStrategiesComposerIssuer_\(self.account.address)")!

let initialCollateralType = Type<@FlowToken.Vault>()

Expand Down
37 changes: 37 additions & 0 deletions cadence/scripts/band-oracle/get_pyusd_price.cdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import "FungibleToken"
import "FlowToken"
import "BandOracle"

/// Retrieves the PYUSD/USD price from the Band Protocol oracle on Flow.
///
/// BandOracle stores rates as symbol/USD values and computes cross-rates on demand.
/// Querying PYUSD/USD returns the USD price of one PYUSD token (~1.0 for a healthy peg).
///
/// NOTE: BandOracle.getReferenceData requires a FLOW fee payment. This script creates an
/// empty vault and succeeds only when BandOracle.getFee() == 0.0. If the fee is non-zero,
/// use the get_pyusd_price transaction instead, which withdraws from the signer's FLOW vault.
///
/// @return A struct with:
/// - fixedPointRate: UFix64 — PYUSD/USD price as a decimal (e.g. 0.99980000)
/// - integerE18Rate: UInt256 — rate multiplied by 10^18
/// - baseTimestamp: UInt64 — UNIX epoch of the last PYUSD data update on BandChain
/// - quoteTimestamp: UInt64 — UNIX epoch of the last USD data update on BandChain
///
access(all)
fun main(): BandOracle.ReferenceData {
let fee = BandOracle.getFee()
assert(fee == 0.0, message: "BandOracle fee is non-zero (\(fee) FLOW). Use the get_pyusd_price transaction to pay the fee.")

// Create an empty vault satisfying the payment parameter (fee == 0.0 is already asserted above)
let payment <- FlowToken.createEmptyVault(vaultType: Type<@FlowToken.Vault>())

// PYUSD is the base symbol; USD is the implicit quote for all Band oracle rates.
// The returned fixedPointRate = PYUSD price in USD.
let priceData = BandOracle.getReferenceData(
baseSymbol: "PYUSD",
quoteSymbol: "USD",
payment: <-payment
)

return priceData
}
Loading
Loading