Near

Overview

NEAR Protocol is a decentralized blockchain platform designed to enable the creation and operation of scalable, high-performance decentralized applications (dApps). Utilizing a proof-of-stake (PoS) consensus mechanism, NEAR Protocol offers fast transaction finality and low transaction fees, making it suitable for a wide range of use cases.

NEAR is the native asset of the Near Protocol blockchain platform. It serves various purposes within the NEAR Protocol ecosystem, including transaction fees, staking, and governance. It utilizes the Account model.

Explorer

https://nearblocks.io/

Ticker Symbols

MainnetTestnet
NEARTNEAR

Wallets Types

BitGo enables holding Near in the following wallet types:

Multisig ColdMultisig HotMPC ColdMPC Hot
CustodyN//AN/A
Self-CustodyN/A

Faucet

Follow these steps to get NEAR testnet tokens:

  1. Create a <username>.testnet wallet address on https://testnet.mynearwallet.com/
  2. Get testnet tokens from https://near-faucet.io/ in the <username>.testnet wallet address created in step 1.
  3. Send the testnet tokens from <username>.testnet wallet to the BitGo Test wallet.

Units

The base unit of Near is yocto.

  • 1 near = 1024 yocto
  • 1 yocto = 10-24 near

To check the balance of a wallet:

  • JavaScript
1 2 3 4 5 6 7 const walletInstance = await bitgo.coin(coin).wallets().get({ id: walletId }); console.log('Wallet ID:', walletInstance.id()); console.log('Current Receive Address:', walletInstance.receiveAddress()); console.log('Balance:', walletInstance.balanceString()); console.log('Confirmed Balance:', walletInstance.confirmedBalanceString()); console.log('Spendable Balance:', walletInstance.spendableBalanceString());

Tokens

The Near Protocol blockchain natively support tokens. To view all BitGo supported tokens on the Near Protocol Blockchain, see the Near - NEP141 Tokens.

Overview

BitGo wallets support fungible tokens on the NEAR protocol, adhering to the NEP-141 token standard. NEP-141 is the official Fungible Token (FT) standard on the NEAR Protocol, defining a common interface for fungible token contracts. This standard ensures interoperability across decentralized applications (dApps), wallets, and other ecosystem tools by mandating a consistent set of methods and behaviors.

Key aspects of NEP-141 include:

  • Token Operations: It defines methods such as ft_transfer, ft_transfer_call, and ft_balance_of, which are essential for sending tokens, interacting with contracts, and querying balances. The standard includes callback mechanisms to handle transactional logic safely, especially for cross-contract calls using ft_transfer_call.

  • Storage Management: NEAR uses a storage staking model, so NEP-141 incorporates methods like storage_deposit, storage_withdraw, and storage_balance_of to manage account storage costs. To receive a FT on an address, that address must be registered on that FT (this is done by doing a storage deposit).

  • Metadata Management: An interface for a fungible token's metadata. The goal is to keep the metadata future-proof as well as lightweight.

For the complete list of tokens onboarded, refer to: Near - NEP141 Tokens.

Enable Token

NEAR enforces a storage staking model, meaning storage on-chain costs real NEAR tokens (Ⓝ) to maintain. Smart contracts must ensure they have sufficient balance to cover the storage they use; otherwise, they may run out of funds or exceed gas limits during execution.

The storage_deposit method is a payable function defined in NEP-141 (Fungible Token standard) that allows users to attach NEAR when interacting with a contract. This deposit reserves storage space for user-specific data, such as:

  • Account registration
  • Token balances
  • Any other data the contract needs to store on behalf of the user

⚠️ Users must call storage_deposit before receiving or transferring tokens on a contract, or their transaction will fail.

How to Execute the storage_deposit Method for a BitGo Account

Most platforms that send NEAR tokens initiate the storage_deposit along with the token transfer in the same transaction.

  • If the account is not registered, the sender must pay a small fee for registration.
  • If the account is already registered, the registration fee is refunded to the sender.

The Enable Tokens flow allows BitGo accounts/addresses to be registered with the fungible token contracts by calling storage_deposit.

To enable a token for a BitGo account:

  1. Go to your Near wallet
  2. Navigate to Settings
  3. Click on the Enable Token option
  4. Select the token and the BitGo address
  5. Sign or raise the transaction to complete the registration

Note:

  • The storage deposit enablement incurs a cost of approximately 0.00125 Ⓝ.
  • It is recommended that users enable the token for the root address of their wallets.
  • Failure to enable storage deposit may lead to consolidation transfer failures.
  • If you encounter deposit failures of NEAR tokens to an address:
    • Ensure the token is supported by BitGo
    • Enable storage_deposit for the respective token on that address

How to Do a Consolidation for NEAR and NEAR Tokens

To consolidate your receive address balances into the root address using the UI:

  1. Go to the Wallet and then the Address page
  2. Click on the three-dot menu next to the address
  3. Select Consolidate Balances
  4. Choose the coin:
    • NEAR
    • Or a NEAR token like near:usdt, near:usdc

Gas Tank

To consolidate NEAR tokens from a receive address, the address must hold some NEAR to pay the transaction fee.

NEAR wallets on BitGo utilize a Gas Tank to cover token consolidation fees — but not other transaction fees.

  • The estimated gas required for a token consolidation transaction is approximately 0.000612 Ⓝ (actual usage may be lower).
  • Therefore, each receive address must maintain at least 0.000612 Ⓝ per unique token that is to be consolidated.

When a receive address receives a token deposit, the Gas Tank:

  • Calculates the amount of NEAR required for consolidation
  • Initiates a transaction to fund the address with the calculated differential amount

Example Scenarios:

  • ✅ If a receive address gets USDC and has 0 Ⓝ: → Gas Tank will fund it with 0.052612 Ⓝ 0.052 Ⓝ is the one-time reserve fee, 0.000612 Ⓝ is the per-token consolidation fee

  • ✅ If a receive address gets USDC and already has 0.052 Ⓝ: → Gas Tank will fund it with 0.000612 Ⓝ

  • ✅ If a receive address gets USDC and USDT and has 0 Ⓝ: → Gas Tank will fund it with 0.053224 Ⓝ 0.052 Ⓝ for reserve + 0.001224 Ⓝ for 2 tokens

  • ✅ If a receive address gets USDC and USDT and has 0.053 Ⓝ: → Gas Tank will fund it with 0.000224 Ⓝ

Note:

  • The Gas Tank funds receive addresses only when a token deposit is detected to a NEAR wallet address under the enterprise and the gas tank has sufficient funds.
  • If the gas tank balance is low, the funding action will fail.
  • Replenishing the Gas Tank does not automatically fund affected receive addresses. → Users must manually deposit NEAR to any impacted address.
  • BitGo recommends maintaining a minimum Gas Tank balance of 1 Ⓝ.
  • Users will receive a low balance notification once in 24 hours when the gas tank drops below 1 Ⓝ.

Fees

On every transaction you send to the network NEAR charges a fee (aka gas fee). Fees are measured in gas units but paid in NEAR. Gas units are deterministic, the same transaction costs the same gas units. Gas units are transformed to NEAR by multiplying with a gas price.

  • Min. gas price = 10-16 NEAR per gas unit
  • 1 TGas (10¹² gas units) ≈ 1 ms of "compute" time. ≈ 0.0001 NEAR
  • The gas price is not fixed: it is recalculated each block depending on network demand. If the previous block is more than half full the price goes up, otherwise it goes down. The price cannot change by more than 1% each block.
  • A maximum of 300 TGas can be attached to a transaction.
  • Attaching extra gas does NOT make the transaction faster, unused gas is simply returned.

Learn more about fees at Near docs.

Create Wallet

  • cURL
  • JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 export BITGO_EXPRESS_HOST="<YOUR_LOCALHOST>" export COIN="[testnet ID all lowercase]" export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>" export LABEL="<DESIRED_WALLET_NAME>" export PASSPHRASE="<YOUR_BITGO_LOGIN_PASSPHRASE>" export ENTERPRISE_ID="<YOUR_ENTERPRISE_ID>" export MULTISIGTYPE="tss" curl -X POST \ http://$BITGO_EXPRESS_HOST/api/v2/$COIN/wallet/generate \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -d '{ "label": "'"$LABEL"'", "passphrase": "'"$PASSPHRASE"'", "enterprise": "'"$ENTERPRISE_ID"'", "disableTransactionNotifications": true, "disableKRSEmail": true, "multisigType": "'"$MULTISIGTYPE"'" }'

Create Address

  • cURL
  • JavaScript
1 2 3 4 5 WALLET=585c51a5df8380e0e3082e46 curl -X POST \ -H "Authorization: Bearer $ACCESS_TOKEN" \ https://app.bitgo-test.com/api/v2/tnear/wallet/$WALLET/address

Consolidate Balance

Near is an account-based asset and therefore requires consolidating to the base address in order to use the maximum spendable amount.

Note: Near addresses require a minimum balance of ~0.052 NEAR. This amount remains in the address after consolidation.

Estimate Fee

  • cURL
  • JavaScript
1 2 3 4 5 6 7 export COIN="tnear" export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>" curl -X GET \ https://app.bitgo-test.com/api/v2/$COIN/tx/fee \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $ACCESS_TOKEN"

Transact

  • cURL
  • JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 export BITGO_EXPRESS_HOST="<YOUR_LOCALHOST>" export COIN="tnear" export WALLET_ID="<YOUR_WALLET_ID>" export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>" export ADDRESS_1="<DESTINATION_ADDRESS_1>" export ADDRESS_2="<DESTINATION_ADDRESS_2>" export AMOUNT_1="<AMOUNT_1_IN_BASE_UNITS>" export AMOUNT_2="<AMOUNT_2_IN_BASE_UNITS>" export WALLET_PASSPHRASE="<YOUR_WALLET_PASSPHRASE>" curl -X POST \ http://$BITGO_EXPRESS_HOST/api/v2/$COIN/wallet/$WALLET_ID/sendmany \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -d '{ "recipients": [ { "address": "'"$ADDRESS_1"'", "amount": "'"$AMOUNT_1"'" }, { "address": "'"$ADDRESS_2"'", "amount": "'"$AMOUNT_2"'" } ], "walletPassphrase": "'"$WALLET_PASSPHRASE"'", "type": "transfer", "isTss": "true" }'

Stake

For details specific to staking NEAR tokens, see the tables below:

AmountsDetails
MinimumNone
Maximum coin supply1,000,000,000 NEAR
Are staked assets locked or liquid?Locked
FeesWithdraw from wallet balance

TimelineDetails
Activation period4 epochs (36 hours)
Unstaking period3 epochs (27 hours)

RewardsDetails
Rewards rateDecided by each validtor
On-chain transactions for reward distributions?No
Supports withdrawing rewards only?Yes
Requires transaction to claim rewards?Yes

ValidatorsDetails
Bring your own validator?Yes
Stake to multiple validators simultaneously?No
Stake multiple times to the same delegation?Yes
Figment support?No
Slashing?No

IntegrationDetails
Required transactionsDelegation and redelegation
Do staked assets leave wallet?No
Number of transactions to unstake1
Supports partial unstaking?Yes

See Also