-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
15 changed files
with
230 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...derSwapReceiver/interfaces/IThunderSwapHooks.sol/interface.IThunderSwapHooks.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 7 additions & 1 deletion
8
docs/src/src/core/LiquidityProviderToken.sol/contract.LiquidityProviderToken.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
docs/src/src/core/ThunderSwapPoolFactory.sol/contract.ThunderSwapPoolFactory.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
...c/core/lib/LiquiditySupplyAndSwapMath.sol/library.LiquiditySupplyAndSwapMath.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# LiquiditySupplyAndSwapMath | ||
[Git Source](https://github.com/Sahil-Gujrati/thunder-swap/blob/c5928651e4c994aae9565d571bef4170237837f3/src/core/lib/LiquiditySupplyAndSwapMath.sol) | ||
|
||
|
||
## Functions | ||
### getPoolToken2LiquidityToAddBasedOnPoolToken1Amount | ||
|
||
|
||
```solidity | ||
function getPoolToken2LiquidityToAddBasedOnPoolToken1Amount( | ||
uint256 _poolToken1Amount, | ||
uint256 _poolToken1Reserves, | ||
uint256 _poolToken2Reserves | ||
) | ||
internal | ||
pure | ||
returns (uint256); | ||
``` | ||
|
||
### getPoolToken1LiquidityToAddBasedOnPoolToken2Amount | ||
|
||
|
||
```solidity | ||
function getPoolToken1LiquidityToAddBasedOnPoolToken2Amount( | ||
uint256 _poolToken2Amount, | ||
uint256 _poolToken1Reserves, | ||
uint256 _poolToken2Reserves | ||
) | ||
internal | ||
pure | ||
returns (uint256); | ||
``` | ||
|
||
### getLiquidityProviderTokensToMint | ||
|
||
|
||
```solidity | ||
function getLiquidityProviderTokensToMint( | ||
uint256 _poolToken1AmountToDeposit, | ||
uint256 _totalLiquidityProviderTokenSupply, | ||
uint256 _poolToken1reserves | ||
) | ||
public | ||
pure | ||
returns (uint256); | ||
``` | ||
|
||
### getInputBasedOnOuput | ||
|
||
|
||
```solidity | ||
function getInputBasedOnOuput( | ||
uint256 _outputAmount, | ||
uint256 _inputReserves, | ||
uint256 _outputReserves, | ||
uint256 _feeNumerator, | ||
uint256 _feeDenominator | ||
) | ||
public | ||
pure | ||
returns (uint256); | ||
``` | ||
|
||
### getOutputBasedOnInput | ||
|
||
|
||
```solidity | ||
function getOutputBasedOnInput( | ||
uint256 _inputAmount, | ||
uint256 _inputReserves, | ||
uint256 _outputReserves, | ||
uint256 _feeNumerator, | ||
uint256 _feeDenominator | ||
) | ||
public | ||
pure | ||
returns (uint256); | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
|
||
# Contents | ||
- [LiquiditySupplyAndSwapMath](LiquiditySupplyAndSwapMath.sol/library.LiquiditySupplyAndSwapMath.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.