Skip to content

Commit 8150f3e

Browse files
committed
Update README.md
1 parent a7b8670 commit 8150f3e

1 file changed

Lines changed: 39 additions & 31 deletions

File tree

README.md

Lines changed: 39 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@
77
A Python3.9+ package that models Alpha Homora V2 positions to simplify interaction with their smart contracts in your Python projects.
88
</p>
99
<h3><strong>Current Features</strong></h3>
10-
<i>Get Rewards Value | Get Position Value | Get Debt Ratio | Get LP Info</i><br>
10+
<i>Get Rewards Value | Get Position Value | Get Debt Ratio | Get LP Info | <del>Get Current APY</del></i><br>
1111
<i>Harvest Rewards | Close Position</i><br>
12-
<h3><strong>Current Supported DEXes</strong></h3>
13-
<i>Pangolin V2 on Avalanche</i><br>
14-
<i>Trader Joe on Avalanche</i><br>
12+
<h3><strong>Current Supported Networks</strong></h3>
13+
<i>Avalanche</i><br>
14+
<i><del>Ethereum</del> (WIP)</i><br>
15+
<i><del>Fantom</del> (WIP)</i><br>
1516
</div>
1617
<br>
1718

@@ -47,10 +48,12 @@ When updates are made to the package, the version will automatically be incremen
4748

4849
How to use the package:
4950

51+
### For Avalanche Positions:
52+
5053
1. Import the package into your Python script:
5154
```python
5255
from alpha_homora_v2.util import get_web3_provider
53-
from alpha_homora_v2.position import AlphaHomoraV2Position
56+
from alpha_homora_v2.position import AvalanchePosition
5457
```
5558

5659
2. Create your Web3 provider object to interact with the network:
@@ -60,7 +63,7 @@ How to use the package:
6063
provider = get_provider(NETWORK_RPC_URL)
6164
```
6265

63-
3. Creating an [AlphaHomoraV2Position](alpha_homora_v2/position.py) instance requires the following:
66+
3. Creating an [AvalanchePosition](alpha_homora_v2/position.py) instance requires the following:
6467
- A web3 provider object
6568
- Your position ID (an integer)
6669
- This ID should match your position on Alpha Homora, without the "#"
@@ -80,7 +83,7 @@ How to use the package:
8083

8184
Once you've gathered all of these variables, you can create the position instance like this example below:
8285
```python
83-
position = AlphaHomoraV2Position(
86+
position = AvalanchePosition(
8487
web3_provider=provider,
8588
position_id=11049,
8689
dex="Pangolin V2",
@@ -89,30 +92,35 @@ How to use the package:
8992
)
9093
```
9194
4. Use your position instance to interact with the Alpha Homora V2 position smart contracts on the network:
92-
```python
93-
""" Informational Methods (Private Key not Required) """
94-
# Get value of harvestable rewards:
95-
position.get_rewards_value()
96-
97-
# Get current debt ratio:
98-
position.get_debt_ratio()
99-
100-
# Get position value (equity, debt, and position value):
101-
position.get_position_value()
102-
103-
# get LP pool info:
104-
position.get_pool_info()
105-
106-
# (WIP) Get current pool APY
107-
position.get_current_apy()
108-
109-
""" Transactional Methods (Private Key Required) """
110-
# Harvest available rewards:
111-
position.claim_all_rewards()
112-
113-
# Close the position:
114-
position.close()
115-
```
95+
- Informational Methods
96+
- Return data like a JSON API
97+
- Private wallet key ***not required*** for use
98+
```python
99+
# Get value of harvestable rewards:
100+
position.get_rewards_value()
101+
102+
# Get current debt ratio:
103+
position.get_debt_ratio()
104+
105+
# Get position value (equity, debt, and position value):
106+
position.get_position_value()
107+
108+
# get LP pool info:
109+
position.get_pool_info()
110+
111+
# (WIP) Get current pool APY
112+
position.get_current_apy()
113+
```
114+
- Transactional Methods:
115+
- Return a [TransactionReceipt](alpha_homora_v2/receipt.py) object with success
116+
- Private wallet key ***required*** for use to sign transactions
117+
```python
118+
# Harvest available rewards:
119+
position.claim_all_rewards()
120+
121+
# Close the position:
122+
position.close()
123+
```
116124
117125
## Uninstallation:
118126

0 commit comments

Comments
 (0)