87 lines
2.6 KiB
Go
87 lines
2.6 KiB
Go
package tokens
|
|
|
|
import (
|
|
"github.com/ethereum/go-ethereum/common"
|
|
)
|
|
|
|
// ArbitrumTokens contains the addresses of popular tokens on Arbitrum
|
|
type ArbitrumTokens struct {
|
|
WETH common.Address
|
|
USDC common.Address
|
|
USDT common.Address
|
|
ARB common.Address
|
|
WBTC common.Address
|
|
DAI common.Address
|
|
LINK common.Address
|
|
UNI common.Address
|
|
GMX common.Address
|
|
GRT common.Address
|
|
}
|
|
|
|
// GetArbitrumTokens returns the addresses of popular tokens on Arbitrum
|
|
func GetArbitrumTokens() *ArbitrumTokens {
|
|
return &ArbitrumTokens{
|
|
WETH: common.HexToAddress("0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"), // Wrapped Ether
|
|
USDC: common.HexToAddress("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"), // USD Coin (bridged)
|
|
USDT: common.HexToAddress("0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"), // Tether USD
|
|
ARB: common.HexToAddress("0x912CE59144191C1204E64559FE8253a0e49E6548"), // Arbitrum Token
|
|
WBTC: common.HexToAddress("0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f"), // Wrapped Bitcoin
|
|
DAI: common.HexToAddress("0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"), // Dai Stablecoin
|
|
LINK: common.HexToAddress("0xf97f4df75117a78c1A5a0DBb814Af92458539FB4"), // ChainLink Token
|
|
UNI: common.HexToAddress("0xFa7F8980b0f1E64A2062791cc3b0871572f1F7f0"), // Uniswap
|
|
GMX: common.HexToAddress("0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a"), // GMX
|
|
GRT: common.HexToAddress("0x9623063377AD1B27544C965cCd7342f7EA7e88C7"), // The Graph
|
|
}
|
|
}
|
|
|
|
// GetTriangularPaths returns common triangular arbitrage paths on Arbitrum
|
|
func GetTriangularPaths() []TriangularPath {
|
|
tokens := GetArbitrumTokens()
|
|
|
|
return []TriangularPath{
|
|
{
|
|
Name: "USDC-WETH-WBTC-USDC",
|
|
Tokens: []common.Address{tokens.USDC, tokens.WETH, tokens.WBTC},
|
|
},
|
|
{
|
|
Name: "USDC-WETH-ARB-USDC",
|
|
Tokens: []common.Address{tokens.USDC, tokens.WETH, tokens.ARB},
|
|
},
|
|
{
|
|
Name: "WETH-USDC-USDT-WETH",
|
|
Tokens: []common.Address{tokens.WETH, tokens.USDC, tokens.USDT},
|
|
},
|
|
{
|
|
Name: "USDC-DAI-USDT-USDC",
|
|
Tokens: []common.Address{tokens.USDC, tokens.DAI, tokens.USDT},
|
|
},
|
|
{
|
|
Name: "WETH-ARB-GMX-WETH",
|
|
Tokens: []common.Address{tokens.WETH, tokens.ARB, tokens.GMX},
|
|
},
|
|
{
|
|
Name: "USDC-LINK-WETH-USDC",
|
|
Tokens: []common.Address{tokens.USDC, tokens.LINK, tokens.WETH},
|
|
},
|
|
}
|
|
}
|
|
|
|
// TriangularPath represents a triangular arbitrage path
|
|
type TriangularPath struct {
|
|
Name string
|
|
Tokens []common.Address
|
|
}
|
|
|
|
// GetMostLiquidTokens returns the most liquid tokens for market scanning
|
|
func GetMostLiquidTokens() []common.Address {
|
|
tokens := GetArbitrumTokens()
|
|
return []common.Address{
|
|
tokens.WETH,
|
|
tokens.USDC,
|
|
tokens.USDT,
|
|
tokens.ARB,
|
|
tokens.WBTC,
|
|
tokens.DAI,
|
|
}
|
|
}
|