Hashstack
Mainnet V1Discord
English Language
English Language
  • šŸ™ŒOverview
  • šŸ’”Concepts
    • šŸŽ®Slippage Control
    • šŸ“ˆAutomated Liquidity Provision
    • šŸ’µPermissible CDR
    • šŸ’øLiquidations
    • šŸļøIsolated margin
    • šŸ’µDebt management
    • šŸ’»Proxy/Upgrade Structure
  • šŸ“ˆDegen Mode
  • šŸ’ÆHow to use Hashstack V1
    • How do I connect my wallet?
    • Supply
    • Borrow
    • Spend Borrow
      • Convert tokens to original borrow market
      • Liquidity Provision
      • Swapping
    • Staking rTokens
    • Unstaking rTokens
    • Repay borrow
    • Zero repay
    • Withdraw Supply
    • Add collateral to existing borrow
    • Add tokens to existing supply
  • ā“FAQs
  • šŸ“’Glossary
  • Guide to Airdrop Campaign
  • Risk Management Framework
  • šŸ’»Developer Hub
  • āœļø Content Creators Program (CCP)
  • šŸ’°Contribute-2-Earn
  • šŸ”—Official links
  • šŸ“‘Mainnet V0.10 Guide
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Concepts

Automated Liquidity Provision

PreviousSlippage ControlNextPermissible CDR

Last updated 1 year ago

Was this helpful?

Automated Liquidity Provision emphasizes the importance of allocating the entire loan amount to a user's preferred liquidity pool and simplify record-keeping.

  • Here, the protocol divides and allocates a loan amount to a user's preferred liquidity pool.

  • Ideally, there should be nothing left from the loan amount because it makes record-keeping complicated.

  • For example, if someone takes a $1000 loan and chooses the USDT/ ETH pool, the entire $1000 must be added as liquidity to this pool.

  • With this problem statement, we concluded that the following should provide us with what we seek: get_amount_out(x) = quote(1000 - x) [JediSwap functions]

  • Readjusting the equation to the standard form would give:

(997āˆ—x)/((reserveInāˆ—1000)+(997āˆ—x))+x=(1000āˆ’x)/reserveIn (997*x) / ((reserveIn * 1000) + (997 * x)) + x = (1000-x)/reserveIn(997āˆ—x)/((reserveInāˆ—1000)+(997āˆ—x))+x=(1000āˆ’x)/reserveIn
  • Read article to understand how we came to this equation.

šŸ’”
šŸ“ˆ
this