Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use min and max apr in add liquidity call #1001

Merged
merged 2 commits into from
Oct 17, 2023
Merged

use min and max apr in add liquidity call #1001

merged 2 commits into from
Oct 17, 2023

Conversation

wakamex
Copy link
Contributor

@wakamex wakamex commented Oct 17, 2023

allows passing in min_apr and max_apr to add liquidity trades, like this:

# Add liquidity
action_list.append(
    Trade(
        market_type=MarketType.HYPERDRIVE,
        market_action=HyperdriveMarketAction(
            action_type=HyperdriveActionType.ADD_LIQUIDITY,
            trade_amount=self.lp_amount,
            wallet=wallet,
            min_apr=fixed_rate - self.policy_config.rate_slippage,
            max_apr=fixed_rate + self.policy_config.rate_slippage,
        ),
    )
)

@vercel
Copy link

vercel bot commented Oct 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
elf-simulations ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2023 2:30am

@wakamex wakamex merged commit 0253ed0 into main Oct 17, 2023
6 checks passed
@wakamex wakamex deleted the min_max_apr branch October 17, 2023 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants