-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b595120
commit 6fad4c3
Showing
97 changed files
with
178 additions
and
94 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
2 changes: 1 addition & 1 deletion
2
packages/contracts/docs/src/src/dollar/Diamond.sol/contract.Diamond.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
2 changes: 1 addition & 1 deletion
2
packages/contracts/docs/src/src/dollar/Diamond.sol/struct.DiamondArgs.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
2 changes: 1 addition & 1 deletion
2
...c/src/dollar/access/AccessControlInternal.sol/abstract.AccessControlInternal.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
2 changes: 1 addition & 1 deletion
2
packages/contracts/docs/src/src/dollar/core/CreditNft.sol/contract.CreditNft.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
2 changes: 1 addition & 1 deletion
2
...tracts/docs/src/src/dollar/core/ERC1155Ubiquity.sol/abstract.ERC1155Ubiquity.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
2 changes: 1 addition & 1 deletion
2
.../contracts/docs/src/src/dollar/core/ERC20Ubiquity.sol/abstract.ERC20Ubiquity.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
2 changes: 1 addition & 1 deletion
2
...es/contracts/docs/src/src/dollar/core/StakingShare.sol/contract.StakingShare.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
2 changes: 1 addition & 1 deletion
2
...ocs/src/src/dollar/core/UbiquityCreditToken.sol/contract.UbiquityCreditToken.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
2 changes: 1 addition & 1 deletion
2
...ocs/src/src/dollar/core/UbiquityDollarToken.sol/contract.UbiquityDollarToken.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
2 changes: 1 addition & 1 deletion
2
...src/dollar/core/UbiquityGovernanceToken.sol/contract.UbiquityGovernanceToken.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
2 changes: 1 addition & 1 deletion
2
...ocs/src/src/dollar/facets/AccessControlFacet.sol/contract.AccessControlFacet.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
2 changes: 1 addition & 1 deletion
2
.../docs/src/src/dollar/facets/BondingCurveFacet.sol/contract.BondingCurveFacet.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
2 changes: 1 addition & 1 deletion
2
packages/contracts/docs/src/src/dollar/facets/ChefFacet.sol/contract.ChefFacet.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
2 changes: 1 addition & 1 deletion
2
...src/src/dollar/facets/CollectableDustFacet.sol/contract.CollectableDustFacet.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
2 changes: 1 addition & 1 deletion
2
...ts/docs/src/src/dollar/facets/CreditClockFacet.sol/contract.CreditClockFacet.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
2 changes: 1 addition & 1 deletion
2
...c/src/dollar/facets/CreditNftManagerFacet.sol/contract.CreditNftManagerFacet.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
2 changes: 1 addition & 1 deletion
2
...NftRedemptionCalculatorFacet.sol/contract.CreditNftRedemptionCalculatorFacet.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
2 changes: 1 addition & 1 deletion
2
...CreditRedemptionCalculatorFacet.sol/contract.CreditRedemptionCalculatorFacet.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
2 changes: 1 addition & 1 deletion
2
...llar/facets/CurveDollarIncentiveFacet.sol/contract.CurveDollarIncentiveFacet.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
2 changes: 1 addition & 1 deletion
2
...acts/docs/src/src/dollar/facets/DiamondCutFacet.sol/contract.DiamondCutFacet.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
2 changes: 1 addition & 1 deletion
2
.../docs/src/src/dollar/facets/DiamondLoupeFacet.sol/contract.DiamondLoupeFacet.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
2 changes: 1 addition & 1 deletion
2
.../facets/DirectGovernanceFarmerFacet.sol/contract.DirectGovernanceFarmerFacet.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
2 changes: 1 addition & 1 deletion
2
...llar/facets/DollarMintCalculatorFacet.sol/contract.DollarMintCalculatorFacet.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
2 changes: 1 addition & 1 deletion
2
...c/src/dollar/facets/DollarMintExcessFacet.sol/contract.DollarMintExcessFacet.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
2 changes: 1 addition & 1 deletion
2
.../contracts/docs/src/src/dollar/facets/ManagerFacet.sol/contract.ManagerFacet.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
2 changes: 1 addition & 1 deletion
2
...tracts/docs/src/src/dollar/facets/OwnershipFacet.sol/contract.OwnershipFacet.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
2 changes: 1 addition & 1 deletion
2
.../contracts/docs/src/src/dollar/facets/StakingFacet.sol/contract.StakingFacet.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
2 changes: 1 addition & 1 deletion
2
...src/src/dollar/facets/StakingFormulasFacet.sol/contract.StakingFormulasFacet.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
2 changes: 1 addition & 1 deletion
2
.../docs/src/src/dollar/facets/UbiquityPoolFacet.sol/contract.UbiquityPoolFacet.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
2 changes: 1 addition & 1 deletion
2
...s/docs/src/src/dollar/interfaces/IAccessControl.sol/interface.IAccessControl.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
2 changes: 1 addition & 1 deletion
2
...cts/docs/src/src/dollar/interfaces/IBondingCurve.sol/interface.IBondingCurve.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
2 changes: 1 addition & 1 deletion
2
...contracts/docs/src/src/dollar/interfaces/ICreditNft.sol/interface.ICreditNft.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
2 changes: 1 addition & 1 deletion
2
.../src/src/dollar/interfaces/ICreditNftManager.sol/interface.ICreditNftManager.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
2 changes: 1 addition & 1 deletion
2
.../ICreditNftRedemptionCalculator.sol/interface.ICreditNftRedemptionCalculator.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
2 changes: 1 addition & 1 deletion
2
...rfaces/ICreditRedemptionCalculator.sol/interface.ICreditRedemptionCalculator.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
2 changes: 1 addition & 1 deletion
2
...cts/docs/src/src/dollar/interfaces/ICurveFactory.sol/interface.ICurveFactory.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
54 changes: 54 additions & 0 deletions
54
...interfaces/ICurveStableSwapFactoryNG.sol/interface.ICurveStableSwapFactoryNG.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,54 @@ | ||
# ICurveStableSwapFactoryNG | ||
[Git Source](https://github.com/ubiquity/ubiquity-dollar/blob/b59512059f70e70f7d719ba196d6f1f9322569a0/src/dollar/interfaces/ICurveStableSwapFactoryNG.sol) | ||
|
||
Factory allows the permissionless deployment of up to | ||
eight-coin plain pools (ex: DAI-USDT-USDC) and metapools (ex: USDT-3CRV). | ||
Liquidity pool and LP token share the same contract. | ||
|
||
|
||
## Functions | ||
### deploy_metapool | ||
|
||
Deploys a stableswap NG metapool | ||
|
||
|
||
```solidity | ||
function deploy_metapool( | ||
address _base_pool, | ||
string memory _name, | ||
string memory _symbol, | ||
address _coin, | ||
uint256 _A, | ||
uint256 _fee, | ||
uint256 _offpeg_fee_multiplier, | ||
uint256 _ma_exp_time, | ||
uint256 _implementation_idx, | ||
uint8 _asset_type, | ||
bytes4 _method_id, | ||
address _oracle | ||
) external returns (address); | ||
``` | ||
**Parameters** | ||
|
||
|Name|Type|Description| | ||
|----|----|-----------| | ||
|`_base_pool`|`address`|Address of the base pool to pair the token with. For tripool (DAI-USDT-USDC) use its pool address at 0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7.| | ||
|`_name`|`string`|Name of the new metapool, ex: `Dollar/3CRV`| | ||
|`_symbol`|`string`|Symbol for the new metapool’s LP token - will be concatenated with the base pool symbol, ex: `Dollar3CRV`| | ||
|`_coin`|`address`|Address of the coin being used in the metapool, ex: use Dollar token address| | ||
|`_A`|`uint256`|Amplification coefficient. If set to 0 then bonding curve acts like Uniswap. Any >0 value makes the bonding curve to swap at 1:1 constant price, the more `_A` the longer the constant price period. Curve recommends set it to 100 for crypto collateralizard stablecoins. This parameter can be updated later.| | ||
|`_fee`|`uint256`|Trade fee, given as an integer with 1e10 precision, ex: 40000000 = 0.04% fee| | ||
|`_offpeg_fee_multiplier`|`uint256`|Off-peg multiplier. Curve recommends set it to `20000000000`. This parameter can be updated later. More info: https://docs.curve.fi/stableswap-exchange/stableswap-ng/pools/overview/#dynamic-fees| | ||
|`_ma_exp_time`|`uint256`|MA time; set as time_in_seconds / ln(2), ex: 866 = 600 seconds, 2597 = 1800 seconds. This parameter can be updated later.| | ||
|`_implementation_idx`|`uint256`|Index of the metapool implementation to use. Can be retrieved via `ICurveStableSwapFactoryNG.metapool_implementations()`. There is only 1 metapool implementation right now so use index `0`.| | ||
|`_asset_type`|`uint8`|Asset type of the pool as an integer. Available asset type indexes: - 0: Standard ERC20 token with no additional features - 1: Oracle - token with rate oracle (e.g. wstETH) - 2: Rebasing - token with rebase (e.g. stETH) - 3: ERC4626 - token with convertToAssets method (e.g. sDAI) Dollar is a standard ERC20 token so we should use asset type with index `0`.| | ||
|`_method_id`|`bytes4`|First four bytes of the Keccak-256 hash of the function signatures of the oracle addresses that give rate oracles. This is applied only to asset type `1` (Oracle). For Dollar token deployment set empty.| | ||
|`_oracle`|`address`|Rate oracle address. This is applied only to asset type `1` (Oracle). For Dollar token deployment set empty address.| | ||
|
||
**Returns** | ||
|
||
|Name|Type|Description| | ||
|----|----|-----------| | ||
|`<none>`|`address`|Deployed metapool address| | ||
|
||
|
Oops, something went wrong.