@@ -40,8 +40,8 @@ def get_balance(self, user: str, block: int | str = "latest") -> float:
4040 Retrieve the balance of the user in the incentivized Ethena token.
4141
4242 This method calculates the user's token balance based on the share of Balancer Pool Tokens (BPTs)
43- staked either directly in Balancer gauges or via Aura Finance.
4443 """
44+ bpt_balance = get_user_balance (self .chain , user , self .pool_address , block )
4545 gauge_balance = (
4646 0
4747 if self .gauge_address is None
@@ -55,7 +55,7 @@ def get_balance(self, user: str, block: int | str = "latest") -> float:
5555
5656 bpt_supply = get_token_supply (self .chain , self .pool_address , block )
5757
58- user_balance = gauge_balance + aura_balance
58+ user_balance = bpt_balance + gauge_balance + aura_balance
5959
6060 incentivized_token_balance = get_vault_v3_pool_token_balance (
6161 self .chain , self .pool_address , self .incentivized_token , block
@@ -74,11 +74,12 @@ def get_participants(
7474 blocks : Optional [List [int ]],
7575 ) -> Set [str ]:
7676 """
77- Retrieve the set of all unique participants who might have staked Balancer Pool Tokens (BPTs).
78-
79- This method identifies all addresses that have staked their BPT either directly
80- in Balancer gauges or via Aura Finance. Non-staked BPT holders are not included.
77+ Retrieve the set of all unique participants who might have Balancer Pool Tokens (BPTs).
8178 """
79+ bpt_holders = get_potential_token_holders (
80+ self .chain , self .pool_address , self .start_block
81+ )
82+
8283 gauge_holders = (
8384 []
8485 if self .gauge_address is None
@@ -95,10 +96,10 @@ def get_participants(
9596 )
9697 )
9798
98- return set (aura_holders + gauge_holders )
99+ return set (bpt_holders + aura_holders + gauge_holders )
99100
100101
101102if __name__ == "__main__" :
102- balancer = BalancerV3Integration (IntegrationID .BALANCER_V3_ETHEREUM_USDE_USDT )
103+ balancer = BalancerV3Integration (IntegrationID .BALANCER_V3_PLASMA_USDE_USDT )
103104 participants = balancer .get_participants (None )
104105 balances = balancer .get_balance (list (participants )[0 ])
0 commit comments