Understanding dURLs
A deep dive into how decentralized URLs work in TELA, common misconceptions, and what to do when things don't go as planned.
Key Insight: A dURL is a human-friendly label, NOT a unique identifier. The SCID (Smart Contract ID) is the true identity of your application.
What is a dURL?
A dURL (Dero URL) is a human-readable name stored in your TELA contract, like myapp.tela or explorer.tela. It makes sharing and discovering applications easier than passing around 64-character SCIDs.
// Stored in your INDEX or DOC contract
33 STORE("dURL", "myapp.tela")The Common Misconception
Many developers assume dURLs work like traditional domain names:
| Traditional DNS | TELA dURLs |
|---|---|
| β Unique - only one owner per domain | β NOT unique - anyone can use any dURL |
| β Central registry (ICANN) | β No registry - fully decentralized |
| β Enforced ownership | β No enforcement - just a label |
| β Transfers between owners | β Each contract has its own dURL store |
Reality: Multiple INDEX contracts can have the exact same dURL. There's nothing preventing two developers from both deploying contracts with calculator.tela.
Why dURLs Are Not Unique
Decentralization Philosophy
On a decentralized blockchain, there's no central authority to enforce uniqueness. Implementing unique dURLs would require:
- A central registry - Someone to approve/reject dURL claims (anti-decentralization)
- First-come-first-served on-chain - Adds complexity, gas costs, and enables squatting
- Governance voting - Slow and impractical for app naming
TELA chose simplicity and freedom over enforced uniqueness. Anyone can deploy anything with any dURL.
Legitimate Use Cases
There are valid reasons multiple contracts might share a dURL:
| Scenario | Why Same dURL Makes Sense |
|---|---|
| Forking an app | Developer forks calculator.tela to improve it |
| Testnet vs Mainnet | Same app deployed to both networks |
| Competing implementations | Two devs independently build a "calculator" |
| Version transitions | v1 and v2 coexist temporarily |
SCID vs dURL: The True Identity
Understanding this distinction is critical:
| Property | SCID | dURL |
|---|---|---|
| Uniqueness | β Cryptographically unique | β Not enforced |
| Format | 64-character hex hash | Human-readable (e.g., myapp.tela) |
| Changes | Never (permanent) | Can be updated (if INDEX is RS2) |
| Purpose | True contract identity | Human convenience |
| Analogy | Git commit hash | Branch name or tag |
Think of it like Git:
- SCID = Commit SHA (permanent, unique, cryptographic)
- dURL = Branch name (human-friendly label, can point to different commits)
Example
Contract A (SCID: abc123...)
βββ dURL: "explorer.tela"
βββ Deployed by: Alice
Contract B (SCID: def456...)
βββ dURL: "explorer.tela" β Same dURL!
βββ Deployed by: Bob
Both exist. Both are valid. Both have the same dURL.How dURL Resolution Works
When a browser or host app resolves a dURL, here's what happens:
User navigates to: "explorer.tela"
β
Gnomon searches all indexed TELA contracts
β
Finds ALL contracts where dURL = "explorer.tela"
β
Returns FIRST match found
β
Browser serves that contract's contentThe Problem with Duplicates
With multiple contracts sharing a dURL:
- No deterministic resolution - Which one you get depends on indexer state
- No "latest wins" - Newer deployments don't automatically override older ones
- No rating-based priority - A 0-rated app might be served over a 99-rated one
- No owner priority - The original deployer has no special claim
Critical: If you deploy a new INDEX with the same dURL as an existing one, users may still get the old version. Resolution is unpredictable with duplicates.
Best Practices
1. Use Unique dURLs
Before deploying, search for existing dURLs:
Β» search durl myappIf it exists, choose a different name or add a suffix:
myapp-v2.telamyapp-2024.telamyapp-yourname.tela
2. Share SCIDs for Critical Apps
For important applications, share the SCID directly rather than relying on dURL resolution:
β
"Install from SCID: abc123def456..."
β "Navigate to myapp.tela"3. Version Your dURLs
If you anticipate multiple versions:
myapp.tela # Version 1
myapp-v2.tela # Version 2
myapp-v3.tela # Version 34. Check Before Deploying
Always verify your chosen dURL isn't already in use:
Β» search durl your-chosen-nameRecovery Scenarios
"I deployed my INDEX with ringsize > 2 and can't update it"
If your INDEX is immutable (anonymous deployment), you cannot:
- Update which DOCs it references
- Fix bugs in the code
- Change the dURL or metadata
Your only option:
- Deploy new DOC contracts with your updated code
- Deploy a NEW INDEX (new SCID) with ringsize 2 this time
- Use a different dURL to avoid resolution conflicts
- Share the new SCID with your users
- Rate the old INDEX down (optional) to reduce its visibility
# Deploy new INDEX with ringsize 2
Β» install-index
Enter INDEX name Β» My App v2
Enter INDEX dURL Β» myapp-v2.tela # Different from original!
Enter INDEX install ringsize Β» 2 # Updateable this time!"Someone else is using my dURL"
Unfortunately, there's no recourse. dURLs are not owned or reserved. Options:
- Choose a different dURL - Add your name, version, or unique suffix
- Compete on quality - If your app is better rated, users may find it
- Share your SCID directly - Bypass dURL resolution entirely
"I want to 'transfer' my dURL to a new INDEX"
You can't transfer a dURL because it's not an owned resource. Instead:
- Deploy new INDEX with the same dURL (both will exist)
- Rate the old one down to 0 (if you own it)
- Hope resolution favors your new one (not guaranteed)
Better approach: Use a new dURL and communicate the change to users.
How Browsers Handle dURLs
Browser Behavior
TELA browsers use Gnomon to resolve dURLs:
// Simplified resolution logic
func ResolveDURL(durl string) (scid string, found bool) {
apps := gnomon.GetTELAApps()
for _, app := range apps {
if app["durl"] == durl {
return app["scid"], true // Returns FIRST match
}
}
return "", false
}Key points:
- Resolution is case-insensitive
- First match wins (order not guaranteed)
- No fallback or priority system
Direct SCID Access
Browsers also support direct SCID navigation, bypassing dURL resolution entirely:
dero://abc123def456... # Direct SCID accessThis is the most reliable way to access a specific contract.
Summary
| Concept | Reality |
|---|---|
| dURL uniqueness | NOT enforced - multiple contracts can share a dURL |
| True identity | SCID is the unique identifier, not dURL |
| Resolution | First-match, unpredictable with duplicates |
| Ownership | No one "owns" a dURL |
| Best practice | Use unique dURLs, share SCIDs for critical apps |
| Recovery | Deploy new INDEX with different dURL |
Remember: The SCID is your contract's permanent, unique identity. The dURL is just a convenient label. Plan accordingly!
Related Documentation
- TELA-INDEX-1 Specification - INDEX contract details
- TELA-DOC-1 Specification - DOC contract details
- Version Control - Managing updates and versions
- Security Model - Understanding immutability guarantees