This repository has been archived by the owner on Jul 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 465
ERC20BridgeSampler: Additional Buy support #2551
Merged
Merged
Conversation
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
dekz
changed the title
ERC20BridgeSampler: Sample Curve Buy
ERC20BridgeSampler: Additional Buy support
Apr 16, 2020
dekz
force-pushed
the
feature/curve/sample-buys
branch
from
April 16, 2020 06:46
a848839
to
cb6ba5d
Compare
dekz
requested review from
dorothy-zbornak and
moodlezoup
and removed request for
dorothy-zbornak
April 16, 2020 21:49
dekz
requested review from
abandeali1,
BMillman19,
dave4506,
fragosti and
hysz
as code owners
April 17, 2020 02:53
dekz
force-pushed
the
feature/curve/sample-buys
branch
6 times, most recently
from
April 18, 2020 03:08
763516b
to
9375947
Compare
dekz
force-pushed
the
feature/curve/sample-buys
branch
from
April 18, 2020 03:11
9375947
to
f08a76f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THOUGHTS
Comment on lines
+25
to
+32
ERC20BridgeSource.Uniswap, | ||
ERC20BridgeSource.Eth2Dai, | ||
ERC20BridgeSource.Kyber, | ||
// All Curve sources | ||
ERC20BridgeSource.CurveUsdcDai, | ||
ERC20BridgeSource.CurveUsdcDaiUsdt, | ||
ERC20BridgeSource.CurveUsdcDaiUsdtBusd, | ||
ERC20BridgeSource.CurveUsdcDaiUsdtTusd, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
packages/asset-swapper/src/utils/market_operation_utils/sampler_operations.ts
Show resolved
Hide resolved
contracts/erc20-bridge-sampler/contracts/src/ERC20BridgeSampler.sol
Outdated
Show resolved
Hide resolved
contracts/erc20-bridge-sampler/contracts/src/ERC20BridgeSampler.sol
Outdated
Show resolved
Hide resolved
packages/asset-swapper/src/utils/market_operation_utils/sampler_operations.ts
Outdated
Show resolved
Hide resolved
packages/asset-swapper/src/utils/market_operation_utils/sampler_operations.ts
Outdated
Show resolved
Hide resolved
dorothy-zbornak
approved these changes
Apr 21, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
feuGeneA
pushed a commit
that referenced
this pull request
Apr 21, 2020
* ERC20BridgeSampler: Sample Curve Buy * Fake Buy Kyber/PLP * Deploy mainnet * Add Kyber rates for buy tests * CHANGELOGs * Provide maxIterations and targetSlippage as options * Cleanup ERC20BridgeSampler for re-use * Redeploy Mainnet Kovan * Feedback fixes * Handle OOG/revert 0s * Redeploy Mainnet refactor
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Samples Curve with the
get_dx_underlying
now available on all Curves.Samples
Kyber
andPLP
by walking up to thesellAmount
bydelta * 1.0005
increments from the previous sample. Allows for0.0005
slippage from the target buy amount. Interpolates the price up/down from the last (close-ish) sample. These options are configurable by the caller.