-
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
Showing
7 changed files
with
159 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,6 +140,7 @@ | |
"twap", | ||
"typechain", | ||
"TYPEHASH", | ||
"Twocrypto", | ||
"Ubiqui", | ||
"UbiquiStick", | ||
"Unassigns", | ||
|
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
20 changes: 20 additions & 0 deletions
20
packages/contracts/src/dollar/interfaces/ICurveTwocryptoOptimized.sol
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,20 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.19; | ||
|
||
import {ICurveStableSwapMetaNG} from "./ICurveStableSwapMetaNG.sol"; | ||
|
||
/** | ||
* @notice Curve's CurveTwocryptoOptimized interface | ||
* | ||
* @dev Differences between Curve's crypto and stable swap meta pools (and how Ubiquity organization uses them): | ||
* 1. They contain different tokens: | ||
* a) Curve's stable swap metapool containts Dollar/3CRVLP pair | ||
* b) Curve's crypto pool contains Governance/ETH pair | ||
* 2. They use different bonding curve shapes: | ||
* a) Curve's stable swap metapool is more straight (because underlying tokens are pegged to USD) | ||
* b) Curve's crypto pool resembles Uniswap's bonding curve (because underlying tokens are not USD pegged) | ||
* | ||
* @dev Basically `ICurveTwocryptoOptimized` has the same interface as `ICurveStableSwapMetaNG` | ||
* but we distinguish them in the code for clarity. | ||
*/ | ||
interface ICurveTwocryptoOptimized is ICurveStableSwapMetaNG {} |
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
15 changes: 15 additions & 0 deletions
15
packages/contracts/src/dollar/mocks/MockCurveTwocryptoOptimized.sol
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,15 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.19; | ||
|
||
import {ICurveTwocryptoOptimized} from "../interfaces/ICurveTwocryptoOptimized.sol"; | ||
import {MockCurveStableSwapMetaNG} from "./MockCurveStableSwapMetaNG.sol"; | ||
|
||
contract MockCurveTwocryptoOptimized is | ||
ICurveTwocryptoOptimized, | ||
MockCurveStableSwapMetaNG | ||
{ | ||
constructor( | ||
address _token0, | ||
address _token1 | ||
) MockCurveStableSwapMetaNG(_token0, _token1) {} | ||
} |
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