Skip to content

Commit

Permalink
Merge pull request #421 from ambrosus/enable-bridge-fee
Browse files Browse the repository at this point in the history
chore(relay/fee): set bridge fee to 0 for prod and test nets
  • Loading branch information
nacknime-official authored Dec 5, 2022
2 parents 10bfdd3 + 4a96194 commit 4881580
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions relay/configs/prod-bsc.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"endpoint": "/fees",
"amb": {
"privateKey": "in env",
"minBridgeFeeUSD": 5,
"minBridgeFeeUSD": 0,
"minTransferFeeUSD": 1,
"explorerURL": "https://explorer-api.ambrosus.io",
"transferFeeRecipient": "0x",
Expand All @@ -63,7 +63,7 @@
},
"side": {
"privateKey": "in env",
"minBridgeFeeUSD": 5,
"minBridgeFeeUSD": 0,
"minTransferFeeUSD": 0.5,
"explorerURL": "https://api.bscscan.com/api?apikey=NFH875QU828E37MQD7XB3QHFBE4XTC2AKH",
"transferFeeRecipient": "0x",
Expand Down
4 changes: 2 additions & 2 deletions relay/configs/prod-eth.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"endpoint": "/fees",
"amb": {
"privateKey": "in env",
"minBridgeFeeUSD": 5,
"minBridgeFeeUSD": 0,
"minTransferFeeUSD": 10,
"explorerURL": "https://explorer-api.ambrosus.io",
"transferFeeRecipient": "0x",
Expand All @@ -87,7 +87,7 @@
},
"side": {
"privateKey": "in env",
"minBridgeFeeUSD": 5,
"minBridgeFeeUSD": 0,
"minTransferFeeUSD": 0.5,
"explorerURL": "https://api.etherscan.io/api?apikey=DY4Z86MQ2D9E24C6HB98PTA79EKJ5TQIFX",
"transferFeeRecipient": "0x",
Expand Down
4 changes: 2 additions & 2 deletions relay/configs/test-bsc.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"endpoint": "/fees",
"amb": {
"privateKey": "in env",
"minBridgeFeeUSD": 5,
"minBridgeFeeUSD": 0,
"minTransferFeeUSD": 1,
"explorerURL": "https://explorer-api.ambrosus-test.io",
"transferFeeRecipient": "0x",
Expand All @@ -69,7 +69,7 @@
},
"side": {
"privateKey": "in env",
"minBridgeFeeUSD": 5,
"minBridgeFeeUSD": 0,
"minTransferFeeUSD": 0.5,
"explorerURL": "https://api-testnet.bscscan.com/api?apikey=NFH875QU828E37MQD7XB3QHFBE4XTC2AKH",
"transferFeeRecipient": "0x",
Expand Down
4 changes: 2 additions & 2 deletions relay/configs/test-eth.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"endpoint": "/fees",
"amb": {
"privateKey": "in env",
"minBridgeFeeUSD": 5,
"minBridgeFeeUSD": 0,
"minTransferFeeUSD": 1,
"explorerURL": "https://explorer-api.ambrosus-test.io",
"transferFeeRecipient": "0x",
Expand All @@ -88,7 +88,7 @@
},
"side": {
"privateKey": "in env",
"minBridgeFeeUSD": 5,
"minBridgeFeeUSD": 0,
"minTransferFeeUSD": 0.5,
"explorerURL": "https://api-sepolia.etherscan.io/api?apikey=DY4Z86MQ2D9E24C6HB98PTA79EKJ5TQIFX",
"transferFeeRecipient": "0x",
Expand Down
3 changes: 1 addition & 2 deletions relay/internal/service_fee/fee/fee_bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import (
)

var percentFromAmount = map[uint64]int64{
0: 1.0 * 100, // 0..100_000$ => 1%
100_000: 0.5 * 100, // 100_000...$ => 0.5%
0: 0.0 * 100, // 0.. ...$ => 0%
}

func getBridgeFee(nativeUsdPrice, tokenUsdPrice, amount, minBridgeFee decimal.Decimal) (decimal.Decimal, error) {
Expand Down

0 comments on commit 4881580

Please sign in to comment.