Skip to content

enable eth and usdc.eth on mainnet#2013

Merged
chappjc merged 9 commits into
decred:masterfrom
chappjc:eth-mainnet
Feb 24, 2023
Merged

enable eth and usdc.eth on mainnet#2013
chappjc merged 9 commits into
decred:masterfrom
chappjc:eth-mainnet

Conversation

@chappjc

@chappjc chappjc commented Dec 30, 2022

Copy link
Copy Markdown
Member

@chappjc

This comment was marked as resolved.

@chappjc chappjc added this to the 0.6 milestone Jan 4, 2023
@chappjc chappjc added the ETH label Jan 4, 2023
@chappjc

chappjc commented Jan 10, 2023

Copy link
Copy Markdown
Member Author

@itswisdomagain and I will be a bit busy with #1986, #2036, and #2025 for the next several days, so if anyone wants to push this branch to their remote and work on it, that's fine with me.

@chappjc

This comment was marked as resolved.

Comment thread dex/networks/eth/tokens.go Outdated
@chappjc

chappjc commented Jan 11, 2023

Copy link
Copy Markdown
Member Author

Just pushed 5140620 to resolve #1733 (comment) (thank you @norwnd)

@chappjc

chappjc commented Jan 11, 2023

Copy link
Copy Markdown
Member Author

Just pushed 6aed724 to address observations from final review of #1733 (review)
Namely, extremely tight gas limits on the swap contract txns. Targeting actual use equal to 97% of gas limit was not nearly adequate. Some wallets will target 66.6% (150% buffer over estimateGas). This commit changes ours to about 130% (we should see actual of about 77% the limit in etherscan).

@chappjc

chappjc commented Jan 11, 2023

Copy link
Copy Markdown
Member Author

Also need to review and probably further pad the v0Gases used for ETH swaps. Last comment and commit pertains to ERC20.

@chappjc

chappjc commented Jan 11, 2023

Copy link
Copy Markdown
Member Author

Last commit 0abeb4e is in regard to #1733 (comment) and the new reality of the asset.Wallet interface established in f950443 (reasoning also stated at the time of review in #1866 (comment))

@chappjc chappjc force-pushed the eth-mainnet branch 3 times, most recently from c87d4ba to 6ae961e Compare January 26, 2023 21:13
Comment thread dex/testing/eth/create-node.sh Outdated
@chappjc

chappjc commented Jan 31, 2023

Copy link
Copy Markdown
Member Author

Dropped the commit for block poll interval fiddling with routable hosts (likely public provider). Leaving the compiler settable interval commit.

@chappjc chappjc force-pushed the eth-mainnet branch 2 times, most recently from cad2f42 to dd09bc5 Compare February 3, 2023 22:22
@chappjc chappjc force-pushed the eth-mainnet branch 5 times, most recently from 9c95fbf to c29fe5f Compare February 6, 2023 13:59
@chappjc

chappjc commented Feb 16, 2023

Copy link
Copy Markdown
Member Author

There are live gas estimate issues begin resolved in #2129 and #2118, but this PR has no more changes pending.

All the gases are verified with actual on-chain transactions, not just estimates.

@chappjc

chappjc commented Feb 16, 2023

Copy link
Copy Markdown
Member Author

Rebased and re-tested an ETH swap with DCR. Again the current ETHSwap contract is https://etherscan.io/address/0x8c17e4968b6903e1601be82ca989c5b5e2c7b400

@chappjc

chappjc commented Feb 18, 2023

Copy link
Copy Markdown
Member Author

Also re-tested with USDC mainnet. Contract is still https://etherscan.io/address/0x1bbd020ddd6dc01f974aa74d2d727b2a6782f32d#code%5C

@chappjc chappjc force-pushed the eth-mainnet branch 2 times, most recently from e3d4c73 to 3d51c27 Compare February 20, 2023 16:02
@martonp

martonp commented Feb 20, 2023

Copy link
Copy Markdown
Collaborator

I started a fresh dex, looked at the simnet exchange in view-only mode, had not yet tried to post any bonds, and I start seeing this log: Bond asset 0 not supported by DEX 127.0.0.1:17273

@chappjc

chappjc commented Feb 20, 2023

Copy link
Copy Markdown
Member Author

There's some hangover from view-only. That looks like another thing. Will look into that on the bond-reserves branch.
The other view-only related fix is in ae92a07

@chappjc

chappjc commented Feb 20, 2023

Copy link
Copy Markdown
Member Author

I don't quite get that error though if you didn't try to post any bonds (presumably didn't touch bond options either), I wonder why the view-only dex conn had targetTier > 0...

@chappjc chappjc force-pushed the eth-mainnet branch 2 times, most recently from d8ce193 to 82e78fa Compare February 21, 2023 23:07
@chappjc

chappjc commented Feb 22, 2023

Copy link
Copy Markdown
Member Author

I understand mainnet testing is a burden, so if there are troubles on that front we can chat on matrix and I can provide guidance.
Unless there are specific concerns about the contracts or the updates in this PR, I'd like to have this merged by EOW.

@chappjc

chappjc commented Feb 24, 2023

Copy link
Copy Markdown
Member Author

Ran another USDC swap today. Bad timing with gas (9am central is peak it seems), but otherwise it was fine.

@martonp Thanks for testing. You reported on matrix that it worked smoothly, correct?

@JoeGruffins has verified the contract source code via etherscan matches the contract in this PR. If one more person can also verify that, we can merge this.

https://etherscan.io/address/0x8c17e4968b6903e1601be82ca989c5b5e2c7b400#code#L1
https://etherscan.io/address/0x1bbd020ddd6dc01f974aa74d2d727b2a6782f32d#code#L1

@martonp martonp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested and it looks good to me!

@chappjc chappjc merged commit 1b05383 into decred:master Feb 24, 2023
@chappjc chappjc deleted the eth-mainnet branch February 24, 2023 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

eth and erc20: enable mainnet

4 participants