> For the complete documentation index, see [llms.txt](https://docs.sns.id/dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sns.id/dev/on-chain-resolution.md).

# On-Chain Resolution

## Resolve domains on Solana&#x20;

The flow outlined below is the logic used to resolve .sol domains.

#### Step 1: Check if the domain name is tokenized

* **Yes:** The correct destination of funds is the token holder
* **No:** Go to step 2

#### Step 2: Check the SOL record

* **If** The SOL record V2 is set and the staleness & RoA ID are verified, the public key specified in the record is the correct destination
* **Else if** the SOL record V1 is set and the signature is valid, the public key specified in the record is the correct destination. If the signature is invalid go to step 3
* **Else** go to step 3

#### Step 3: The correct destination of funds is the domain owner

If the domain is not tokenized, and there is no valid SOL record, then domain resolves to the wallet address holding the domain

<figure><img src="/files/cG72lxtYAK6AKWk3hBmy" alt=""><figcaption></figcaption></figure>

### FAQ <a href="#faq" id="faq"></a>

1. **What happens if funds are sent to the `NameRegistry` owner when the domain is tokenized?**

As long as the user owns the tokenized domains (i.e the NFT) they will be able to withdraw from the PDA escrow that received the funds. However, if for some reason the user does not own the NFT they won't be able to withdraw the funds.

2. **Why is there a signature in the SOL record V1?**

The SOL record V1 data contains a 96-byte array that is the concatenation of a public key (32 bytes) and signature (64 bytes). The first 32 bytes represent the public key (`pubkey`) to which funds should be sent and the next 64 bytes are the signature of `pubkey_as_bytes + record_key_as_bytes` signed by the owner of the domain. If the signature is invalid funds **must not** be transferred to the SOL record address.

The signature is required to prevent funds being sent to a stale SOL record after a domain has been transferred or sold to a new owner.
