Skip to content

Commit c2bb65a

Browse files
committed
Add: eUSDe Aug expiry
1 parent fc5add1 commit c2bb65a

3 files changed

Lines changed: 50 additions & 1 deletion

File tree

constants/silo_finance.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class SiloFinanceMarket:
3636
SiloFinanceMarket(
3737
address="0x4902F25cf6486840F9dED17A6b3AF74fE107fffc",
3838
start_block=22694943,
39-
non_borrowable_token_address="0x0000000000000000000000000000000000000000",
39+
non_borrowable_token_address="0x35BA9aB715a8eC58e6C972Af9D57f2D7B710BDf8",
4040
shares_decimals=21,
4141
assets_decimals=18,
4242
),
@@ -45,10 +45,12 @@ class SiloFinanceMarket:
4545
SILO_FINANCE_INTEGRATION_ID_TO_MARKET = {
4646
IntID.SILO_FINANCE_LP_SUSDE_SEP_25_EXPIRY: SILO_FINANCE_MARKETS[0],
4747
IntID.SILO_FINANCE_LP_SUSDE_JUL_31_EXPIRY: SILO_FINANCE_MARKETS[1],
48+
IntID.SILO_FINANCE_LP_EUSDE_AUG_14_EXPIRY: SILO_FINANCE_MARKETS[2],
4849
}
4950

5051
# NOTE: the first deployment block is the earliest block where any of the markets are deployed
5152
SILO_FINANCE_INTEGRATION_ID_TO_START_BLOCK = {
5253
IntID.SILO_FINANCE_LP_SUSDE_SEP_25_EXPIRY: SILO_FINANCE_MARKETS[0].start_block,
5354
IntID.SILO_FINANCE_LP_SUSDE_JUL_31_EXPIRY: SILO_FINANCE_MARKETS[1].start_block,
55+
IntID.SILO_FINANCE_LP_EUSDE_AUG_14_EXPIRY: SILO_FINANCE_MARKETS[2].start_block,
5456
}

integrations/integration_ids.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,13 @@ class IntegrationID(Enum):
519519
Token.SUSDE,
520520
)
521521

522+
# Silo Finance LP-eUSDe (14 Aug 2025)
523+
SILO_FINANCE_LP_EUSDE_AUG_14_EXPIRY = (
524+
"silo_finance_lp_eusde_aug_14_expiry",
525+
"Silo Finance LP-eUSDe (Aug 14)",
526+
Token.USDE,
527+
)
528+
522529
def __init__(self, column_name: str, description: str, token: Token = Token.USDE):
523530
self.column_name = column_name
524531
self.description = description
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
from rich.console import Console
2+
3+
from constants.silo_finance import SILO_FINANCE_INTEGRATION_ID_TO_START_BLOCK
4+
from constants.summary_columns import SummaryColumn
5+
from integrations.integration_ids import IntegrationID as IntID
6+
from constants.chains import Chain
7+
from utils.silo_finance import SiloFinance
8+
9+
if __name__ == "__main__":
10+
console = Console()
11+
integration_id = IntID.SILO_FINANCE_LP_EUSDE_AUG_14_EXPIRY
12+
integration = SiloFinance(
13+
integration_id=integration_id,
14+
start_block=SILO_FINANCE_INTEGRATION_ID_TO_START_BLOCK[integration_id],
15+
chain=Chain.ETHEREUM,
16+
summary_cols=[SummaryColumn.SILO_FINANCE_LP_EUSDE_AUG_14_PTS],
17+
reward_multiplier=30,
18+
balance_multiplier=1,
19+
)
20+
21+
# Without cached data
22+
without_cached_data_output = integration.get_block_balances(
23+
cached_data={}, blocks=[22726278]
24+
)
25+
console.print("Run without cached data", without_cached_data_output)
26+
# Check that the output is correct~ish
27+
assert without_cached_data_output[22726278] == {
28+
"0xdEDcF5806c4968C6397eeE97e68047bdA339d0c1": 4.0
29+
}
30+
31+
# Use cache data to get the next blocks
32+
with_cached_data_output = integration.get_block_balances(
33+
cached_data=without_cached_data_output,
34+
blocks=[22740147],
35+
)
36+
console.print("Run with cached data", with_cached_data_output)
37+
assert with_cached_data_output[22740147] == {
38+
"0xdEDcF5806c4968C6397eeE97e68047bdA339d0c1": 5.0,
39+
"0x62a4A8f9f5F3AaE9Ee9CEE780285A0D501C12d09": 25.447709,
40+
}

0 commit comments

Comments
 (0)