Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Commit

Permalink
Contextualise undocumented constant in Uniswap with link to code
Browse files Browse the repository at this point in the history
  • Loading branch information
liamzebedee committed Oct 17, 2019
1 parent 48c65ae commit 9d9bda2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion implementation/test/integration/helpers/uniswap.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ export class UniswapHelpers {
await tbtcToken.forceMint(account, tbtcSupply, { from: account })
await tbtcToken.approve(uniswapExchange.address, tbtcSupply, { from: account })

// Uniswap requires a minimum of 1000000000 wei for the initial addLiquidity call
// Uniswap requires a minimum of 1000000000 wei for the initial addLiquidity call.
// See https://github.com/Uniswap/contracts-vyper/blob/c10c08d81d6114f694baa8bd32f555a40f6264da/contracts/uniswap_exchange.vy#L65
// for more context on this undocumented constant.
const UNISWAP_MINIMUM_INITIAL_LIQUIDITY_WEI = new BN('1000000000')
const ethSupply = new BN(ethAmount).add(UNISWAP_MINIMUM_INITIAL_LIQUIDITY_WEI).mul(supplyFactor)

Expand Down

0 comments on commit 9d9bda2

Please sign in to comment.