No More Malicious Addresses: MyNearWallet to Implement HAPI Risk Scoring

Kate Kharitonova
MyNearWallet Blog
Published in
3 min readOct 26, 2022

One of the most common fears among newbies who have just joined Web3 world is to occasionally send money to scammers or enter your seed phrase on the wrong site and lose it all. Unfortunately, the more popularity blockchain gains, the more scammers are there, and NEAR is no exception. Even though all of this might sound pretty disappointing, there is a solution to this problem. It’s called HAPI risk scoring, and MyNearWallet is about to implement it. The feature is already available on testnet.

What is HAPI risk scoring?

HAPI is an on-chain security protocol that prevents users from interacting with malicious addresses. The HAPI team gathers all of these addresses and puts them in one big database. When users try to send their money somewhere, an address gets checked with the database. If one tries to send funds to a hacker or to somehow interact with a malicious website, one gets a pop-up notification or an alert that warns the user of a risky transaction. That’s how it’s going to work on MyNearWallet.

That’s how the notifications from MyNearWallet will look like

Also, users can report suspicious addresses to HAPI. “We are whitelisting reporters so that they can report addresses. These are mostly executives or specific compliance officers of a project (DeFi or Cefi)”, shared HAPI COO Irakliy Dizenko.

Check the NEAR list of scammers here.

Currently, this service is free, but in the future, when the number of users reaches a certain point, there will be small fees in HAPI tokens for joining the protocol.

How does it work?

The transactions are defined either as risky or non-risky. This conclusion is reached by summing up the two scores listed below: the reputation score and the tier score. When the total score exceeds a certain threshold, the operation is considered to be risky.

The tier score

HAPI categorizes different addresses based on their datasets. Check the 5 safety tiers defined by the project team in the picture. The exact points and classification might be subject to change.

HAPI Safety Tiers

The reputation score

The reputation score is calculated by considering:

  • The total amount of user transactions
  • The percentage of risky transactions (transactions with risky addresses, etc)
  • The number of categories from the tier score where an address can
  • If an address is currently banned from interacting with some Web3 projects (CEX, DEX, or DeFi)
  • If an address or transaction is under meticulous investigation by the HAPI governance system and its members

The average score

“To appraise an address we utilize several data points from our data providers and aggregate all of it. Reputation score threshold and risk category allowance may be tweaked depending on demands/requirements from a project”, commented HAPI COO Irakliy Dizenko. The data for both cases is provided by Chainalysis, Crystal Blockchain, and the HAPI cybersecurity department called HAPI Labs. If there has been a mistake, an address can be redeemed via a governance forum.

The solution might be implemented via API or Smart contract.

--

--