Skip to content

Commit

Permalink
Add OFAC blocking of ETH addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
ValarDragon committed Dec 9, 2021
1 parent 8ba7fb0 commit db450f0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
See: [SDK v0.43.0 Release Notes](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.43.0) For more details
* [\#610](https://github.com/osmosis-labs/osmosis/pull/610) Upgrade to IBC-v2
* [\#394](https://github.com/osmosis-labs/osmosis/pull/394) Allow whitelisted tx fee tokens based on conversion rate to OSMO
* Add blocking of OFAC banned Ethereum addresses

## Minor improvements & Bug Fixes

Expand Down
34 changes: 34 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"net/http"
"os"
"path/filepath"
"strings"

"github.com/rakyll/statik/fs"
"github.com/spf13/cast"
Expand Down Expand Up @@ -775,6 +776,39 @@ func (app *OsmosisApp) BlockedAddrs() map[string]bool {
blockedAddrs[authtypes.NewModuleAddress(acc).String()] = !allowedReceivingModAcc[acc]
}

// We block all OFAC-blocked ETH addresses from receiving tokens as well
// The list is sourced from: https://www.treasury.gov/ofac/downloads/sanctions/1.0/sdn_advanced.xml
ofacRawEthAddrs := []string{
"0x7F367cC41522cE07553e823bf3be79A889DEbe1B",
"0xd882cfc20f52f2599d84b8e8d58c7fb62cfe344b",
"0x901bb9583b24d97e995513c6778dc6888ab6870e",
"0xa7e5d5a720f06526557c513402f2e6b5fa20b008",
"0x8576acc5c05d6ce88f4e49bf65bdf0c62f91353c",
"0x1da5821544e25c636c1417ba96ade4cf6d2f9b5a",
"0x7Db418b5D567A4e0E8c59Ad71BE1FcE48f3E6107",
"0x72a5843cc08275C8171E582972Aa4fDa8C397B2A",
"0x7F19720A857F834887FC9A7bC0a0fBe7Fc7f8102",
"0x9f4cda013e354b8fc285bf4b9a60460cee7f7ea9",
"0x3cbded43efdaf0fc77b9c55f6fc9988fcc9b757d",
"0x2f389ce8bd8ff92de3402ffce4691d17fc4f6535",
"0x19aa5fe80d33a56d56c78e82ea5e50e5d80b4dff",
"0xe7aa314c77f4233c18c6cc84384a9247c0cf367b",
"0x308ed4b7b49797e1a98d3818bff6fe5385410370",
"0x2f389ce8bd8ff92de3402ffce4691d17fc4f6535",
"0x19aa5fe80d33a56d56c78e82ea5e50e5d80b4dff",
"0x67d40EE1A85bf4a4Bb7Ffae16De985e8427B6b45",
"0x6f1ca141a28907f78ebaa64fb83a9088b02a8352",
"0x6acdfba02d390b97ac2b2d42a63e85293bcc160e",
"0x48549a34ae37b12f6a30566245176994e17c6b4a",
"0x5512d943ed1f7c8a43f3435c85f7ab68b30121b0",
"0xc455f7fd3e0e12afd51fba5c106909934d8a0e4a",
"0xfec8a60023265364d066a1212fde3930f6ae8da7",
}
for _, addr := range ofacRawEthAddrs {
blockedAddrs[addr] = true
blockedAddrs[strings.ToLower(addr)] = true
}

return blockedAddrs
}

Expand Down

0 comments on commit db450f0

Please sign in to comment.