# Public Documents

A comprehensive guide to understanding and engaging with the Free Republic of Liberland's governance, blockchain ecosystem, and regulatory framework.

## Primers

Detailed primers on Congress, Senate, Executive, and Judiciary. Understand the roles and responsibilities of each branch, review decision-making processes and protocols.

* [Congress](/primers/congress)
* [Executive](/primers/executive)
* [Judiciary](/primers/judiciary)
* [Senate](/primers/senate)

## Legislature

Access the Constitution and fundamental laws, browse adopted regulations and orders, and review draft legislation and proposed changes.

* [Constitution](https://github.com/liberland/constitution/blob/master/Constitution.md)
* [Laws](https://github.com/liberland/laws)

### Adopted Regulations

* [Order on Interim Laws](https://github.com/liberland/docs/blob/master/regulations/in%20force/order-on-interim-laws.md)
* [Order on Publications](https://github.com/liberland/docs/blob/master/regulations/in%20force/order-on-publication.md)

### Draft Regulations

* [Police Regulation](/regulations/drafts/police-regulation)

## Policies

* [Privacy Policy](https://github.com/liberland/docs/blob/master/policies/in%20force/justice/privacy-policy.md)
* [KYC Policy /INTERNAL](https://github.com/liberland/docs/blob/master/policies/in%20force/justice/privacy-policy.md)

## Blockchain

Complete documentation of Liberland's blockchain infrastructure. Guides for acquiring and managing LLD (Liberland Dollar), wallet creation and management tutorials, calidator and nominator instructions, and cross-chain bridging solutions. Also includes E-residency and citizenship processes, company registration procedures, and voting mechanisms & governance participation.

* [White Paper](/blockchain/white-paper)
* [Tokenomics Primer LLM](/blockchain/tokenomics-primer)
* [Roadmap](/blockchain/roadmap)
* [Liberland Blockchain Ecosystem](/blockchain/ecosystem)
* [For Citizens & E-Residents](/blockchain/for-citizens)
* [For Validators & Nominators](/blockchain/for-validators-nominators-and-stakers)
* [For Developers & Testers](/blockchain/for-developers-and-testers)

## Media

Includes assets like Liberland's [Press Kit](/media/press-kit).


# Primers


# Congress

## Executive Summary

Liberland’s political system represents the fusing of the best from corporate governance principles with Swiss-style direct democracy, positioning the Referendum as the cornerstone of its republican system. This direct democratic approach empowers citizens to have a direct say in the governance of their country, reflecting the ethos of participatory governance.

Liberland’s republic, however, also employs the principles of representative democracy, at the core of which lies the Congress. Congress serves as the pivotal body through which the democratic will of the people is articulated and enacted. The primary function of Congress is to formulate well-considered proposals and provide a platform for voluntary representation, enabling citizens to entrust their political authority to individuals with specialised expertise.

Moreover, Congress is vested with the authority to appoint and, if necessary, dismiss the executive, thereby ensuring accountability in the administration of government. It also holds jurisdiction over fiscal policies and budgetary allocations, critical for the state's financial management.

## The Elections

Elections within Liberland are conducted on the Blockchain platform every three months, maintaining notably brief election terms to ensure a robust and dynamic connection between the citizenry and their elected Representatives. Unlike conventional electoral systems that adhere to the one-citizen-one-vote paradigm, Liberland employs a unique voting mechanism based on the one-Merit (LLM)-one-vote principle, aligning voting power with the possession of Liberland Merit. It is crucial to interpret these periodic electoral events not merely as traditional elections but rather as 'election moments': unless citizens actively modify their voting preferences, their votes from the preceding cycle will automatically carry over to support the previously selected Members of Congress.

This mechanism is designed to minimise the repetitive demand for electoral participation, allowing citizens to adjust their electoral choices only as new circumstances or considerations emerge.

## Legislative Initiative

Members of Congress hold equal voting rights within the Congress, with their principal duty being the formulation of legislative proposals for consideration in a Referendum, where such proposals may either be adopted or rejected.

In the typical Referendum process, approval does not merely hinge on achieving a simple majority of 50 percent plus one Liberland Merit (LLM) vote. Instead, a mathematical model is employed to guard against the sway of populism. This model increases the threshold for approval proportionally to the decrease in the number of votes cast, thereby ensuring that proposals enjoy a broad base of support, especially when originating from Citizens.

Conversely, when Congress, through a majority vote, endorses a proposal, the Referendum threshold for approval is set at a simple majority of 50 percent plus one LLM. This adjustment acknowledges the democratic legitimacy of Congress, premised on the rationale that as a body elected through democratic processes, its decisions inherently carry a presumption of legitimacy and reflect the electorate's will.

## Constitutional Amendments

Congress is vested exclusively with the authority to propose amendments to the Constitution, a power that is conferred with significant deliberation due to the paramount importance of the document. This prerogative is entrusted to Congress on the basis of its democratic legitimacy, being the unequivocally elected representative body, coupled with the expectation of its professional acumen and comprehensive knowledge.

Tasked with this responsibility, Congress is expected to formulate amendments with due diligence and subject them to a specialized referendum that necessitates elevated thresholds for approval. This procedure is applicable solely to amendments of a non-essential nature; alterations to the foundational elements of the Constitution, encompassing liberties, rights, and fundamental principles, can only be undertaken through a Constitutional Convention.

Congress is also integral to the initiation of such a Convention, underscoring its pivotal role in the constitutional amendment process.

## Cancel Malicious Referenda

In the event that a two-thirds majority of the Congress deems a Referendum proposal to be 'malicious,' as characterised by our Constitution to mean adverse to individual liberty, they possess the authority to 'cancel' such a proposal.

This provision, as detailed within the Referendum Law, extends to proposals that fail to meet formal requirements or are deemed to be objectively poorly articulated and presented.

The rationale behind this measure is that proposals, even if not explicitly malicious, may pose a risk to individual liberty through potential misuse or at the very least, misinterpretation of the legislative instrument or decision that is poorly defined. Once a proposal is cancelled under these grounds, it is precluded from being resubmitted in its original form for a duration spanning the next five election terms.

## State Budget

Liberland entrusts the authority to formulate and adopt the State budget exclusively to Congress, embodying a structured approach to fiscal governance. In an effort to ensure democratic oversight and accountability, the populace is empowered to exercise a Public Veto, effectively enabling them to reject the proposed budget if deemed necessary. Additionally, the Senate possesses the capability to halt financial transfers, serving as a critical check within the system.

Furthermore, citizens are afforded the opportunity to directly influence the allocation of government funds through the submission of Treasury Proposals to Congress. These proposals, once reviewed and accepted, are incorporated into the subsequent State budget, with the execution of these allocations being carried out on-chain.

## Responsible Government

Congress is vested with the authority to designate the Prime Minister, who subsequently assumes the role of the leader of the Cabinet and, by extension, the Executive branch. Following this appointment, the Prime Minister is empowered to select Ministers to serve within the Cabinet. While it is commonly anticipated that Ministers will be drawn from the ranks of Congress members, there is provision for the inclusion of specialists from outside the legislative assembly to bring expertise to the Cabinet.

Congress retains the prerogative to dismiss the Prime Minister through a majority vote at any juncture. This power extends equally to the removal of any Cabinet Ministers. Additionally, a stipulation for the Prime Minister's role is the requirement to be a sitting member of Congress throughout their term of office. Consequently, if the Prime Minister were to be unseated from the Congress, such an event would necessitate the termination of their tenure as Prime Minister. This specific requirement does not apply to other Ministers, who are not obligated to maintain a membership in Congress during their service in the Cabinet. In addition to the executive branch, Congress also appoints Supreme Court Justices, providing democratic oversight to the Judiciary Power.

## The Heart of Democracy

The Congress represents the central hub for political discourse in Liberland, embodying the cornerstone of Liberland’s democratic process. It is designed to be accessible and transparent, with Members of Congress being public figures easily reachable by Citizens. This facilitates a direct conduit for the populace to voice their ideas and concerns, ensuring their participation in the democratic dialogue.

The vision for the Congress is to initially operate within a virtual domain, transitioning eventually to a physical edifice within Liberland, serving as a beacon for democratic engagement. It is anticipated that this venue will become a nexus for interaction among civil society members, special interest groups, foreign dignitaries, and lobbyists. This initiative aims to augment the foundational principles of democracy, positioning the Congress as a paradigmatic legislative body for the 21st century.


# Executive

## Executive Summary

The Cabinet, being the supreme Executive power organ in Liberland, operates within a framework of sharply delineated authorities, confined to a succinct list of powers across only four Ministries. This structure ensures a lean and focused governance, adhering to the principle of limited government. The Executive Branch is made accountable to the Legislative Branch, highlighting a robust system of checks and balances. Additionally, both the Senate and the People hold the power to veto Executive regulations, reflecting Liberland’s commitment to democratic participation and oversight.

Fiscal policy in Liberland is characterised by the absence of mandatory taxes, with the Cabinet required to seek voluntary contributions from the People for specific projects. This approach underscores a commitment to fiscal restraint and voluntaryism, aligning with the nation's foundational values of promoting individual life, liberty, and property. The Executive’s overarching mission is thus to serve and safeguard these principles, ensuring governance that benefits the individual and respects the autonomy of Liberland’s citizens.

## Regulatory Power

The Cabinet exercises its regulatory authority through the issuance of Decrees, which serve as binding regulations for the entirety of the Executive Branch. The applicability of Decrees to the general populace is circumscribed, permitted only to the extent that they do not overstep the legal boundaries established by statutory law.

While Decrees are incapable of creating new rights and obligations—a prerogative reserved exclusively for legislative enactments—they play a crucial role in delineating and specifying existing legal provisions. In the legal hierarchy, the status of a Decree is paralleled to that of judicial precedent, essentially serving as a substitute for the latter. The primary function of a Decree is to address urgent matters that demand immediate attention, preempting judicial intervention and thereby securing legal certainty.

Decrees are particularly utilised in situations where the issues at hand extend beyond the jurisdiction of a single ministry, necessitating a collective response from the Cabinet. In contrast, regulatory directives falling within the domain of a singular ministry are designated as Edicts. Despite the terminological distinction, Edicts and Decrees are endowed with equivalent legal potency and serve analogous functions in the regulatory framework.

## Limits of Power

The Cabinet possesses authority exclusively over matters pertaining to foreign relations, the execution of commercial activities on behalf of Liberland, and the regulation of areas specifically mandated by Law. It oversees the routine operations of the state in the most comprehensive manner. Fundamentally, the Cabinet's actions are confined to the protection of the individuals' right to life, liberty, and property. Any executive action deviating from these core objectives is deemed unconstitutional by default.

The Congress retains the capacity to challenge any regulations, decrees, or edicts formulated by the Cabinet or the Ministries. Such legislative instruments are subject to revocation at the discretion of both the Senate and the populace through a veto mechanism. Furthermore, in instances where regulations are adjudged to contravene constitutional provisions or legal statutes, the judiciary holds the power to invalidate them. This ensures that all forms of regulatory enactments are amenable to scrutiny and potential veto by the Public and the Senate, underscoring the checks and balances integral to Liberland's governance structure.

## The Prime Minister

The Prime Minister serves as the leader of the Cabinet, wielding the decisive vote in its discussions. This individual is a Representative selected by Congress—the legislative arm of government—to occupy the role of Prime Minister for a term not exceeding five years. The Legislative Branch retains the authority to dismiss the Prime Minister as well as any Minister within the government. It is within the purview of the Prime Minister to appoint and relieve other Ministers, ensuring comprehensive oversight over the activities and operations across all governmental ministries and agencies. Although the Prime Minister does not oversee a specific ministry, they function as the 'political' minister, embodying the Cabinet's collective representation and articulating its unified stance and directives.

## Ministries

Liberland is structured around a concise and streamlined governmental framework, comprising precisely four ministries, each under the leadership of a designated Minister. These ministries are foundational to the administrative and operational governance of the state, ensuring a focused and efficient execution of national policy and strategy. The ministries are as follows:\
**The Ministry of Justice:** Entrusted with upholding the legal framework of Liberland, this ministry oversees the administration of justice, legal proceedings, and the enforcement of laws to maintain societal order and protect citizens' rights.\
**The Ministry of Internal Affairs:** Responsible for domestic policy, this ministry focuses on internal security, public administration, and the oversight of internal matters crucial to the state's stability and the well-being of its citizens.\
**The Ministry of Foreign Affairs:** This ministry manages Liberland's interactions with foreign states and international organisations and oversees diplomatic relations, international treaties, and global representation of Liberland's interests.\
**The Ministry of Finance:** Charged with the economic stewardship of Liberland, this ministry handles fiscal policy, government budgeting, taxation, and the financial management necessary to sustain the state's economic health.

## Day-to-Day Governance

Ministries within the framework may be segmented into Agencies, contingent upon the enactment of specific legislation that necessitates ratification via a Referendum, akin to the passage of any other statutory provision. This mechanism serves as a safeguard against the unwarranted expansion of governmental structure, ensuring a check on potential bureaucratic growth.

All budgetary allocations are mandated to receive a formal legislative sanction, effectively requiring the assent of the Legislative Branch (Congress) for enactment. Furthermore, fiscal plans and expenditure outlines necessitate the distinct endorsement of the Senate prior to their implementation. This dual-layer approval process underscores the commitment to a checks and balances system within the fiscal policy domain. In circumstances where a Budget is adjudged to contravene constitutional principles, the Supreme Court possesses the authority to invalidate such a financial plan, thereby precluding its execution in the disputed form.

## Connection with the Public

Additionally, proposals for individual government initiatives are obliged to undergo a presentation phase to both citizens and potential investors, underscoring the necessity for these stakeholders to be persuaded of the projects' merits for their personal benefit and the broader welfare of Liberland. This requirement stems from the Executive's lack of authority to levy taxes, thereby eliminating a direct fiscal conduit from the populace to finance governmental projects. This model emphasises a transparent, consent-based approach to project funding and execution, aligning with the principles of voluntarism and direct democracy that underpin the governance model.

## Governing Liberland

The paramount public interest in Liberland centers on the regulation and enhancement of the protection of individual life, liberty, and property. This foundational principle establishes the government as the public guarantor of the Non-Aggression Principle, or the Golden Rule: one should not inflict upon others what one would not wish for oneself.

The constitutionally mandated checks and balances are designed to ensure that the Executive branch remains committed to this core mandate, its principal and sole function. This framework casts the role of a government official or an 'Agent' in Liberland as both challenging and invigorating. Agents are distinguished by their service to the only government that refrains from expropriating resources from its citizens under the guise of public welfare. Instead, they contribute to the creation of what is aimed to be the freest nation on Earth, embodying a commitment to the principles of liberty and non-aggression.

The constitutionally mandated checks and balances are designed to ensure that the Executive branch remains committed to this core mandate, its principal and sole function, contributing to creating what is aimed to be the freest nation on Earth, embodying a commitment to the principles of liberty and non-aggression.


# Judiciary

## Executive Summary

The Judiciary constitutes the sole authority vested with the capacity to adjudicate on matters pertaining to individual rights and obligations on a case-by-case basis. The judicial structure is comprised of the Supreme Court, serving as the apex judicial body, alongside a hierarchy of subordinate courts. This structure not only encompasses state-operated courts but also facilitates the establishment of private judicial forums. Such private courts operate on the basis of voluntary jurisdiction, allowing parties to opt for arbitration as a means of dispute resolution. The Supreme Court holds the ultimate adjudicatory authority, functioning as the terminal appellate body across all judicial forums within the jurisdiction.

## The Jurisdiction

The judicial system of Liberland exercises comprehensive jurisdiction over all disputes arising within the territorial confines of Liberland, encompassing conflicts among Citizens, e-residents, and other entities. This jurisdiction specifically pertains to matters that fall under the aegis of Liberland's State sovereignty, including disputes related to land, vessels, and aircraft registered under the Liberland flag. Additionally, the Liberland judiciary is empowered to adjudicate other disputes should the parties involved designate Liberland as the preferred forum for resolution, such as in cases of arbitration.

## Warrants and Final Decisions (Verdicts)

The Judiciary possesses the authority to promulgate two distinct categories of legal instruments:

**Warrant:** This legal act pertains to the articulation of rights and obligations of the disputing parties or relevant third parties prior to the adjudication of the dispute. The primary function of a Warrant is multifaceted, serving to safeguard the interests of crime victims, facilitate actions within criminal investigations that necessitate engagement with private property sans the owner's consent, and inhibit parties from dissipating their assets outside the ambit of Liberland's legal jurisdiction, among other purposes.

**Verdict:** This legal instrument constitutes the definitive resolution of a dispute, effectively supplanting any Warrants previously issued in relation to the matter at hand. It establishes (or, in certain instances, reaffirms) the rights and duties incumbent upon the disputing parties post-resolution.

The issuance of a Warrant thus acts as a provisional measure, ensuring the preservation of justice and the integrity of the legal process in the interim period leading up to the delivery of a Verdict, which conclusively determines the outcome of the dispute and delineates the resultant legal standings and responsibilities of the involved parties.

## Limits on Powers

A Judge can only decide for the parties of the given dispute and is not able to actively issue regulations binding on others. However, the Judge's decisions can possess the authority of established jurisprudence.

Verdicts of the Supreme Court are binding upon all the lower courts and even upon other Powers of the State, i.e., the Legislative and the Executive. Constitutional control Any Judge appointed by the President (i.e., not private arbitrators) may declare any Law or any part of a Law to be unconstitutional, should they find grounds for such a judgment important for the resolution of a case. They may set aside this Law or the offending stipulation to give their Verdict. In addition, they must then redraft the Law in a way that repairs the error according to their judgment.

Should the Verdict gain legal force (i.e., there is no longer the possibility for regular appeal), the redrafted Law will be sent to Congress. Should Congress not deliver its reparation proposal, the judge-drafted version will become the new valid version of the Law.

## Supreme Court

The Supreme Court stands as the pinnacle of the appellate system and serves as the paramount adjudicator of legal interpretation and application. It possesses the discretionary authority to assume jurisdiction over any case, irrespective of its origin, from private or state judicial bodies. This includes the prerogative to adjudicate political disputes that pertain to the legitimacy of constitutional procedures, such as elections and referendums, alongside other issues of significant political relevance, including questions of personal competence.

As such, the Supreme Court functions as a critical guardian of constitutional integrity, ensuring the adherence to legal principles in matters of substantial public interest and political governance. Its role encapsulates the ultimate exercise of judicial review, safeguarding the democratic foundations and legal consistency within the jurisdiction.

## Constitutionality

The Supreme Court possesses the authority to intervene in any legislative procedure, including processes such as a Referendum or executive deliberations, and suspend its progression for a duration of 30 days. Within this period, the Court is empowered to assess whether the legislative act poised to emerge from the halted process is in alignment with the Constitution.

Should the Court find the act non-compliant with constitutional mandates, the legislative process is required to be recommenced, and the act in question must be revised to incorporate the Court's binding recommendations.

## Trial

Prior to the commencement of court proceedings, the State Court Judge endeavours to amicably resolve the dispute through transparent, written communications and a Mediation process. It is only upon the unsuccessful conclusion of these preliminary stages that the case proceeds to Trial.

The Trial process is designed to adhere to traditional judicial principles, characterised by the presence of a Judge or a panel of Judges overseeing the proceedings. Parties involved are convened in a single location, which may either be a physical courtroom or a virtual setting such as a Zoom meeting, the latter of which represents a modern adaptation to traditional practices. Regardless of the format, the proceedings are conducted with strict adherence to decorum, requiring all participants to maintain politeness and professionalism throughout.

The Trial encompasses the presentation of witnesses and the submission of evidence, with the stipulation that only matters substantiated by such testimonials or material proofs are considered for the record. The guiding principle of the process is the pursuit of absolute material truth, empowering the Judge, through their expertise and professional judgment, to independently assess the credibility and reliability of the information presented.

Jurisprudence, along with Decrees and Edicts issued by the Ministry of Justice, are employed to elucidate and provide clarity on complex legal matters as necessary. Ultimately, the culmination of the Trial is the issuance of a Verdict, which definitively establishes the rights and obligations of the parties involved, marking the resolution of the legal dispute.

## Appeal

The judicial architecture within Liberland is structured hierarchically, facilitating an appellate mechanism whereby parties aggrieved by initial verdicts can seek redress. Appeals are permissible under circumstances where it can be substantiated that procedural improprieties occurred, such as lapses in the impartial and diligent examination of facts, the emergence of new evidence previously unavailable, or the identification of procedural discrepancies. Additionally, an exceptional avenue for appeal exists via the Supreme Court, whereupon the adjudication rendered at this level is conclusive and acquires definitive legal validity.

## Enforcement

In pursuit of maximising the efficiency and speed of modern technologies within the legal process, the enforcement of verdicts is envisaged to be executed through Smart Contracts. These contracts are programmed to automatically deduct Liberland Merit (LLM) from the account of the adjudged party once the verdict is legally recognised as enforceable. For litigations involving elements not amenable to blockchain transactions, namely off-chain matters, the enforcement protocol will emulate traditional methodologies. In such instances, the outcome will be encapsulated in a conventional contract, which can then be presented to either public or private enforcement entities for action, aligning with practices observed in other jurisdictions.

## Checks and Balances

The Judiciary serves as a pivotal element in the system of checks and balances within Liberland, possessing the authority to annul regulations established by other branches of government. It stands as the branch most proximate to the populace, offering a direct avenue for individuals to lodge complaints not only against fellow citizens but also against the State itself. This proximity positions the Judiciary as a fundamental bulwark against the encroachments of tyranny, embodying the principle of safeguarding individual rights and liberties.

Inherently designed to prioritise the resolution of disputes on a case-by-case basis, the Judiciary's focus on the individual underscores its critical role in the governance and legal framework of Liberland. It is within this context that the Judge emerges as a figure of paramount importance among state officials, distinguished by their unique capacity to interpret and apply the law in a manner that directly impacts the lives of citizens. As such, the Judiciary, and by extension the Judge, merits precedence in discussions of state power, reflecting their indispensable role in upholding the principles of justice and equity in Liberland.


# Senate

## Executive Summary

The Senate functions as the House of Lords within the governance structure of Liberland, representing the convergence of corporate governance principles with Swiss democratic ideals. The Senate will be an esteemed assembly comprised of citizens most significantly vested in the success and prosperity of Liberland, those who stand to lose the most should the nation encounter failures.

As an autonomous entity within the government structure, the Senate is designated as the 'fourth power,' tasked with the critical roles of oversight and quality assurance. This positioning ensures that it functions independently from the conventional branches of government, providing a unique mechanism for checks and balances.

## The Office of Senator

Senators commence their tenure by engaging with the Liberland community through the dedicated governance platform, a digital arena designed for them to acquaint themselves with the citizenry and affirm their newly acquired status.

Subsequently, Senators have the option to physically participate in the affairs of Liberland on-site or opt to contribute from afar as a vigorous and protective presence, playing a pivotal role in shaping the future and guiding the trajectory of Liberland. The manner in which Senators elect to fulfil their roles and responsibilities is left to their discretion, affording them the autonomy to tailor their senatorship to their unique capabilities and vision for Liberland.

## Senator Share

In Liberland, the voting power of a Senator within the Senate is determined by the magnitude of their share, embodying the nation's commitment to meritocracy. This principle dictates that exceptional contributions are acknowledged with proportional recognition. Consequently, the influence wielded by Senators is not uniform but is instead reflective of the extent of their contributions to Liberland.

Moreover, this share endows Senators with preferential access to potential dividends from the State treasury. In instances where the budget yields a surplus that is deemed excessive for reinvestment in the nation's developmental aspirations, such surplus is earmarked for distribution among the citizenry. However, Senators are accorded a unique privilege in this context, granting them access to a portion of the surplus, proportional to their undistributed share in Liberland Merits (LLM), prior to the allocation to the general populace.

## Constitutional Powers

The Senate possesses substantive authority, as delineated by the Constitution and authenticated through blockchain technology, to undertake several critical functions within the governance framework of Liberland. These powers include the capability to:\
**Annul a Referendum:** The Senate is endowed with the prerogative to nullify the outcomes of referendums pertaining to legislative proposals before they attain legal validity. Should a Veto be exercised by the Senate, the proposed bill will be prevented from becoming law.\
**Budgetary and Financial Oversight:** Acting as the paramount body in financial oversight, the Senate holds the authority to scrutinise and regulate the disbursement of funds from the Liberland Treasury. This includes the power to halt any financial expenditures deemed unjustifiable, ensuring fiscal responsibility and integrity in the management of state resources.\
**Regulatory Authority:** Beyond its legislative oversight, the Senate is vested with the power to rescind any Regulation, with the exception of Laws, even subsequent to their enactment. This allows for a dynamic regulatory environment where the Senate can correct or remove regulations that are found to be counterproductive, unjust, or outdated.\
**Presidential Elections:** The Senate plays a pivotal role in the governance of Liberland by participating in the election of the President. This function underscores the Senate’s integral position within the political structure, contributing to the leadership continuity and stability of Liberland.\
**Oversight Functions:** The Senate is also responsible for executing and establishing oversight mechanisms as necessary. This entails the creation and supervision of various organs within the government tasked with monitoring and ensuring the lawful and efficient operation of Liberland’s administrative and executive functions.

These enumerated powers underscore the Senate's significant role in safeguarding the constitutional order, fiscal prudence, and regulatory efficacy, thereby upholding the principles upon which Liberland is founded.

## Political influence

The concept of a Senator's soft power embodies the influence and prestige inherent in the office, underscoring the indispensable role Senators play in the foundation and continued evolution of Liberland. Without their contributions, Liberland's current state would be markedly different, if feasible at all. The esteem associated with their position ensures that their perspectives carry significant weight within Liberland's political sphere.

Senators are poised to play a pivotal role in the policymaking process, with their consultation often being a critical precursor to the advancement of regulatory initiatives. Their endorsement is frequently seen as a sine qua non for the realisation of policy efforts, affirming that their insights and expertise are not only valued but deemed essential for shaping a prosperous future for Liberland.

## Your Seat, Your Style

Alternatively, certain Senators may opt for a more observational role, intervening with advice or guidance only when they perceive significant deviations from expected courses of action. The prerogative lies with each individual Senator. It is important to note that Senators are not obligated to assume any specific office, nor are they encumbered with duties beyond those inherent to their status as Senators; they do not function as government officials in the traditional sense.

Rather, they are free to pursue their personal and professional interests outside of Liberland, engaging in commercial or other ventures that they deem meaningful. The personal success and development of Senators are considered to be their paramount contributions to Liberland. The essence of being a Senator revolves around the exercise of choice, with each Senator embodying their role in a unique manner. They are envisioned as the venerable figures of the political landscape whose opinions are given due consideration by the political system whenever they choose to express them.


# Regulations


# Drafts


# Internal Regulation of the Security Commission on the Structural and Functional Organization of the

## Preamble

To fulfill its duty set upon it by the Security Law, an interim law


# In Force


# Orders


# Order of the President of Liberland no. 1/2021, on the Decisions of the Cabinet.


# Order of the President of Liberland no. 2/2021, on the Interim Legislature


# Policies


# In Force


# Justice


# Privacy policy


# Blockchain

Documents pertaining the design of our blockchain. For the technical documentation, please visit the corresponding section of this wiki.


# White Paper

## Liberland Blockchain Whitepaper

### Abstract

Liberland is a country founded in 2015 on a terra nullius between Croatia and Serbia, with its founders being enthusiasts of blockchain and liberty. The goal of the Liberland Blockchain is to provide all e-government services to its citizens via a Substrate-based blockchain system, with governance as its first use case.

The Liberland Blockchain is designed as a layer 1 public blockchain, governed by the holders of its native tokens, the Liberland Dollar (LLD) and Liberland Merit (LLM). The system also supports Non-Fungible Tokens (NFTs) representing land and other assets and implements a decentralised identity solution.

In the future, it will support an online judiciary system, enabling non-smart but self-executing contracts on the blockchain with the judiciary as an oracle. The judiciary will also enable features like account recovery and recourse against fraud and theft.

### System Overview

Liberland Blockchain is a layer 1 public blockchain owned by holders of LLD but governed by the holders of LLM. The codebase is a fork of Substrate/Polkadot distributed under the MIT License, the same as Bitcoin. Liberland does not claim ownership of the blockchain or related materials.

The blockchain allows permissionless usage of tokens and coins as a store of value or medium of exchange. Some advanced functionalities critical to the operation of the nation are permissioned. For example, only citizens can vote in onchain elections, only e-residents can start Liberland companies etc. Even though in such cases "Liberland official" functionalities like company registry are permissioned, the system is configured to easily support other private registries which can be permissionless.

DeFi projects on the Liberland chain are permissionless unless designed and designated differently by third-party developers on a per-project basis.

[Read about the tokenomics](/blockchain/tokenomics-primer)

### Liberland Blockchain Design

#### Permissioned Access

To accommodate state-level security requirements, certain blockchain functions are only available to users with elevated privileges. Elevated privileges are obtained by undergoing the KYC procedure operated by the government of Liberland and fulfilling the requirements for becoming Citizens.

The functions that require citizenship or e-residency include, running Validator nodes and participating in on-chain governance.

This system reflects the principle of citizenship on the blockchain: States allow only citizens to operate their systems of critical infrastructure, and typically, only citizens are given full political rights. As on-chain governance and politics are the same thing, the development of the system is, effectively, in the hands of the Citizens.

### On-Chain Assets

#### On-Chain Assets and Division of Power

The blockchain contains two main assets: Liberland Dollar (LLD) and Liberland Merit (LLM). LLD serves as a medium of exchange and an instrument for maintaining network consensus and security. LLM represents a share in Liberland's state and nationhood, granting governance power with no possibility of separating this power from the token.

#### Liberland Dollar (LLD)

The Liberland Dollar serves as the native token of the blockchain, fulfilling the following main functions:

* A medium of exchange; and
* An instrument for maintaining network consensus and security.
* The token to register entities with and to manage them, such as companies, assets, real estate, etc.
* The token to operate the judiciary for traditional contracts.

There are 3 million LLD with maximum inflation of 10% a year, subject to reduction by governance once adoption and gas fees increase. [Read more about the tokenomics of LLD](/blockchain/tokenomics-primer)

#### Liberland Merit (LLM)

**Overview**

The Liberland Merit represents a share in the state and nationhood of Liberland. One's LLM supply can be converted to tokenized political power, with which a Citizen can vote.

With a fixed maximum supply of 70,000,000 tokens and a release schedule of 10 percent per year, LLM is a deflationary token. LLM represents the territory of Liberland, where 10 LLM represent 1 m2 of land. This is an ideal ownership scenario, but LLM holders will be acknowledged when titles to the land are sold.

LLM is a token set up using the Assets pallet. The initial price for LLM will be USD $2, subject to change when trading begins.

[Read more about the tokenomics of LLM](/blockchain/tokenomics-primer)

**Political pooling (PolitiPooling)**

Participation in the political process of Liberland is not solely contingent upon ownership of LLM or citizen status. A further requirement exists in the form of political pooling, or 'PolitiPooling' of LLM.

PolitiPooling is a long-term vesting which, mirroring the initial increase of token supply, only allows the unvesting of 10 percent of one's token supply per year. In addition, while unpooling, e.g. unvesting, one's PolitiPooled LLM supply loses its political power.

This gradual release of vested tokens can be likened to a form of social security, however, Liberland's social security is funded by the individual's past tax contributions rather than a collective pool. The unpooling mechanism is structured to be triggered on a monthly basis, with 1/12th of 1/10th of the total vested supply becoming available each month.

The act of PolitiPooling LLM is representative of voluntary tax contribution and a further display of dedication to the nation's prospective development. This mechanism is grounded in game theory, suggesting that significant personal investment, whether in the form of time or resources, typically results in a heightened sense of responsibility and commitment to the success of the invested project.

#### NFTs

Native NFTs are used to represent land in both physical Liberland and the metaverse. These NFTs are integral to the land registry contract and dApp, which tracks registered property. Additionally, a range of soulbound NFTs will be used in future stages of the project to represent Citizenship and various government functions, enabling Liberland to implement a transition of power through smart contracts.

In future iterations, the project will tokenize everything in the Liberland metaverse and real-world Liberland. Sales and purchases will be facilitated through NFTs, representing “deeds of ownership” to real-life objects. Where there is a dispute, a Judge needs only to look on-chain to identify who owns the NFT for the object in question.

#### Contract-based (3rd party) tokens

Liberland Blockchain will exhibit comprehensive compatibility with smart contracts as it operates on a derivative of the Polkadot Virtual Machine. This functionality empowers both our internal team and external developers to establish their decentralised architectures.

We foresee the emergence of a robust Decentralised Finance (DeFi) ecosystem on our chain, akin to the thriving DeFi environments observed on other Rust-based chains like Polkadot, Near, and Solana.

### Frontend

The user-facing component will encompass an array of interfaces crafted with the intention of enabling Liberland's citizens to directly engage with their governance structures. This assembly of user interfaces will encompass but will not be confined to the subsequent sub-domains:

1. **A Wallet Interface**: A streamlined portal for managing digital assets.
2. **Validator/Nominator Interface**: A conduit for interactions with Validators, the custodians of blockchain integrity.
3. **Political Interface - Citizen-facing**: A dedicated space for electoral processes, candidacy declaration, and legislative drafting.
4. **Political Interface - Politician-facing**: Spaces for Congress, Senate and Cabinet.
5. **Government Registrars Interface**: An access point for government-related services and registrars.
6. **Internal Government Interface**: Exclusive interfaces for government officials to interact with the blockchain and conduct administrative duties.
7. **Treasury Interface**: A bespoke platform for managing Liberland's financial reserves.

Supplementing these, a collection of front-ends will be developed to facilitate the interaction between the blockchain and the metaverse, thereby enhancing the synergy between the digital and physical realms of Liberland.

## Governance: Legislative

### Referendum

#### Validation of Proposals

The Referendum serves as a core instrument for decision-making within the political architecture of Liberland, facilitating citizens in the evaluation of laws, regulations, and assorted political propositions.

The fulcrum of both on-chain governance and the political milieu of Liberland is the Referendum. Within the Liberland context, all laws require passage through the Referendum's direct democratic process for validation.

The functioning of the Referendum is predicated on a system evolved from Polkadot, integrating an anti-populist safeguard that escalates the voting threshold in proportion to declining voter participation. The voting requisite, i.e., the count of tokens required for the ratification of a proposal, rises in conjunction with declining turnover. Consequently, this system safeguards against the Referendum bypassing the will of the silent majority, irrespective of their voting inactivity. This mechanism is deactivated for Referenda initiated by the Congress, given its democratic election.

#### Differentiation from Polkadot

In contrast to Polkadot, our system is streamlined to eliminate weighted voting and endorsements. Instead, we mitigate Distributed Denial of Service (DDoS) attacks by requiring the proposer to remit a specified amount of LLD to initiate each Referendum. Upon payment, the Proposal is automatically elevated to a Referendum status, aligning with the expectations of a bona fide political referendum.

#### Referendum and Enactment Period

**Referendum and Enactment Periods:**

The Referendum shall be conducted over a designated Referendum Period lasting fourteen (14) days. Should the proposal be ratified, a subsequent Enactment Period of an additional fourteen (14) days shall ensue to facilitate the implementation of the new legislation. This structure is analogous to the "legis vacantis" period commonly observed in various jurisdictions.

**Emergency Proposals:**

The proposer may designate the Referendum as an "emergency" proposal, thereby abbreviating the aforementioned periods. Such an expedited process is subject to rigorous scrutiny by the Congress and may be subject to cancellation as delineated in the subsequent sections.

#### Voting Pseudonymity

Our voting system allows for pseudonymity, enabling participants to either disclose or withhold their identity at their discretion. Public figures or significant stakeholders may opt for transparency to establish accountability, thereby enhancing their eligibility for elected roles. Conversely, ordinary voters are not obligated to reveal their identity, thereby preserving their privacy. This approach introduces a level of transparency in the voting process that is unparalleled in other systems, allowing for the comprehensive evaluation of politicians based on their complete political history.

#### Revocation of Proposals

Furthermore, a specialized variant of the Referendum is operational for the retraction of legal validation from laws and other measures ratified by the Referendum. This is termed the Public Veto. An exclusive feature within the chain's toolkit, the voting for a Public Veto is conducted on a one-citizen-one-vote basis. This mechanism serves as a precautionary measure against potential plutocratic commandeering of the system.

### Congress

#### Overview

The Congress operates as the representative entity within Liberland, tasked with

* initiating rational referenda that are exempt from the anti-populist voting requisites;
* Removing referenda which are obviously malicious or where the proposals are obviously not sufficiently thought out;
* The appointment and removal of the Prime Minister (Executive), and
* Participating in referenda on behalf of constituents who delegate their voting rights.

#### Elections

The Congress is elected through a voting process involving all citizens, utilising their tokens. Elections occur on a quarterly basis. Inactive citizens in the most recent elections are not recorded as such; their vote in the last participated election is considered valid.

#### Referendum Quality Control

The Congress is given the authority to rescind referenda deemed to be malicious in intent, such as those explicitly designed to disrupt the stability of Liberland or compromise the integrity of the blockchain. This authority extends to referenda with unjustifiably abbreviated Referendum or Enactment Periods, including those designated as "emergency" proposals without a substantiated basis for urgency. The Congress becomes a human oracle, providing a holistic review, the non-algorithmic element in an otherwise mathematically precise system. Such rescission is referred to as "Cancellation" within the Constitution of Liberland and must be accompanied by a reasoned justification.

The proposer will be informed of the specific areas requiring improvement to avoid future cancellations. It is incumbent upon the proposer to ensure the proposal meets the requisite standards, as the LLD fee for cancelled proposals is non-refundable. This serves as a stringent regulatory mechanism.

The Senate possesses parallel authority for the cancellation of referenda. In instances where the proposer disputes the legitimacy of a cancellation, an appeal may be lodged with the Judiciary for impartial adjudication.

#### Delegation

The concept of Delegation gains relevance for citizens who perceive their representative as more knowledgeable or more capable of in-depth study of the subject matter while they attend to their personal affairs.

Delegation can be granted or rescinded at any point in time. This introduces a novel form of tangible representation into representative democracy, given that most states do not permit any form of post-election influence over the actions of the representative, barring a one-time vote cast every few years.

#### Prime Member

The Congress is a derivative of the Substrate Council, retaining the original structure of the source. Consequently, the Congress also inherits the Council's system of the Prime Member. Within the Congress, the member amassing the maximum votes per voting period ascends to the role of the Prime Member. Their vote in any Congress deliberation is automatically adopted by all inactive or non-voting members of the Congress.

### Governance: Executive

#### Role

The Executive carries out the routine operations of the nation. It also executes laws and measures ratified by Referendum and Congress, thus translating them into practice.

#### Cabinet

The Executive operates in a hierarchical manner, spearheaded by the Cabinet, which technically is another offshoot of the on-chain Collective pallet. The Cabinet consists of one Prime Minister and four Ministers. All other executive functions fall under the purview of either one of the Cabinet members or the Cabinet as a whole.

The primary authority of the Cabinet lies in enforcing regulations within the legal framework. Subordinate Offices administer and regulate within the confines of the law and Cabinet regulations, with their heads appointed and dismissed by the Cabinet or a specific Minister.

#### E-Governance

All the offices under the Cabinet constitute the E-Governance of Liberland on the blockchain. They are expected to have interfaces that facilitate seamless communication and service provision for the citizens of Liberland.

The initial such offices are the Company Registry and Land Registry, which are currently operational on the chain in a pilot stage. They are expected to be succeeded by additional applications aimed at fulfilling traditional state roles.

Furthermore, E-Governance will feature an inward component, specifically, budget management. State budgets will be maintained on the blockchain, ensuring complete transparency and oversight.

The e-governance system also encompasses wallet interfaces, validator interfaces, and political interfaces for elections and will include such elements as legislative drafting, interfaces for government registers and other services, internal government front ends for officials, and the treasury interface.

#### Registries

The electronic governance framework will incorporate multiple registry databases, serving as the authoritative repositories for various types of assets, as applicable. Initially, this will encompass all real estate holdings within Liberland, which will be virtually represented in a dedicated registry, thereby providing transparent ownership information.

The registration of additional asset categories will be facilitated in a similar manner. While participation in these registries is entirely voluntary, it offers significant advantages in judicial proceedings. Assets recorded on the blockchain will be legally recognized as the property of the registered account holder, thereby eliminating ambiguities and streamlining transactions.

The blockchain-based registry systems represent a groundbreaking advancement in economic management and expedited legal recourse, offering a streamlined and transparent approach to asset ownership and transactions.

#### Current Phase: The Provisional Government

In the early stages, the Cabinet is served by the Provisional Government of Liberland, with the President acting as the Prime Member. The roles within the Cabinet are therefore allocated by the President. Upon the development of a community in Liberland or a territory governed by Liberland (when at least 65 percent of Citizens are onboarded and settlement is actively in progress), the Provisional Government will relinquish its power, and the President will transition into the role of a primarily symbolic head of state.

### Treasury

One of the standing values that Liberland has is that all taxes are paid voluntarily by the citizens of Liberland. We forked Polkadot’s Treasury and implemented it as a multi-signature wallet held by the on-chain politicians of Liberland. Like Polkadot’s Treasury, we will handle funding proposals, mainly initiated by the Executive and Congress.

### Senate

#### Overview

The Senate is tasked with the management of Treasury keys and the power to veto Laws and Regulations. Laws can be vetoed during the referendum phase, whereas lower-tier Regulations can be vetoed at any time. Proposals related to the LLM Treasury necessitate the Senate's approval for execution. The Senate serves as Liberland's "House of Lords", with members appointed for life. Their power is purely of control, devoid of legislative or executive capacities.

A notable attribute of Senatorship is the possession (restricted to dividends) of one percent of Liberland reserves and of the parent company developed for Liberland, namely Liberland Limited, based in Hong Kong.

**Powers**

The Senate, as a collective, is endowed with the following authorities:

1. Nullify any referendum regarding Laws prior to them acquiring legal force; if a Veto is enacted, the proposed law will not acquire legal force;
2. Act as the supreme authority in budgetary and expenditure matters, maintaining oversight over any outflows from the Liberland Treasury; the Senate can halt any spending they deem unjustified;
3. Revoke any Regulation, other than a Law, even post-legal enactment; and
4. Cast votes for the President of Liberland.

#### Implementation

The Senate, similar to the Congress and Council, is also a derivative of the Council pallet from Polkadot. Initially, Senators will be designated by the President. Subsequently, a co-option system will be established, wherein existing Senators vote to induct new members.

It is important to note that while Senators have the power to admit, they cannot dismiss, as Senatorship is a property title and, as such, is safeguarded from expropriation in accordance with Liberland's property protection principles.

#### President & Vice-Presidents

The President, selected by the Senators, operates as the head of state and represents Liberland on the international stage. Any actions undertaken by the President require the validation of at least one Vice-President. The President's main authority is as the Prime Member of the Senate Collective, implying that the votes of abstaining Senators automatically align with the President's. This holds true only when a Vice-President corroborates the vote; otherwise, the votes of abstaining Senators are deemed uncast.

Furthermore, the President is empowered to appoint Executive functionaries and Judges upon establishment of the Judiciary. The President's authority in this capacity is significant, allowing them to reject an appointment. However, this power is subject to the same checks as the Prime Member vote, demanding the countersignature of a Vice-President.

### Future Outlook: Judiciary

#### Overview

The on-chain judiciary is in active development, aiming to combine trust-based elements, such as professional judges and process law, with blockchain-native solutions inspired by Kleros, the Aragon Court, and Ulex. The main mission is to conceive a blockchain-compatible solution that translates traditional dispute resolution and judiciary functions into the digital realm. Our vision includes a system that synergizes the virtues of centralised and decentralised models.

#### Problem Description

**Irreversibility: The Inflexibility of Blockchain Systems**

A foundational trait of blockchain systems originating from Bitcoin is the principle of irreversibility. Once a transaction is executed, it cannot be undone. Here, intentions play a secondary role, with the final action being recognized as the valid user input.

However, this level of accountability is often too demanding for many individuals. The common practice of associating human identities with addresses by third-party organisations is essentially a temporary fix, contradicting the core philosophy of blockchain. A single mistake can lead to catastrophic consequences, potentially resulting in the loss of millions without any inherent system recourse.

**Absence of Authority: The Perilous Landscape of Cryptocurrency**

The current cryptocurrency environment, teeming with scams and malicious actors, provides little protection against such threats. Redress against hackers and dishonest service providers typically happens outside the system, relying on national judiciaries and other external entities.

Cryptocurrency represents a risky environment balanced against the promise of opportunity. It is filled with disclaimers about using the service "as-is", and providers often disclaim liability for secondary damages caused by other users. As a result, victims often find themselves in a harsh situation, with few options for seeking justice.

Compounding the issue is the inherent system bias towards the savvy manipulator. With actions prioritised over intentions and the absence of an overseeing authority, the system inherently favours the crafty over the honest. This perceived intrinsic unfairness deters potential investors, especially businesses with lower risk tolerance.

**Unfamiliarity: The Obscurity of Existing Solutions**

Current judicial solutions in the blockchain field suffer from their highly specialised nature. These systems, primarily designed for technical issues, struggle to appeal to a wider audience. While solutions like Kleros and Ulex aim for a more generalist approach, they remain largely unfamiliar to the general public.

The reliance on complex mathematical algorithms and game theory may be theoretically sound, but these concepts are unfamiliar to most individuals. People generally trust expert legal opinions over abstract mathematical models. Acknowledging this gap, we aim to create a new solution that bridges this divide.

### Liberland Solution: An On-Chain Judiciary System

#### Overview

The Liberland Judiciary is designed to develop an on-chain system capable of acting on behalf of a party without their explicit permission in pre-approved ways with mutual consent given in advance.

1. Facilitate the integration of a 'court as a smart contract oracle', thereby enabling the execution of traditional, verbose contracts on-chain. This system allows for the imposition of sanctions as dictated by the applicable law and the contract itself in the event of a dispute.
2. Implement a body of norms or laws to regulate the system's operations, thereby eliminating arbitrary decisions and enhancing trust.
3. Guarantee decentralisation and security while ensuring that the system is operated by professionals who uphold the quality of decisions.
4. Retain recognizability by resembling a traditional courtroom rather than a streamlined IT service app.

The solution we propose introduces a hybrid entity, central yet decentralised, capable of interpreting the intent behind actions within the blockchain. Empowered to regulate transactions by reversing or counteracting them, this entity exercises authority, particularly in situations where malicious or bad faith intentions are identified. By introducing a virtual judiciary, any questionable actions can be evaluated and, if necessary, nullified.

This architecture enhances the breadth of on-chain business activity, facilitating enforcement of traditional contract agreements and enabling partial algorithmic execution. In effect, this approach instils confidence that transactions, whether off-chain or on-chain, offline or online, will be enforced. Additionally, it offers an authoritative entity to resolve any disputes arising from the obligations agreed upon by the parties involved.

### Simple Process

#### Outline

The Simple process is employed when all parties involved reach a consensus on selecting a judge or panel of judges to preside over their case. The selection can be explicit (naming a specific judge) or implicit (agreeing to let the system select). The system provides parameters (such as cost, experience level, etc.) for judge selection, stipulating that parties are bound by their agreement to accept the system's random selection within the agreed-upon parameters.

The Simple process is designed to be:

* Quick,
* More economical than the contested process, and
* The intent is to ensure expedient and cost-effective resolution, contrasting with contemporary systems where years can elapse before disputes are resolved.

In Liberland, minor disputes could potentially be adjudicated within a day or a few days through the Simple process, and at a significantly reduced cost

#### Mediation

The appointed judge endeavours to segment the case into manageable portions, drafting a mediation solution for each. This proposed solution is then presented to the involved parties. If an agreement is reached, the process concludes without litigation, and the judge is remunerated a flat fee, which is lower than the litigation tariff.

#### Litigation

In instances where a mutual agreement is not achieved, the judge drafts a mediation solution and presents it to the involved parties. If an agreement is reached, the litigation process is averted, with the judge remunerated a flat fee that is lower than the tariff payable when Complex Process is used.

### Complex Process

#### Outline

The Complex Process acts as a fallback mechanism when the parties cannot concur on the choice of a judge or other terms. A mutual agreement on jurisdiction must be established for any process to occur, but there may exist a level of distrust that prevents a jointly accepted judge. In such circumstances, the system adapts to assign three judges:

* The attorney representing the applicant,
* The attorney representing the respondent, and
* An arbitrator jointly selected by the two attorneys.

This system, although more involved, remains streamlined for efficiency and cost-effectiveness, maintaining the balance between swiftness and the demands of judicature. The Complex Process is designed to handle intricate issues requiring detailed attention and processual protections for the parties involved. Ultimately, the criminal process of Liberland will adopt the framework of the Complex Process.

#### Mediation

1. A user (Party A) alleges that another user (Party B) has violated the standing body of rules (Liberland Law). In the case of a smart contract, this is done by triggering a function on the contract itself, which enters into 'litigation mode' until the process is resolved
2. Party A selects a judge (Attorney A) from the available roster, agrees to their terms, and pays collateral plus a transaction fee.
3. Party B is notified and selects a judge (Attorney B).
4. Party A and Attorney A compile and submit a Case.
5. Party B and Attorney B compile and submit a Response.
6. The Attorneys meet to create a Compromise, dividing the Case into parts and seeking resolution without litigation where possible.
7. Resolved parts of the Case are executed.
8. The unresolved parts proceed to Litigation.

#### Litigation

1. Attorneys mutually select a third Judge (the Arbitrator).
2. The Arbitrator delivers a Judgement, analysing the Application and Response according to Liberland law and relevant contract, resulting in statements of "Party X pays to Party Y," backed by a rationale.
3. If the Parties accept, the judgement is executed. If a Party rejects, the Party pays the appeals fee, and an appeal process commences.

#### Appeal

**Outline**

An appeal can ensue after either the Simple Process or the Complex Process is completed. It is initiated upon the request of a party, presenting costs to the petitioner and imposing time constraints, namely the period until adjudication, upon the other party. Additionally, the assurance of the first instance's final verdict is jeopardised. Parties may agree in advance to forgo the appeal process, rendering the first instance judgement as the final verdict, anticipated to be prevalent primarily with the Simple Process.

**Steps of an Appeal**

1. An Appeal Judge is appointed by the algorithm.
2. The Appeal Judge examines the appeal points and formulates an Appeal Verdict.

The final Verdict is executed on the Collateral and the Pooled LLM.

### Enactment of Awards

#### The Optimal Circumstance

A contract or a case is collateralized such that the collateral is sufficient to cover any additional payments prescribed in the final verdict beyond the awarded sum and the Court Costs. In this scenario, the collateral serves as a mechanism for the execution of the judgement. A third party, such as an insurance company may handle collateral.

#### Case with Insufficient Collateral

**Seizing PolitiPooled LLM**

The judge is imbued with the authority to designate an individual's politipooled (staked) LLM as collateral. Upon such a declaration, an involuntary unpooling of the owing party's pooled LLM stash will ensue, optionally carrying typical ramifications like the forfeit of voting rights associated with that stash. If the full amount is subsequently paid, this directive is withdrawn. However, under circumstances where:

* there is a violation of the Non-Aggression Principle, implicating aggressive conduct against another individual's person or property, or
* the damage incurred exceeds one's LLM stash,

The offender's LLM balance could turn negative, resulting in their listing on Liberland's 'wanted' roster, rendering them a 'persona non grata'. Consequently, they lose their voting rights and potentially access to other Liberland services until the owed amount is fully settled.

**Enforcement Beyond the Chain**

In instances where either of the aforementioned methods cannot enforce the judgement, the awarded sum will be incorporated into a conventional contract or appended as a supplement if the dispute is contract-related. This contract, endorsed by both parties, holds legitimacy outside of Liberland, akin to any other contract. It can be presented to an enforcement agency for execution, even against the unwilling party's resistance. Note that this is just an explanation of the process and doesn't represent a deliverable for the grant.

### Functionality: Traditional Contracts

#### Overview

Most contractual relationships in the world aren't currently simple and predictable enough to be run on smart contracts. This is likely to remain so even in the age of AI, at least for a decade or so. In the meantime, dumb contracts, that is, traditional contracts, are what runs the world of business and your everyday life. What is a dumb contract? It is an agreement you make with another human being or corporation. It is also a smart contract, in a way, but it runs on the hardware and the operating system of your brain.

How will it work? Alice and Bob enter into a traditional contract for the sale of goods. They agree to use the Liberland Blockchain Judiciary system for any potential disputes. They choose a judge from the roster and agree on the collateral and fees. The contract is then recorded on the blockchain. Why would someone want to do this?

#### Benefits:

* **Efficiency and Speed**: The Liberland Blockchain Judiciary system offers a Simple Process for dispute resolution. If a dispute arises, Alice or Bob can trigger the judge to give a binding opinion. This process is designed to be quick and more economical than traditional legal systems, potentially resolving disputes within a few days.
* **Cost-Effectiveness**: The system is designed to be more economical than traditional legal systems. The costs are defined upfront and include the judge's fees and any potential award to the victorious party. This transparency and predictability of costs can make the system more attractive to parties entering into a contract.
* **Security and Trust**: The system is built on the Liberland Blockchain, providing a secure and immutable record of the contract and any subsequent dispute resolution proceedings. This can increase trust between the parties and reduce the risk of fraudulent claims.
* **Payment Processing**: The blockchain can also be used to process payments related to the contract. This can be particularly useful in cases where the contract involves regular payments or where the amount of payment is dependent on certain conditions being met. The blockchain can automatically process these payments when the conditions are met, reducing the need for manual intervention and the risk of non-payment.
* **Smartification of Traditional Contracts**: While the contract itself may be a traditional contract, the use of the blockchain allows for certain aspects of the contract to be automated. For example, payments can be automatically triggered when certain conditions are met. This can make the contract more efficient and reduce the potential for disputes.

### Functionality: Advisory Option

In state administration beyond dispute resolution and advisory opinions, we plan to extend the use of this system to other areas, such as administrative decisions on-chain.

For example, the process of granting or denying citizenship could be complemented by our decentralised system. The Ministry of Interior’s Citizenship Agency would work with the Citizen applicant through steps such as proof of commitment (locked stake), KYC, and citizenship interview.

Afterwards, they would create a brief report on the results and a more detailed report on the applicant's background. The Judge would then Confirm or Reject the applicant. A Confirmed applicant becomes a Citizen, while a Rejected one must wait one year before re-applying.

This is not an exhaustive list of potential applications for our system. We encourage other builders to explore further expansions.

### Functionality: Decentralised Registers

Along with the previous system, we can also decentralise our property register operations. The relevant Ministry would create an entry and add background information, which is generally straightforward or automated.

The Judge then makes a final Confirmation or Rejection. These decisions will mostly be affirmations. Hence they are considered low-stakes/low gains procedures.

To make these processes more engaging, we could utilise the Complex Advisory Opinion and establish a group of on-chain Registrars who operate the Registry instead of the Ministry. These Registrars could even propose different opinions on what to inscribe, gamifying the processes and making these matters more interesting.

### Development and Contact Information

The Liberland Blockchain is being developed by a team led by Dorian Stern-Vukotic, with Kacper Zuk as Senior Developer. The team is supported by Liberland Limited, a Hong Kong-based Limited Liability Company. The intended languages of development are Rust for the backend and Javascript/Angular for the frontend.

The Liberland team can be reached via email at <justice@liberland.org>, and the project's code repository can be found at <https://github.com/liberland/liberland\\_substrate>.


# Tokenomics Primer

## Division of Power

As all modern democratic countries, Liberland employs division of power in its government and, thereby, also on its blockchain governance mechanism. The main concentration of power on a blockchain is in the node owners and those who write new blocks - the [Validators](https://en.wikipedia.org/wiki/Proof_of_stake#Validator). In a [DAO](https://en.wikipedia.org/wiki/Decentralized_autonomous_organization), the power of democracy in the system would directly derive from ownership of the coin that the Validators and Nominators use. Such a concentration of power is not desirable, as, in effect, it would ensure with mathematic certainty that those best poised to become officials in Liberland would also be those who count the votes.

To counter this, we have separated the Validator power from the governance power. So the two-token system was born: the governance token, Liberland Merit (LLM), and the coin, Liberland Dollar (LLD).

## Liberland Dollar (LLD)

### Overview

Liberland Dollar is the native coin of Liberland Blockchain. Its primary purposes are:

1. Operational token of the Liberland blockchain, used by validators and stakers to secure the chain, as well as paying gas fees for transactions, contracts, judiciary and companies
2. the money to purchase goods and services (mainly off-chain), hence, the medium to record market values of primarily real-world articles.

Despite the name, LLD is not a stablecoin but tradeable digital money, just like BTC. As such, the price is strictly market-based. The price of LLD is determined by [open markets](https://www.coingecko.com/en/coins/liberland-lld).

Please note that any references to a "preferred currency" refers solely to a government unit of accounting. There is no legal tender in Liberland. Everybody in Liberland is able to pay with whatever currency, barter, favours or other means of exchange the seller will accept, without any government interference.

### Tokenomics

#### General

The system is a sovereign chain based on a fork of Parity's Substrate framework, which powers the [Polkadot](https://en.wikipedia.org/wiki/Polkadot_\(cryptocurrency\)) (DOT) blockchain and parachains. The main mechanisms Liberland adopted from polkadot have been created by researchers, and tested both by auditors and in practice.

### Initial distribution

The system issued **3 000 000 LLD** at time of token generation, which is markedly less than the initial offerings of most cryptocurrencies. Tokens were initially airdropped to Liberland citizens and other holders of staked LLM, proportional to their LLM holdings.

'Day 0' initial distribution, on 11.2.2024 was roughly as follows

| Name                       | Amount    |
| -------------------------- | --------- |
| Liberlanders & LLM holders | 1,350,000 |
| Liberland government       | 850,000   |
| Listing liquidity reserve  | 800,000   |

### Current distribution

As of 27.07.2024 the distribution of tokens is roughly as follows

| Category                 | Description                               | # Tokens  | % of Total |
| ------------------------ | ----------------------------------------- | --------- | ---------- |
| Total                    | Total amount of existing tokens           | 3,107,200 | 100%       |
| Staked                   | Staked tokens                             | 528,224   | 17%        |
| Government Liquid        | LLD across all government accounts        | 255,309   | 8.21%      |
| Government Locked        | Unlocking 50k/month                       | 500,000   | 16.1%      |
| CEX liquidity            | CEX liquidity or reserved for new listing | 737,768   | 23.8%      |
| DEX liquidity            | DEX liquidity pools                       | \~350,000 | 11.26%     |
| Liberlanders and traders | Not staked, not on exchanges              | 735,899   | 23.7%      |

### Government tokens

Government of Liberland has LLD holdings that it uses to invest and reward contributors to the Liberland ecosystem. A significant portion of the tokens (500,000), representing about 70% of all LLD held by the government are held in lock contracts, unlocking 50k monthly. List of lock contracts can be [found here](https://docs.google.com/spreadsheets/d/1QRwazEjj6jeGD_D6LgtxDgkr2InmgRwFv-pbR2ZTvWk/edit?usp=sharing)

A majority of government 'spending' so far has been for providing liquidity to new exchange listings, such as Uniswap and MEXC.

The rest of the tokens are 'soft precommited' over a period of a few years in the following manner

| Purpose                     | Description                                                       | # Tokens | % of Government | % of Total |
| --------------------------- | ----------------------------------------------------------------- | -------- | --------------- | ---------- |
| Total government            | All LLDs across all govt accounts                                 | 776,530  | 100%            | 100%       |
| Liquidity for new exchanges | Planned Bybit, Bitget, Kucoin, OKX, Raydium                       | 200,000  | 25.7%           | 6.4%       |
| Settlement                  | Physical settlement on Liberland, Ark, Liberbase                  | 125,000  | 16.1%           | 4%         |
| Marketing                   |                                                                   | 175,000  | 22.5%           | 5.6%       |
| Development                 | Judiciary, hybrid contracts and company ecosystem, other dev      | 115,000  | 14.8%           | 3.7%       |
| Diplomacy & legal           | Representative offices, international compliance etc.             | 85,000   | 10.9%           | 2.7%       |
| Incentives & misc           | Misc spendings including incentives for example liquidity farming | 76,530   | 9.6%            | 2.5%       |

#### Inflation

The maximum coded inflation is 10 percent per year, subject to reduction by governance. Inflation is distributed to validators, stakers and the government. The purpose of inflation is to make sure the servers running the blockchain - validators - are running sustainably and to incentivise staking. Given that Liberland blockchain is a proof of stake chain, validator costs will stay comparatively low as adoption increases.

**Path to deflation**

Inflation is expected to decrease as LLD price and adoption(and with it, gas fees income) increase. After a certain degree of adoption transaction and gas fees will be enough to cover validator costs. Fees for complex business uses such as legally and internationally enforcable on-chain contracts under Liberland court jurisdiction could be enough to justify removing inflation by setting it to 0% after which burn mechanisms will make LLD slightly deflationary.

### Validators

[Validators](https://wiki.polkadot.network/docs/learn-staking#selection-of-Validators) get selected by the algorithm based on the size of their stake. Validators must be Liberland Citizens. Their responsibility is to [produce new block candidates](https://wiki.polkadot.network/docs/learn-consensus#block-production-babe) and [finalize blocks](https://wiki.polkadot.network/docs/learn-consensus#finality-gadget-grandpa). Validators are selected per epoch and misbehaving Validators can be "slashed" by the system.

### Nominators and stakers

[Nominators](https://wiki.polkadot.network/docs/learn-staking#selection-of-Validators), also known as stakers, ensure the true decentralization of the chain. Anyone can be a Nominator and becoming one is the question of having some LLD and setting up a stash. Nominators don't get reward for hosting a node, but for staking their LLD into a node of an existing Validator, hereby increasing their chance at nomination.

[Read the staking guide here](/blockchain/for-validators-nominators-and-stakers/staking)

### Crosschain bridge

Liberland tokens can be [bridged using a crosschain Hashi bridge](/blockchain/ecosystem/cross-chain-bridge), which allows LLD to be tradeable on other chains, such as Ethereum, SORA, and (coming soon) BnB.

The bridge works both ways, so tokens from other chains, such as ETH, wBTC, USDT, XOR, DOT and others are available for Liberland exchanges, companies, contracts and courts directly on the Liberland blockchain.

| Tokens on chain | # Tokens  | % of Total |
| --------------- | --------- | ---------- |
| Liberland       | 2,474,217 | 79.7%      |
| Ethereum        | 532,883   | 17.1%      |
| Sora            | 1,000     | \~0%       |
| Solana          | 100,000   | 3.2%       |

### Listing

LLD is now [listed on several centralized exchanges](/blockchain/ecosystem/how-to-acquire-lld), and wrapped verions of the token available on decentralized exchanges on [Ethereum](https://matcha.xyz/tokens/ethereum/0x054c9d4c6f4ea4e14391addd1812106c97d05690), Polkaswap on SORA Network, Liberland DEX on Liberland Blockchain and, soon, [Raydium](https://raydium.io/swap/?inputMint=sol\&outputMint=GwKKPsJdY5oWMJ8RReWLcvb82KzW6FKy2bKoYW7kHr16) on Solana.

This combination of CEXs and DEXs makes it easier for Citizens, e-Residents and other supporters to easily obtain LLD and LLM.

Decentralized exchanges are, in the opinion of the Senate and core contributors, more closely related with Satoshi's vision of peer-to-peer electronic cash than centralized exchanges.

## Liberland Merit (LLM)

### Overview

Liberland Merit (LLM) is the governance token representing a share in the State and nationhood of Liberland. LLM is not a security created with the expectation of revenue; instead, it is legally close to shares in joint ownership, like in case of housing cooperatives; LLM represents one's share in the country. Governance power is connected to LLM, and there is no possibility of other governance and no separating of this power from the token.

![LLM Management Flow](/files/W7WjgEsgWqxAtQqq2t6d)

### PolitiPooling

To prevent [plutocratic](https://en.wikipedia.org/wiki/Plutocracy) concentration of power, one can only utilize LLM in politics if one vests them on a tight schedule. This vesting is called "PolitiPooling." PolitiPooled LLM is locked, and the user can only unvest 10 percent in a year: payable monthly, 1/12th of 1/10th of total vested amount, each month.

### Citizenship on the Blockchain

Liberland, as a country, acknowledges the importance of citizenship. Only Citizens with 5000 PolitiPooled (a.k.a. staked) LLM have full political rights associated with citizenship in Liberland. In this way, Liberland replaces the usual requirements proving a personal connection to the country through vesting. Where one should gain "honorary citizenship" for their contributions, they won't be able to vote in elections or referenda unless they also PolitiPool. We can expect those who commit their funds to Liberland long-term to have a provable bond with the land and a stake in the country's success.

### Tokenomics

Inspired by Bitcoin (BTC), LLM has a fixed maximum supply of **70 000 000** tokens. With losses expected due to lost wallets and other factors, this token will, in time, become deflationary. The initial price for LLM was 1 USD, increased to 2 USD on 11 September 2023, and will change frequently when LLM begins to trade on the open market. According to Liberland's ethos and paraphrasing Adam Smith, the price of 1 LLM will be *"whatever the purchasers are willing to pay for it."*


# Roadmap

## Already done

* [Liberland dApp](https://blockchain.liberland.org)
* Congress elections
* Government onchain budgeting system
* LLDEX
* Listed on Uniswap, Raydium, Sunio, polkaswap, MEXC, Coinstore, Bitmart, Biconomy, Emirex
* Liberland companies
* Proof of citizenship validator model
* NFTs
* Ministries operating on chain
* Legally binding on chain contracts, enforcable by onchain judiciary
* Governance meritocracy with democratic vetos
* Judiciary v0.5
* Liberland passports and nationality valid KYC on select exchanges (Biconomy) and credit cards
* LLD payment gateway v1
* Liberland mobile app
* Ledger support

## Q3 2025

### Ecosystem

* Full EVM and solidity compatibility
* Metamask support
* LLD on physical credit cards
* Bank accounts for Liberland companies
* LLD on BSC
* Crosschain LLD swaps
* maya btc trading pair

## Q4 2025

### Ecosystem

* Full judiciary completed
* DAO factories
* Company DAO builder
* Liberland becomes the first country to do 50%+ finances on chain
* Company LLM staking
* All Liberland legislation onchain, legally binding and subject to blockchain governance by citizens
* Citizen validator robust set-and-forget update
* Land and assets registry

## Future

* LLM dividends
* LLM launch
* Liberland stock market
* Privacy assets on LLChain
* Privacy voting on LLChain
* Hybrid traditional/smart contract library
* Liberland stablecoin
* Citizenship as contract
* Liberland marketplace, app and dApp integration

## Discarded milestones

* Commitments on LLD inflation

### Events

[Events calendar](https://calendar.google.com/calendar/u/0/embed?height=498\&wkst=2\&bgcolor=%23ffffff\&ctz=Europe/Prague\&src=dGhiM2p0Ymc4NGhnbjE3bjBxZWtkaGFpbmdAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ\&color=%23D6AE00\&showTabs=0\&showNav=0\&showPrint=0\&showDate=0\&mode=AGENDA\&showCalendars=0\&showTz=0\&showTitle=0)


# API

## Table of Contents

* [Overview](#overview)
* [RPC Endpoints & Chain Explorers](#rpc-endpoints--chain-explorers)
  * [Testnet](#testnet)
  * [Mainnet](#mainnet)
* [Common Operations](#common-operations)
  * [Get Latest Block Number](#get-latest-block-number)
  * [Create a New Address](#create-a-new-address)
* [Liberland Dollar (LLD)](#liberland-dollar-lld)
  * [Receive Wallet Balance](#receive-wallet-balance)
  * [Coin Transfer](#coin-transfer)
  * [Monitor LLD Transfers](#monitor-lld-transfers)
  * [Retrieve LLD Transaction Details Using Block Hash and Index](#retrieve-lld-transaction-details-using-block-hash-and-index)
* [Liberland Merit (LLM)](#liberland-merit-llm)
  * [Receive Wallet Balance](#receive-wallet-balance-1)
  * [Coin Transfer](#coin-transfer-1)
  * [Monitor LLM Transfers](#monitor-llm-transfers)
  * [Retrieve LLM Transaction Details Using Block Hash and Index](#retrieve-llm-transaction-details-using-block-hash-and-index)

## Overview

Liberland blockchain is based on [Polkadot SDK](https://polkadot.com/platform/sdk/).\
Recommended way to interact with the chain programmatically is through [@polkadot/api](https://github.com/polkadot-js/api) library.\
For those interested in a glimpse of the underlying RPC interactions, see the [Liberland CEX API: Low-Level RPC Overview](https://github.com/liberland/docs/blob/master/blockchain/API/centralized-exchanges-api-rpc.md).

## RPC Endpoints & Chain Explorers

### Testnet

| Type     | URL                                                                                                                | Description                             |
| -------- | ------------------------------------------------------------------------------------------------------------------ | --------------------------------------- |
| RPC      | `wss://testchain.liberland.org`                                                                                    | WebSocket endpoint                      |
| Explorer | [Polkadot Apps](https://polkadotjs.blockchain.liberland.org/?rpc=wss%3A%2F%2Ftestchain.liberland.org%2F#/explorer) | Web interface for exploring the testnet |

### Mainnet

| Type     | URL                                                                                                           | Description                                                          |
| -------- | ------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| RPC      | `wss://mainnet.liberland.org`                                                                                 | WebSocket endpoint (operated by the Government)                      |
| RPC      | `wss://liberland-rpc.dwellir.com`                                                                             | WebSocket endpoint (operated by Dwellir)                             |
| Explorer | [Polkadot Apps](https://polkadotjs.blockchain.liberland.org/?rpc=wss%3A%2F%2Fmainnet.liberland.org#/explorer) | Web interface for exploring the mainnet (operated by the Government) |
| Explorer | [Polkadot Apps](https://polkadotjs.blockchain.liberland.org/?rpc=wss://liberland-rpc.dwellir.com#/explorer)   | Web interface for exploring the mainnet (operated by Dwellir)        |

## Common Operations

### Get Latest Block Number

```javascript
import { ApiPromise, WsProvider } from "@polkadot/api";

const provider = new WsProvider("<WS_ENDPOINT>");
const api = await ApiPromise.create({ provider });
const bestNumber = await api.derive.chain.bestNumber();
console.log(bestNumber.toNumber());
```

### Create a New Address

To create a new address, a minimum of 1 LLD needs to be deposited as an existential deposit.

```javascript
import { ApiPromise, WsProvider, Keyring } from "@polkadot/api";

const provider = new WsProvider("<WS_ENDPOINT>");
const api = await ApiPromise.create({ provider });
const keyring = new Keyring({ type: "sr25519" });
const sender = keyring.addFromUri("<SENDER-ACCOUNT-PRIVATE-KEY>");
const transferExtrinsic = api.tx.balances.transfer(
  "<WALLET_ADDRESS_TO_CREATE>",
  AMOUNT, // 1_000_000_000_000 = 1 LLD
);
const txHash = await transferExtrinsic.signAndSend(sender);
```

## Liberland Dollar (LLD)

LLD is a native token of the Liberland blockchain and all transactions, calls and queries related to LLD are identical to any other Substrate chain like Polkadot.

### Receive Wallet Balance

```javascript
import { ApiPromise, WsProvider, Keyring } from "@polkadot/api";

const provider = new WsProvider("<WS_ENDPOINT>");
const api = await ApiPromise.create({ provider });
const balance = await api.query.system.account("<ACCOUNT_ID>");
console.log(balance.data.free.toHuman());
```

### Coin Transfer

For LLD transfers with transaction status monitoring, you can use the `balances.transferKeepAlive` method which ensures the sender's account remains active by automatically keeping the existential deposit amount. This differs from `balances.transferAllowDeath` which can empty the sender's account completely, potentially removing it from the blockchain state if the balance falls below the existential deposit.

```javascript
import { ApiPromise, WsProvider, Keyring } from "@polkadot/api";

const provider = new WsProvider("<WS_ENDPOINT>");
const api = await ApiPromise.create({ provider });
const keyring = new Keyring({ type: "sr25519" });
const sender = keyring.addFromUri("<SENDER-ACCOUNT-PRIVATE-KEY>");
const transferExtrinsic = api.tx.balances.transferKeepAlive(
  "<ACCOUNT_TO>",
  AMOUNT, // 1_000_000_000_000 = 1 LLD
);

// Monitor transaction status
const unsub = await transferExtrinsic.signAndSend(
  sender,
  ({ status, events }) => {
    console.log(`Current transaction status: ${status.type}`);

    if (status.isInBlock) {
      console.log(`Transaction included in block: ${status.asInBlock.toHex()}`);
    }

    if (status.isFinalized) {
      console.log(
        `Transaction finalized in block: ${status.asFinalized.toHex()}`,
      );

      // Check if the transaction was successful
      events.forEach(({ event }) => {
        if (api.events.system.ExtrinsicSuccess.is(event)) {
          console.log("Transaction succeeded");
        } else if (api.events.system.ExtrinsicFailed.is(event)) {
          const [dispatchError] = event.data;
          let errorInfo;

          if (dispatchError.isModule) {
            const decoded = api.registry.findMetaError(dispatchError.asModule);
            errorInfo = `${decoded.section}.${decoded.name}`;
          } else {
            errorInfo = dispatchError.toString();
          }

          console.log(`Transaction failed: ${errorInfo}`);
        } else if (api.events.balances.Transfer.is(event)) {
          const [from, to, amount] = event.data;
          console.log(
            `LLD Transfer successful: ${amount} from ${from} to ${to}`,
          );
        }
      });

      unsub();
    }
  },
);
```

### Monitor LLD Transfers

To monitor LLD transfers, subscribe to system events and filter for `Balances::Transfer` events.

```javascript
import { ApiPromise, WsProvider } from "@polkadot/api";

async function main() {
  const provider = new WsProvider("<WS_ENDPOINT>");
  const api = await ApiPromise.create({ provider });

  // Subscribe to system events
  const unsubscribe = await api.query.system.events((events) => {
    // Filter only the Balances.Transfer events
    events.forEach(({ event, phase }) => {
      if (api.events.balances.Transfer.is(event)) {
        // LLD transferred
        const [from, to, amount] = event.data;
        console.log(
          `LLD Transfer from: ${from.toString()} to: ${to.toString()} amount: ${amount.toString()}`,
        );
      }
    });
  });

  return unsubscribe;
}

main()
  .then((unsubscribe) => {
    console.log("Subscribed to Transfer events. Press Ctrl+C to exit.");
  })
  .catch((error) => {
    console.error("Error:", error);
    process.exit(1);
  });
```

### Retrieve LLD Transaction Details Using Block Hash and Index

Many infrastructure providers on existing blockchains, e.g. Ethereum, consider a transaction's hash as a unique identifier. In Substrate-based chains, a transaction's hash only serves as a fingerprint of the information within a transaction, and there are times when two transactions with the same hash are both valid.\
On a Substrate blockchain transactions (a.k.a. extrinsics) are uniquely identified by block hash and their index.

```javascript
import { ApiPromise, WsProvider } from "@polkadot/api";

const txId = {
  blockHash: BLOCK_HASH,
  index: EXTRINSIC_INDEX,
};
const provider = new WsProvider("<WS_ENDPOINT>");
const api = await ApiPromise.create({ provider });
const apiAt = await api.at(txId.blockHash);
const allEvents = await apiAt.query.system.events();

const txEvents = allEvents.filter(
  ({ phase }) =>
    phase.isApplyExtrinsic && phase.asApplyExtrinsic.eq(txId.index),
);

const successEvent = txEvents.find(({ event }) =>
  api.events.system.ExtrinsicSuccess.is(event),
);
const failureEvent = txEvents.find(({ event }) =>
  api.events.system.ExtrinsicFailed.is(event),
);

if (successEvent) {
  const transferEvents = txEvents.filter(({ event }) =>
    api.events.balances.Transfer.is(event),
  );
  transferEvents.forEach(({ event }) => {
    const [fromAccount, toAccount, amount] = event.data;
    console.log(
      `Transfer of ${amount} grains of LLD from ${fromAccount} to ${toAccount}`,
    );
  });
} else {
  const [dispatchError, dispatchInfo] = failureEvent.event.data;
  let errorInfo;

  // decode the error
  if (dispatchError.isModule) {
    // for module errors, we have the section indexed, lookup
    // (For specific known errors, we can also do a check against the
    // api.errors.<module>.<ErrorName>.is(dispatchError.asModule) guard)
    const decoded = api.registry.findMetaError(dispatchError.asModule);

    errorInfo = `${decoded.section}.${decoded.name}`;
  } else {
    // Other, CannotLookup, BadOrigin, no extra info
    errorInfo = dispatchError.toString();
  }

  console.log(`ExtrinsicFailed:: ${errorInfo}`);
}
```

## Liberland Merit (LLM)

LLM is an on-chain asset of the [Assets pallet](https://paritytech.github.io/substrate/master/pallet_assets/index.html) with ID of 1.

### Receive Wallet Balance

```javascript
import { ApiPromise, WsProvider } from "@polkadot/api";

const provider = new WsProvider("<WS_ENDPOINT>");
const api = await ApiPromise.create({ provider });
const LLMInfo = await api.query.assets.account(
  1, // ID of LLM
  "<WALLET_ADDRESS>",
);
console.log(LLMInfo.toJSON().data?.balance ?? "0x0");
```

### Coin Transfer

For token transfers with transaction status monitoring, you can use the `assets.transfer` method and subscribe to events. This allows you to track when the transaction is included in a block and finalized on the blockchain.

```javascript
import { ApiPromise, WsProvider, Keyring } from "@polkadot/api";

const provider = new WsProvider("<WS_ENDPOINT>");
const api = await ApiPromise.create({ provider });
const keyring = new Keyring({ type: "sr25519" });
const sender = keyring.addFromUri("<SENDER-ACCOUNT-PRIVATE-KEY>");
// The following value 1 is the ID token of LLM.
const transferExtrinsic = api.tx.assets.transfer(
  1,
  "<WALLET_ADDRESS>",
  1_000_000_000_000,
); // 1_000_000_000_000 = 1 LLM

// Monitor transaction status
const unsub = await transferExtrinsic.signAndSend(
  sender,
  ({ status, events, dispatchError }) => {
    console.log(`Current transaction status: ${status.type}`);

    if (status.isInBlock) {
      console.log(`Transaction included in block: ${status.asInBlock.toHex()}`);
    }

    if (status.isFinalized) {
      console.log(
        `Transaction finalized in block: ${status.asFinalized.toHex()}`,
      );

      // Check if the transaction was successful
      events.forEach(({ event }) => {
        if (api.events.system.ExtrinsicSuccess.is(event)) {
          console.log("Transaction succeeded");
        } else if (api.events.system.ExtrinsicFailed.is(event)) {
          const [dispatchError] = event.data;
          let errorInfo;

          if (dispatchError.isModule) {
            const decoded = api.registry.findMetaError(dispatchError.asModule);
            errorInfo = `${decoded.section}.${decoded.name}`;
          } else {
            errorInfo = dispatchError.toString();
          }

          console.log(`Transaction failed: ${errorInfo}`);
        } else if (api.events.assets.Transferred.is(event)) {
          const [assetId, from, to, amount] = event.data;
          if (assetId.eq(1)) {
            console.log(
              `Transfer successful: ${amount} LLM from ${from} to ${to}`,
            );
          }
        }
      });

      unsub();
    }
  },
);
```

### Monitor LLM Transfers

To monitor LLM transfers, subscribe to system events and filter for `Assets::Transferred` events with an ID of 1.

```javascript
import { ApiPromise, WsProvider } from "@polkadot/api";

async function main() {
  const provider = new WsProvider("<WS_ENDPOINT>");
  const api = await ApiPromise.create({ provider });

  // Target asset ID to monitor
  const targetAssetId = 1;

  // Subscribe to system events
  const unsubscribe = await api.query.system.events((events) => {
    // Filter for Assets.Transferred events
    events.forEach(({ event, phase }) => {
      if (api.events.assets.Transferred.is(event)) {
        const [assetId, from, to, amount] = event.data;

        if (assetId.eq(targetAssetId)) {
          // LLM transferred
          console.log(
            `LLM Transfer from: ${from.toString()} to: ${to.toString()} amount: ${amount.toString()}`,
          );
        }
      }
    });
  });

  return unsubscribe;
}

main()
  .then((unsubscribe) => {
    console.log("Subscribed to LLM transfers. Press Ctrl+C to exit.");
  })
  .catch((error) => {
    console.error("Error:", error);
    process.exit(1);
  });
```

### Retrieve LLM Transaction Details Using Block Hash and Index

Many infrastructure providers on existing blockchains, e.g. Ethereum, consider a transaction's hash as a unique identifier. In Substrate-based chains, a transaction's hash only serves as a fingerprint of the information within a transaction, and there are times when two transactions with the same hash are both valid.\
On a Substrate blockchain transactions (a.k.a. extrinsics) are uniquely identified by block hash and their index.

```javascript
import { ApiPromise, WsProvider } from "@polkadot/api";

const txId = {
  blockHash: BLOCK_HASH,
  index: EXTRINSIC_INDEX,
};
const provider = new WsProvider("<WS_ENDPOINT>");
const api = await ApiPromise.create({ provider });
const apiAt = await api.at(txId.blockHash);
const allEvents = await apiAt.query.system.events();

const txEvents = allEvents.filter(
  ({ phase }) =>
    phase.isApplyExtrinsic && phase.asApplyExtrinsic.eq(txId.index),
);

const successEvent = txEvents.find(({ event }) =>
  api.events.system.ExtrinsicSuccess.is(event),
);
const failureEvent = txEvents.find(({ event }) =>
  api.events.system.ExtrinsicFailed.is(event),
);

if (successEvent) {
  const transferEvents = txEvents.filter(({ event }) =>
    api.events.assets.Transferred.is(event),
  );
  transferEvents.forEach(({ event }) => {
    const [assetId, fromAccount, toAccount, amount] = event.data;
    if (assetId == 1) {
      console.log(
        `Transfer of ${amount} grains of LLM from ${fromAccount} to ${toAccount}`,
      );
    }
  });
} else {
  const [dispatchError, dispatchInfo] = failureEvent.event.data;
  let errorInfo;

  // decode the error
  if (dispatchError.isModule) {
    // for module errors, we have the section indexed, lookup
    // (For specific known errors, we can also do a check against the
    // api.errors.<module>.<ErrorName>.is(dispatchError.asModule) guard)
    const decoded = api.registry.findMetaError(dispatchError.asModule);

    errorInfo = `${decoded.section}.${decoded.name}`;
  } else {
    // Other, CannotLookup, BadOrigin, no extra info
    errorInfo = dispatchError.toString();
  }

  console.log(`ExtrinsicFailed:: ${errorInfo}`);
}
```


# Chain Explorer API

## Overview

Liberland is running a chain indexer & explorer with publicly available GraphQL API. This API allows fetching & filtering historical information about the chain, especially data about past events and extrinsics (transactions).

For interacting with the API, you can use one of many [GraphQL clients](https://graphql.org/community/tools-and-libraries/?tags=client) or run raw HTTP queries.

## Endpoints & reference docs

API & GraphQL Playground endpoints:

* Liberland Mainnet: <https://archive.mainnet.liberland.org/>
* Bastiat (Liberland Testnet): <https://archive.testchain.liberland.org/graphql>
* Total LLD Supply: <https://api.blockchain.liberland.org/v1/total-issuance/lld>
* Circulating (Unlocked) LLD Supply: <https://api.blockchain.liberland.org/v1/liquid-available/lld>

Visit the [Playground](https://archive.mainnet.liberland.org/) to see up-to-date reference schema and docs.

## Paging

Queries can use `first` param to limit the amount of returned entries and `after` param to get next page of data. Use `hasNextPage` and `endCursor` values of `pageInfo` entity to populate them. You can also use `totalCount` value to know total number of entries.

## Entities

### `assetTransfer`

All transfers of any [pallet-assets](https://paritytech.github.io/polkadot-sdk/master/pallet_assets/index.html)-based assets. Includes LLM (which is asset `1`), but not LLD. Contains following values:

* `id` - unique identifier of this transfer - based on `blockNumber` and `eventIndex`
* `asset` - ID of the asset being transferred. See [list of assets on Polkadot.js Apps](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fmainnet.liberland.org#/assets).
* `fromId` - Address of the account that sent the asset
* `toId` - Address of the account that received the asset
* `value` - Amount of the asset transferred. Subject to decimals config of given asset (so value `1000000000000` for LLM asset means `1 LLM`)
* `blockId` - Hash of the block containing this transfer
* `blockNumber` - Number of the block containing this transfer
* `extrinsicIndex` - Index of the extrinsic in the block that caused this transfer. May be null if transfer wasn't done by extrinsic.
* `eventIndex` - Index of the transfer event in the block.
* `block` - Additional details about the block, including timestamp.

### `merit`

All transfers of the LLM token. Contains following values:

* `id` - unique identifier of this transfer - based on `blockNumber` and `eventIndex`
* `fromId` - Address of the account that sent the asset
* `toId` - Address of the account that received the asset
* `value` - Amount of the asset transferred. Subject to decimals config of given asset (so value `1000000000000` for LLM asset means `1 LLM`)
* `blockId` - Hash of the block containing this transfer
* `blockNumber` - Number of the block containing this transfer
* `extrinsicIndex` - Index of the extrinsic in the block that caused this transfer. May be null if transfer wasn't done by extrinsic.
* `eventIndex` - Index of the transfer event in the block.
* `block` - Additional details about the block, including timestamp.

### `transfer`

All transfers of the LLD token. Doesn't include actions like staking or transaction fees. Contains following values:

* `id` - unique identifier of this transfer - based on `blockNumber` and `eventIndex`
* `fromId` - Address of the account that sent the asset
* `toId` - Address of the account that received the asset
* `value` - Amount of the asset transferred. Subject to decimals (so value `1000000000000` for means `1 LLD`)
* `blockId` - Hash of the block containing this transfer
* `blockNumber` - Number of the block containing this transfer
* `extrinsicIndex` - Index of the extrinsic in the block that caused this transfer. May be null if transfer wasn't done by extrinsic.
* `eventIndex` - Index of the transfer event in the block.
* `block` - Additional details about the block, including timestamp.

### `staking`

LLD staking events. Contains following values:

* `id` - unique identifier of this staking event - based on `blockNumber` and `eventIndex`
* `userId` - Address of the account that this event refers to
* `value` - Amount of the asset transferred. Subject to decimals (so value `1000000000000` for means `1 LLD`)
* `method` - Method that triggered this event. Possible values:
  * `Bonded` - User staked LLD
  * `Withdrawn` - User unstaked LLD
  * `Rewarded` - User got rewarded with interest
* `blockId` - Hash of the block containing this transfer
* `blockNumber` - Number of the block containing this transfer
* `extrinsicIndex` - Index of the extrinsic in the block that caused this transfer. May be null if transfer wasn't done by extrinsic.
* `eventIndex` - Index of the transfer event in the block.
* `block` - Additional details about the block, including timestamp.

## Sample GraphQL queries

### Fetching LLD transfers of given user

Includes paging, fetches 50 entries per page.

```
query Transfers($userId: String, $cursor: Cursor) {
  transfers(
    filter: {
      or: [
        { fromId: { equalTo: $userId } },
        { toId: { equalTo: $userId } }
      ],
    },
    after: $cursor,
    first: 50,
    orderBy: BLOCK_NUMBER_DESC
  ) {
    nodes {
      id,
      fromId,
      toId,
      value,
      eventIndex,
      block {
        number
        timestamp
      },
    }
    pageInfo {
      hasNextPage,
      endCursor,
    }
    totalCount
  }
}
```

## Sample raw queries

### Fetching LLD transfers of a given user

URL: `https://archive.mainnet.liberland.org/` Method: `POST`

Payload:

```
{
    "operationName": "Transfers",
    "variables": {
        "userId": "5EYCAe5g8CDuMsTief7QBxfvzDFEfws6ueXTUhsbx5V81nGH"
    },
    "query": "query Transfers($userId: String, $cursor: Cursor) {\n  transfers(\n    filter: {or: [{fromId: {equalTo: $userId}}, {toId: {equalTo: $userId}}]}\n    after: $cursor\n    first: 50\n    orderBy: BLOCK_NUMBER_DESC\n  ) {\n    nodes {\n      id\n      fromId\n      toId\n      value\n      eventIndex\n      block {\n        number\n        timestamp\n      }\n    }\n    pageInfo {\n      hasNextPage\n      endCursor\n    }\n    totalCount\n  }\n}\n"
}
```

To fetch next page, pass `endCursor` from previous call as `cursor` variable.

### Fetching LLD transfers of a given user since block number

URL: `https://archive.mainnet.liberland.org/` Method: `POST`

Payload:

```
{
    "operationName": "Transfers",
    "variables": {
        "userId": "5EYCAe5g8CDuMsTief7QBxfvzDFEfws6ueXTUhsbx5V81nGH",
        "sinceBlockNumber": 1000
    },
    "query": "query Transfers($userId: String, $sinceBlockNumber: BigFloat, $cursor: Cursor) {\n  transfers(\n    filter: {or: [{fromId: {equalTo: $userId}}, {toId: {equalTo: $userId}}], blockNumber: {greaterThan: $sinceBlockNumber}}\n    after: $cursor\n    first: 50\n    orderBy: BLOCK_NUMBER_DESC\n  ) {\n    nodes {\n      id\n      fromId\n      toId\n      value\n      eventIndex\n      block {\n        number\n        timestamp\n      }\n    }\n    pageInfo {\n      hasNextPage\n      endCursor\n    }\n    totalCount\n  }\n}\n"
}
```

To fetch next page, pass `endCursor` from previous call as `cursor` variable.

### Fetching LLM transfers of a given user

URL: `https://archive.mainnet.liberland.org/` Method: `POST`

Payload:

```
{
    "operationName": "Merits",
    "variables": {
        "userId": "5EYCAe5g8CDuMsTief7QBxfvzDFEfws6ueXTUhsbx5V81nGH"
    },
    "query": "query Merits($userId: String, $cursor: Cursor) {\n  merits(\n    filter: {or: [{fromId: {equalTo: $userId}}, {toId: {equalTo: $userId}}]}\n    after: $cursor\n    first: 50\n    orderBy: BLOCK_NUMBER_DESC\n  ) {\n    nodes {\n      id\n      fromId\n      toId\n      value\n      eventIndex\n      block {\n        number\n        timestamp\n      }\n    }\n    pageInfo {\n      hasNextPage\n      endCursor\n    }\n    totalCount\n  }\n}\n"
}
```

To fetch next page, pass `endCursor` from previous call as `cursor` variable.

### Fetching asset transfers of a given user

URL: `https://archive.mainnet.liberland.org/` Method: `POST`

Payload:

```
{
    "operationName": "AssetTransfers",
    "variables": {
        "userId": "5EYCAe5g8CDuMsTief7QBxfvzDFEfws6ueXTUhsbx5V81nGH"
    },
    "query": "query AssetTransfers($userId: String, $cursor: Cursor) {\n  assetTransfers(\n    filter: {or: [{fromId: {equalTo: $userId}}, {toId: {equalTo: $userId}}]}\n    after: $cursor\n    first: 50\n    orderBy: BLOCK_NUMBER_DESC\n  ) {\n    nodes {\n      id\n      asset\n      fromId\n      toId\n      value\n      eventIndex\n      block {\n        number\n        timestamp\n      }\n    }\n    pageInfo {\n      hasNextPage\n      endCursor\n    }\n    totalCount\n  }\n}\n"
}
```

To fetch next page, pass `endCursor` from previous call as `cursor` variable.

### Fetching staking events of a given user

URL: `https://archive.mainnet.liberland.org/` Method: `POST`

Payload:

```
{
    "operationName": "Stakings",
    "variables": {
        "userId": "5EYCAe5g8CDuMsTief7QBxfvzDFEfws6ueXTUhsbx5V81nGH"
    },
    "query": "query Stakings($userId: String, $cursor: Cursor) {\n  stakings(\n    filter: {userId: {equalTo: $userId}}\n    after: $cursor\n    first: 50\n    orderBy: BLOCK_NUMBER_DESC\n  ) {\n    nodes {\n      id\n      userId\n      method\n      value\n      eventIndex\n      block {\n        number\n        timestamp\n      }\n    }\n    pageInfo {\n      hasNextPage\n      endCursor\n    }\n    totalCount\n  }\n}\n"
}
```

To fetch next page, pass `endCursor` from previous call as `cursor` variable.


# Ecosystem

## Wallets

* [Subwallet](https://subwallet.app) is a mobile app with a built-in browser that allows anyone to access Liberland Blockchain, and interact with the [primary app](https://blockchain.liberland.org).
* [Talisman](https://talisman.xyz) is a Chrome browser extension for interacting with Liberland Blockchain. It supports viewing, sending, and receiving LLD, and also supports interacting with the [primary app](https://blockchain.liberland.org).
* [Fearless Wallet](https://fearlesswallet.io) offers a mobile wallet with Liberland Blockchain support for sending and receiving LLD.
* [Polkadot Extension](https://polkadot.js.org/extension/) is a Chrome/Firefox browser extension for interacting with Liberland Blockchain.
* [Edge Wallet](https://edge.app) is a mobile app wallet that is best suited for cold storage. That is, tokens you don't expect to use often, and don't want connected to a web app.
* [Phantom](https://phantom.app) is one of the most popular and easy-to-use wallets for Solana, but also works with other blockchains like Ethereum.

### Contract Addresses

* Liberland Blockchain: native coin, no contract address.
* Ethereum: `0x054c9D4C6F4EA4E14391addD1812106c97D05690`
* Solana: `GwKKPsJdY5oWMJ8RReWLcvb82KzW6FKy2bKoYW7kHr16`
* TRON: `TC8QDMS2nLdWMT7iJwvtG5YH6XiGEJT6om`

### Centralized Exchanges

* [Alchemy Pay](https://ramp.alchemypay.org/?appId=N9lV3uIGF0y1amAE#/index) is a leading fiat on-ramp provider where you can buy LLD on Liberland Blockchain.
  * Identity verification (KYC) is not required to purchase less than US$150 of LLD.
* [MEXC](https://www.mexc.com/exchange/LLD_USDT?_from=liberland) is a leading centralised exchange where you can buy, sell, deposit and withdraw LLD on Liberland Blockchain.
* [BitMart](https://www.bitmart.com/trade/en-US?type=spot\&symbol=LLD_USDT) is a leading centralised exchange where you can buy, sell, deposit, and withdraw LLD on Liberland Blockchain.
* [Coinstore](https://h5.coinstore.com/h5/signup?invitCode=IgwIq8) is a centralised exchange where you can buy, sell, deposit, and withdraw LLD on Liberland Blockchain.
* [BiFinance](https://www.bifinance.com/trade?symbol=LLD%2FUSDT) is a centralised exchange where you can buy, sell, deposit, and withdraw LLD on Liberland Blockchain.

### Other Blockchains

* [Emirex](https://emirex.com/spot/trading/LLDUSDT) is a centralised exchange where you can buy, sell, deposit, and withdraw LLD.
* [Matcha](https://matcha.xyz/tokens/ethereum/0x054c9d4c6f4ea4e14391addd1812106c97d05690?sellChain=1\&sellAddress=0xdac17f958d2ee523a2206206994597c13d831ec7) is a decentralized exchange aggregator, making it easy to swap any token on Ethereum for Liberland Dollar. A portion of LLD's supply was bridged to Ethereum and deployed to Uniswap in June 2024.
* [Polkaswap](https://polkaswap.io/#/swap/XOR/LLD) is a decentralized exchange on the SORA Network. A portion of LLD supply is available for swapping on SORA Network via Polkaswap.
* [Raydium](https://raydium.io/swap/?inputMint=sol\&outputMint=GwKKPsJdY5oWMJ8RReWLcvb82KzW6FKy2bKoYW7kHr16) is a decentralized exchange on the Solana blockchain. A portion of LLD Supply is available on Solana, bridged from Ethereum using deBridge's dePort.
* [Sun.io](https://sun.io/?lang=en-US#/v3/swap?t1=TC8QDMS2nLdWMT7iJwvtG5YH6XiGEJT6om\&t0=T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb\&type=swap) is a decentralized exchange on the TRON network. A portion of LLD supply is available for swapping on TRON via Sun.

### Bridges

* [HASHI Bridge](https://polkaswap.io/#/bridge/) connects Liberland Blockchain to SORA Network, Ethereum, Acala, Polkadot, and other blockchains. It's possible to bridge LLD and Liberland Merit (LLM) to SORA Network and Ethereum, and to bridge tokens like WBTC, WETH, USDT and others to Liberland Blockchain.
* [deBridge dePort](https://app.debridge.finance/deport?inputChain=1\&outputChain=7565164\&inputCurrency=0x054c9d4c6f4ea4e14391addd1812106c97d05690\&outputCurrency=GwKKPsJdY5oWMJ8RReWLcvb82KzW6FKy2bKoYW7kHr16) connects Ethereum to Solana, allowing you to bridge LLD between Ethereum and Solana.
* [BTTC](https://bt.io) is the bridge that connects LLD between Ethereum and TRON, allowing you to bridge LLD between the two blockchains.

### Tutorials

* [YouTube](https://www.youtube.com/playlist?list=PLhICyUUBScjlxw9G1oUVd7Zptzg1_gyXC) playlist with video guides about Liberland Blockchain and how to use it. This includes tutorials on using various wallets, bridges, decentralized exchanges, and more.


# How to Bridge to Ethereum

You can swap and bridge LLD through [Liberstake](https://exchange.liberstake.ll.land/).

## Current Bridge Status

The Liberland ↔ Ethereum bridging infrastructure is currently undergoing maintenance and final-stage integration work on the Liberland side.

The underlying  [HASHI Bridge](https://polkaswap.io/#/bridge/), the Liberland to Ethereum cross-chain bridge technology remains functional in general. However, the Liberland-specific routing and final validation steps are still being finalized and tested to ensure reliability and security.&#x20;

Bridging to and from Liberland is therefore temporarily unavailable. **But the Bridge will be ready soon.**

We are actively completing the remaining integration steps and debugging the final components. Once this process is complete, bridging functionality will be restored.

To use the HASHI bridge, you will need native tokens on the chains you are bridging to and from.

In addition, the bridge is a decentralised app (dApp) and therefore you need to use a wallet that can interact with dApps. For example, [a PC browser with a wallet extension](/blockchain/ecosystem/desktop-wallet) or [Subwallet](/blockchain/ecosystem/mobile-wallet) on mobile devices.

Edge Wallet will not work for this as it cannot connect or interact directly with dApps.

#### Important Notes

* Only use officially announced and supported bridge interfaces.
* Do not rely on third-party or unofficial services claiming to offer bridging functionality.
* Always verify announcements through official Liberland communication channels.

Further updates will be published as soon as the bridge is fully operational again.

### Liberland <> SORA bridge

For this, you will just need LLD or XOR depending on the direction of bridging

* Go to [HASHI Bridge](https://polkaswap.io/#/bridge/).
* Connect your Substrate account that you will use for Liberland and SORA.
* Select the Liberland network.
* Choose the token you wish to bridge and the direction (Liberland to SORA or SORA to Liberland)

![Liberland SORA bridge](/files/0k6I7evHB0K7b2IX8zBM)

* Choose the amount and select 'Bridge'. Your wallet will ask you to confirm the necessary transactions.

### SORA <> Ethereum bridge

For bridging from SORA to Ethereum, you will need an Ethereum wallet with some ETH in it, and a Substrate account with some XOR in it.

#### Getting XOR

If you bridged from Liberland, you can swap [LLD for XOR on Polkaswap](https://polkaswap.io/#/swap/LLD/XOR). About 5 USDT of XOR should be enough, so 2 to 5 LLD swapped for XOR to be on the safe side.

![Swap LLD for XOR](/files/bA7zm0nAZgOeZr9dLREK)

Alternatively, if you bridged from Ethereum to SORA, you can sell some ETH for XOR instead.

Or DOT from Polkadot. Or KSM from Kusama. HASHI Bridge is amazing in this way, giving you options and not hamstringing you into needing to acquire the native coin first.

#### Getting ETH

You need to have an Ethereum wallet with enough ETH to pay gas fees. We recommend at least 50 USD worth of ETH to have enough to bridge and open a position on a decentralised exchange (DEX).

#### SORA <> ETH bridge

* With tokens and wallets ready, go to [HASHI bridge](https://polkaswap.io/#/bridge/)
* Select the Ethereum network
* Select the token
* Connect both substrate and ETH wallet (Subwallet supports both)
* Enter the amount and bridge! This may take a few minutes.

After it's done, you may be prompted to add the token to your wallet. Accept and you should see it listed there, along with the number of tokens.

![Liberland SORA bridge](/files/5UAktAjpLk2IsVQFmByj)

You are now ready to trade on DEXes such as [Uniswap](https://matcha.xyz/tokens/ethereum/0x054c9d4c6f4ea4e14391addd1812106c97d05690?buyChain=1\&buyAddress=0xdac17f958d2ee523a2206206994597c13d831ec7\&sellAmount=500).


# How to Bridge to Solana

How to Bridge LLD from Ethereum to Solana

This tutorial assumes you have already bridged Liberland dollar (LLD) from Liberland Blockchain -> SORA Network -> Ethereum. You can watch a tutorial on how to perform those steps at Liberland's [YouTube channel](https://www.youtube.com/watch?v=PI4hiLOK03I).

To start your Ethereum -> Solana journey, you need a few things:

* An Ethereum wallet
* ETH for transaction fees
* LLD in your Ethereum wallet
* A Solana wallet (e.g. [Phantom](https://phantom.com/))
* SOL for transaction fees

Assuming you have all of these requirements, you're ready to go! If you don't, please fulfill the requirements above before continuing. There are lots of great resources online with recommendations for Ethereum wallets, Solana wallets, exchanges where you can acquire both ETH and SOL, etc.

Once you have all of the above, visit [deBridge](https://app.debridge.finance/deport?inputChain=1\&outputChain=7565164\&inputCurrency=0x054c9d4c6f4ea4e14391addd1812106c97d05690) and select Ethereum -> LLD and Solana -> LLD.

Now that you're on dePort's app, select **'Connect Wallet'**. By default, this should prompt you to connect your Ethereum wallet. Select your wallet from the list, and connect your account.

![connect-wallet](/files/vV1FPgBYqxUbwS1B3hNC)

The link above should pre-populate LLD in both the 'You pay' and 'You receive' fields. If not, continue on.

From the **'You pay'** dropdown, type **'LLD'** and you should see 'Liberland dollar' appear in the list. Select 'Liberland dollar'.

![select-eth-lld](/files/9RxUhygixVpehCnWyfL1)

From the **'You receive'** dropdown, select the Solana blockchain.

In the **'You pay'** field, enter the amount of LLD you want to bridge from Ethereum to Solana. The **'You receive' field** should get filled automatically, and you should notice a small 'Included gas' value underneath. This small amount is a fee paid to deBridge for maintaining dePort.

![select-sol-lld](/files/GvPJuvphKiF3WBaVLV8E)

In **'Swap and Transfer'** you have two choices:

1. Paste in the Solana wallet where the LLD should be sent to after bridging
2. If you have a Solana wallet browser extension installed/enabled, select **'Connect'** to connect the wallet and select the receiving wallet

Next, select **'Approve'**. If this is your first time using dePort, you may see a message asking you to review the terms & conditions. Once you have read them and if you approve of them, select 'Sign and proceed'. Your Ethereum wallet will provide a message for you to sign, approving the terms & conditions on-chain.

![approve-eth-lld](/files/iOrWti6lYh1QWYKheF6A)

Now you need to approve dePort's ability to move your LLD on your behalf. **This is a standard permission requested by many Web3 applications** such as Uniswap, 1inch, Aave, etc. You can choose from three options:

* Approve dePort's access to all your LLD permanently; this reduces the number of steps next time you bridge
* Approve dePort's access to all your LLD this time only; this is a more secure option in case your wallet is ever compromised, but requires additional approvals next time you bridge
* Approve dePort's access to a portion of your LLD

Once you have chosen your preferred option, select 'Approve', and then confirm the approval transaction in your wallet.

![approve-lld-wallet](/files/RyxEe8vrByL01KxRcdW7)

Once the access approval transaction has been confirmed, you can proceed with bridging the LLD from Ethereum to Solana. Select **'Confirm Transfer'**, review the transaction fees to be incurred and make changes if you wish (lower transaction fees generally lead to longer wait times), and select **'Confirm Transfer'** again. Approve the transaction in your wallet when prompted.

![confirm-transfer](/files/s1K2FsvAypmTRzoAPZtE)

Depending on the transaction fees/priority set, you should soon see the block confirmations start to increase. dePort requires at least 12 block confirmations for the transaction to be considered successful and finalised. You can select the link at the bottom to view the transaction on deBridge Explorer.

![block-confirmations](/files/L9EfMlE6wxIqdIYORuSc)

Once the transaction has been finalized, you will receive LLD on Solana to the wallet specified! Congratulations, you have successfully bridged LLD from Ethereum to Solana.

![lld-solana-phantom](/files/jTA6Y0ekCuqB2j2eGHbM)

Now you can move your LLD to whatever wallet you like, engage in swapping platforms like Raydium and Jupiter, or perhaps find a decentralised finance (DeFi) protocol that will allow you to use LLD in some other fashion.

If your Solana wallet doesn't automatically recognize the LLD bridged, you can often add it manually using the token contract address: `GwKKPsJdY5oWMJ8RReWLcvb82KzW6FKy2bKoYW7kHr16`

You can see LLD, the supply, holders, and other [transactions on Solscan's block explorer](https://solscan.io/token/GwKKPsJdY5oWMJ8RReWLcvb82KzW6FKy2bKoYW7kHr16).

You can swap LLD on [Raydium](https://raydium.io/swap/?inputMint=sol\&outputMint=GwKKPsJdY5oWMJ8RReWLcvb82KzW6FKy2bKoYW7kHr16) or [Jupiter](https://jup.ag/swap/SOL-GwKKPsJdY5oWMJ8RReWLcvb82KzW6FKy2bKoYW7kHr16).

If you have any questions about Liberland Blockchain or Liberland dollar, join the [Discord](https://discord.gg/z6vsBd3eUD) or [Telegram](https://t.me/liberlanders) communities for support. If you are having trouble using one of the applications involved in this process (e.g. dePort or a wallet application), we will do our best to support you but may direct you to the teams behind those products depending on the issue.

#### More about deBridge

deBridge is a cross-chain interoperability and liquidity transfer protocol designed to enable seamless interactions and asset transfers between different blockchains. It facilitates the bridging of assets (tokens), smart contract calls, and messages across a variety of blockchains, addressing improved communication between decentralized applications (dApps) built on various chains.

dePort is deBridge's custody solution that provides you with non-liquid, wrapped assets. This means that LLD bridged from Ethereum to Solana are generated (minted) on Solana by dePort's smart contracts, and dePort's smart contracts have certain features and functions embedded into LLD's token contract on Solana. This is intentional by dePort, and not something that can be bypassed due to LLD's cross-chain nature.


# How to Bridge to TRON

This tutorial assumes you have already bridged Liberland dollar (LLD) from Liberland [Blockchain -> SORA Network -> Ethereum](/blockchain/ecosystem/cross-chain-bridge).

You can watch a tutorial on how to perform those steps at Liberland's [YouTube channel](https://www.youtube.com/watch?v=PI4hiLOK03I).

To bridge Ethereum -> TRON via BTTC, you need:

* An Ethereum wallet with $LLDs and $ETH, like MetaMask
* BTTC wallet with $BTT like metamask
  * You can get $BTT on ETHereum and bridge it to BTTC later. US$10 worth of BTT should be sufficient for gas fees and can be bought directly within the MetaMask wallet
* TRON wallet (e.g. [TRONLink](https://www.tronlink.org/)) with $TRX tokens for fees

Once you have all of the above, visit [BitTorrent Bridge](https://bt.io/) and select Ethereum -> BTTC and select BTT token

Now send your BTT from ETH to BTTC, so that you can pay gas fees for bridging. In our testing, BitTorrent Bridge only works with MetaMask for Ethereum connections.

Just visit [BitTorrent bridge](https://bt.io/), select From **Ethereum** To **BTTC**, select BTT, and send a few USD worth of BTT.

The bridge takes some time and will prompt you to sign a few transactions in your wallet. Just follow the instructions from the bridge.

![Bridge BTT](/files/liCO74ju5oSafcbWi1f2)

Next, you can bridge LLDs from ETH to TRON. You will need to connect both EVM wallet like Metamask and TRON wallet like TRONLink for this.\
Just visit [Bittorrent bridge](https://bt.io/), select From Ethereum To TRON, sending LLD.

The bridge takes some time and will prompt you to sign a few transactions in your wallet. Just follow the instructions from the bridge.

![Bridge BTT](/files/5PfxkXOBLc3KKcLAeSkA)

Here is a comprehensive video tutorial showing you how to bridge LLD from Ethereum to TRON once you have BTT in your BTTC wallet, and TRX in your TRON wallet.

[![BTTC Demo Video](https://img.youtube.com/vi/5laZ9P5YDYk/0.jpg)](https://www.youtube.com/watch?v=5laZ9P5YDYk)

The process for bridging TRON to ETH is the same, just in reverse order.


# Liberland Exchange

Liberland has a native DEX at [blockchain.liberland.org/](https://blockchain.liberland.org/home/wallet/exchange), under Wallet -> Exchange menu.

Here you can see all available token pairs and trade them, or add new pairs and liquidity into the pools. LLD or any other Liberland asset, such as LLM, LLEUR, wrapped tokens like ETH, wBTC, USDT and others, as well as stock in Liberland companies can be listed. The DEX is completely permissionless, so be careful and ask for verification if something looks suspicious.

## Trading

Browse the token pairs and click the button 'Sell X for Y' or 'Buy Y for x'

This will exchange one token for the other, according the current exchange rate.

Since the price is set algorithmically based on relative rations of the token pairs in the liquidity pool, be careful when trading large amounts of tokens in pools with low liquidity.

For example, lets say there is a pair between 1000 Xcoin and 1000 Ycoin with current exchange rate of 1 Xcoin = 1 Ycoin. Suppose you want to sell 500 Xcoin to buy Ycoin. You will not get 500 Ycoin because your order is significant percentage of available liquidity, and you will raise the price of Ycoin significantly, getting only 250 Y for your 500 X.

Dont worry too much though, as you can immediately sell Y to get your X back in that case.

You can avoid this altogether by clicking on additional settings and defining your max desired price slippage.

You can also check the liquidity by clicking on 'show more'

## Adding and removing liquidity

You can add your own tokens in the liquidity pool and earn a small % of commission fees on trades on a token pair.

To do this, click on 'show more' and then the 'add liquidity' button. You need to provide both tokens to add liquidity. In exchange, you get 'liquidity tokens', representing your share of total liquidity in the pool. Note that, when people trade, the liquidity pool might end up with a different ratio of tokens you initially put in. You can remove the liquidity to get your portion of the liquidity pool back into your account.

## Concepts

This DEX is based on asset conversion substrate pallet which is itself based on Uniswap v2. Read more about concepts on [Uniswap V2 docs](https://docs.uniswap.org/contracts/v2/concepts/protocol-overview/how-uniswap-works)

## Adding pairs

To add pairs, use the assetConversion-createPool function at [block explorer](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fmainnet.liberland.org#/settings) under developer-extrinsics tab

## Stocks and custom assets

Since anyone can add asset pairs, those assets might come with their own special rules. For example, stock in Liberland companies can only be owned by Liberland citizens and eresidents so buying them would get the transactions reversed. Other assets might be controlled by people or groups who do retain burn or admin functionalities over the assets. Make sure to know what you are trading, especially if the assets are not official LLD, LLM or SORA bridged assets.


# How to Acquire LLD

There are multiple ways to acquire Liberland Dollar (LLD).

## Fiat

To buy LLD with a credit card or bank transfer, use [Alchemy Pay](https://ramp.alchemypay.org/?appId=N9lV3uIGF0y1amAE#/index). Alchemy Pay is supported in over 170 countries and many USA states. Identity verification (KYC) is not required to purchase less than US$150 of LLD.

## Centralized Exchanges

The easiest way to get LLDs currently are to use one of the centralized exchanges where selling USDT for LLD is possible.

* [MEXC](https://www.mexc.com/exchange/LLD_USDT?_from=liberland) on Liberland Blockchain.
* [BitMart](https://www.bitmart.com/trade/en-US?type=spot\&symbol=LLD_USDT) on Liberland Blockchain.
* [Coinstore](https://h5.coinstore.com/h5/signup?invitCode=IgwIq8) on Liberland Blockchain.
* [BiFinance](https://www.bifinance.com/trade?symbol=LLD%2FUSDT) on Liberland Blockchain.
* [Emirex](https://emirex.com/spot/trading/LLDUSDT) on Liberland Blockchain.

## Other Blockchains

* [Matcha](https://matcha.xyz/tokens/ethereum/0x054c9d4c6f4ea4e14391addd1812106c97d05690?sellChain=1\&sellAddress=0xdac17f958d2ee523a2206206994597c13d831ec7) is a decentralized exchange aggregator, making it easy to swap any token on Ethereum for Liberland Dollar. A portion of LLD's supply was bridged to Ethereum and deployed to Uniswap in June 2024.
* [Polkaswap](https://polkaswap.io/#/swap/XOR/LLD) is a decentralized exchange on the SORA Network. A portion of LLD supply is available for swapping on SORA Network via Polkaswap.
* [Raydium](https://raydium.io/swap/?inputMint=sol\&outputMint=GwKKPsJdY5oWMJ8RReWLcvb82KzW6FKy2bKoYW7kHr16) is a decentralized exchange on the Solana blockchain. A portion of LLD Supply is available on Solana, bridged from Ethereum using deBridge's dePort.
* A video tutorial on [how to swap LLD on Raydium](https://www.youtube.com/watch?v=dwsMvNtOR5E)
* [Sun.io](https://sun.io/?lang=en-US#/v3/swap?t1=TC8QDMS2nLdWMT7iJwvtG5YH6XiGEJT6om\&t0=T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb\&type=swap) is a decentralized exchange on the TRON network. A portion of LLD supply is available for swapping on TRON via Sun.
* A video tutorial on [how to swap LLD on Sun.io](https://www.youtube.com/watch?v=YIwfFZ58_8I)

If you already have LLD on other chains like Ethereum or Solana, check out the [Bridging guide](/blockchain/ecosystem/cross-chain-bridge).

## Tutorials

There are video tutorials showing you how to make a wallet, create an accounts on both centralized exchanges, withdraw LLD to your self-custodial wallet, and then nominate a validator.

* [How to Acquire LLD and Stake it using and Coinstore](https://www.youtube.com/watch?v=531tOYdTWe8)
* [How to Acquire LLD and Stake it using and Emirex](https://www.youtube.com/watch?v=x8ZXKZK4M9k)

In brief, the process is as follows:

* Create a wallet using [Subwallet](https://subwallet.app), [Talisman](https://talisman.xyz), Polkadotjs, or [Edge Wallet](https://edge.app)
  * Note: Edge Wallet does **not connect to applications** and is best used for cold storage of LLD
* Acquire LLD, withdraw them to your wallet
* Go to [Liberland Blockchain dApp](https://blockchain.liberland.org)
* Go to Staking
* Choose a validator to nominate, and update your nominations

LLD purchased on other chains like Ethereum, Solana, or TRON can be bridged to [Liberland Blockchain using HASHI Bridge](/blockchain/ecosystem/cross-chain-bridge).

You can skip ahead to relevant sections of the tutorials above depending on where you need help. If you need help from the community, join our [Telegram group](https://t.me/liberlanders), visit the Blockchain topic, and explain your issue. When doing so, it is wise to avoid sharing any personal information where possible.


# How to Use Polkadot.js

NOTE: We recommend more user-friendly wallets like SubWallet, Talisman, and Edge Wallet.

## Introduction

The Liberland blockchain uses a nominated proof-of-stake (NPoS) consensus mechanism, which makes it environmentally friendly to operate. Anyone can participate as a Nominator, while only citizens can run Validators, providing an additional layer of security against bad actors. As a nation-state whose entire governance and legislation is managed on-chain, Liberland offers non-citizens the ability to help secure the blockchain by staking LLD through the nomination of Validators who run the infrastructure for the blockchain. Nominating a good Validator leads to learning LLD, while bad Validators and their Nominators can have their LLD stakes slashed. This leads to better blockchain security and incentivizes being a good Validator and Nominator.

Built using Parity Substrate, the same technology that powers the Polkadot ecosystem, the Liberland Blockchain benefits from some cross-compatibility with existing frameworks and tools. [Polkadot.js](https://polkadot.js.org/extension/) is a browser extension that allows you to interact with the Liberland Blockchain and other blockchain networks directly from your browser. In this guide, we will show you how to create a wallet using Polkadot.js browser extension.

Liberland Blockchain currently supports Polkadot.js, [Talisman](https://talisman.xyz), and [Subwallet](https://subwallet.app). The steps for creating a wallet and securing the passphrase are similar for each.

## Installing Polkadot.js Browser Extension

To use Polkadot.js browser extension, you first need to install it on your browser. The extension is available for Chrome, Firefox, Brave, Opera and Edge browsers. To install the extension, follow these steps:

1. Open your browser and go to the [Polkadot.js extension webpage](https://polkadot.js.org/extension/).
2. Click the "Download for Chrome" button if you are using Chrome/Brave/Opera/Edge, or "Download for Firefox" if you are using Firefox.
3. Follow the prompts to install the extension.
4. Once the extension is installed, a new icon will appear in your browser toolbar.

![polkadotjs-installed](/files/HdfYKoohwrFGwrKyh4R9)

## Creating a Wallet with Polkadot.js Browser Extension

To create a wallet using Polkadot.js browser extension, follow these steps:

1. Click on the Polkadot.js browser extension icon in your browser toolbar.
2. Review the welcome notes, then select “Understood, let me continue”
3. Click on the large, circular + button.
4. Save your mnemonic seed (also known as a recovery phrase) in a safe place.

💡 This is important because if you lose your password, you can use your recovery phrase to regain access to your account. You can also restore the same wallet on a different computer if you replace yours.

1. Check the box that says, “I have saved my mnemonic seed safely,” then click “Next step.”
2. Add a descriptive name for your account, e.g. “Liberland Wallet,” and a strong, unique password for your account. You will need to enter this password whenever you are initiating transactions on the blockchain.
3. Select “Add the account with the generated seed.”
4. Your new account is now created, and you can use it to send and receive cryptocurrency on the Liberland Blockchain, and other similar networks.

![polkadotjs-welcome](/files/ZZ5CVjZ2x3HCaWV1ULOs)

![polkadotjs-seed](/files/TAo7Ox3bjYuQCfqBro7C)

![polkadotjs-name-password](/files/KgcSVBqoTt9ZFr3dAGDo)

![polkadotjs-name-password-filled](/files/G92cTEd16kvUkgITbJ0g)

![polkadotjs-empty](/files/tCeWzO9uKFdJXpBXU0Zd)

![polkadotjs-complete](/files/vcpri27aVV44kwcwX6PG)

## Managing Your Wallet with Polkadot.js Browser Extension

Once you have created a wallet with Polkadot.js browser extension, you can manage it directly from your browser. The extension allows you to view your account balance, connect to and interact with Liberland Blockchain applications, and manage your account settings. To manage your wallet, follow these steps:

1. Click on the Polkadot.js browser extension icon in your browser toolbar.
2. From the main ‘Accounts’ view, you can view your wallet address, and copy your wallet address.
3. Clicking the + button allows you to create new accounts, derive new wallet addresses from the existing account, export accounts, and more.
4. To receive cryptocurrency, click the icon that looks like two overlaid pieces of paper to copy your wallet address, then share your wallet address with the sender.

## Updating your Liberland Profile

To ensure you receive LLD and LLM in your wallet when Liberland Blockchain launches, please do the following:

1. Open Polkadotjs
2. Click the copy icon (two pieces of paper overlapping; see image below)
3. Log in to your account at liberland.org
4. Find the 'Profile' box and select 'Edit'
5. Scroll down to the bottom of your profile and find the 'Blockchain information' field
6. Paste in your Liberland Blockchain wallet address
7. Select 'Save changes'

\*\* Note: This is currently a one-time option. You cannot edit the blockchain information field after you save this change.

![polkadotjs-copy](/files/W6o6FGpau9c2TfRVBrGV) ![profile-blockchain-info](/files/CeX5lYFW4sYZBefidjCF)

## Conclusion

Creating a wallet using Polkadot.js browser extension is a simple process that allows you to interact with the Liberland Blockchain directly from your browser. With the extension, you can create and manage your account. By following the steps outlined in this guide, you can easily create a wallet and start using the Liberland Blockchain.


# How to use SubWallet

Liberland Blockchain supports using [SubWallet](https://www.subwallet.app/) for interacting with Liberland Blockchain and dApps. This guide will walk you through setting up the SubWallet app.

## Install SubWallet on your smartphone

[Install SubWallet](https://www.subwallet.app/download.html)

## Add account

Either [create a new account](https://docs.subwallet.app/main/mobile-app-user-guide/account-management/create-a-new-account-with-new-seed-phrase) or [import an existing one](https://docs.subwallet.app/main/mobile-app-user-guide/account-management/import-restore-an-account).

If you're importing an existing account for use on Liberland Blockchain, it must be an existing Polkadot account.

## Use Liberland Wallet dApp

To open the dApp in subwallet [click here](https://mobile.subwallet.app/browser?url=https%3A%2F%2Fblockchain.liberland.org%2Fliberland-login)

Alternatively, you can manually navigate to it using the following steps

![Use dApp - 1](/files/I3hgx3DL7sitmjKbRMs8)

* Tap the `dApp` button in the bottom menu
* In the `Search or enter website` field, input `https://blockchain.liberland.org/`
* Confirm, and the page should load

  ![Use dApp - 2](/files/Euw1yjmi5y2O0CYtDMcr)
* Tap the account you wish to connect to the dApp - the checkmark to the right should turn green
* Tap `Connect`
* You may now login to the dApp and complete the [Onboarding](/blockchain/for-citizens/onboarding).

Now that you have a wallet, if you are a citizen or e-resident, you can begin [onboarding](https://liberland-1.gitbook.io/wiki/v/public-documents/blockchain/for-citizens/onboarding#id-3-getting-merits-and-residency).

## Add Liberland Network (Optional, but recommended)

![Opening network settings guide - 1](/files/tJ79666j73JHOl1uqVyt)

* From the home screen, tap the menu icon in top-left corner
* Tap `Manage Networks`
* Tap `+` icon in the top-right corner

![Opening network settings guide - 2](/files/6XnqZpHLyidOPgGnwedY)

* In the `Provider URL` field, enter `wss://mainnet.liberland.org` and confirm
  * Use `wss://testchain.liberland.org` for Bastiat testnet
* Once confirmed, the `Chain name`, `Symbol` and `Chain type` fields should fill automatically
* Tap `Save`, and return to the home screen


# How to use Talisman

Talisman Wallet supports Liberland Blockchain on launch, and we support using [Talisman Wallet](https://www.talisman.xyz/) for interacting with Liberland Blockchain and dApps. This guide will walk you through setting up the Talisman browser extension for Chrome and Chromium-based browsers (Opera, Arc, Brave, Edge, etc.).

## Install Talisman browser extension

[Install Talisman](https://www.talisman.xyz/download)

## Add account

Either create a new account or import an existing one.

If you're creating a new account, be sure to save the passphrase/private key in a secure location.

If you're importing an existing account for use on Liberland Blockchain, it must be an existing Polkadot account.

## Use Liberland Wallet dApp

To open the dApp, visit [blockchain.liberland.org](https://blockchain.liberland.org/liberland-login) in the same browser where you installed Talisman.

Now that you have a wallet, if you are a citizen or e-resident, you can begin [onboarding](https://liberland-1.gitbook.io/wiki/v/public-documents/blockchain/for-citizens/onboarding#id-3-getting-merits-and-residency). If you're using a desktop computer, adapt the instructions to use Talisman, Polkadotjs, or Subwallet browser extension instead of Subwallet's mobile app.

## Next Steps

To see a short tutorial on creating a wallet using Talisman, configuring Talisman to connect to Liberland Blockchain, and connecting to blockchain.liberland.org, [click here](https://www.youtube.com/watch?v=M5ckxwG8H-E).

To see a full tutorial for creating a wallet using Talisman, registering on Coinstore, buying LLD, withdrawing LLD to your wallet, and staking your LLD, [click here](https://www.youtube.com/watch?v=531tOYdTWe8).


# How to use Ledger

You should have an up-to-date ledger with the Polkadot app installed on your Ledger device.

To set up your Ledger and connect to Liberland Blockchain on desktop/laptop:

* Connect your Ledger to your desktop/laptop
* If needed, install the Polkadot app
  * Launch Ledger Live
  * Open 'My Ledger'
  * Unlock your Ledger
  * Search the App Catalog for 'Polkadot', select 'Install'

![ledger-live-polkadot-search](/files/n4apEtx1DpW7BDSq2Oc5)

* In Ledger Live, open 'Apps Installed'
* Select 'Add Account' beside 'Polkadot (DOT)'
* Confirm on your Ledger you want to open the Polkadot app
  * If prompted, confirm your Ledger device can connect to your computer
* In Ledger Live, name your new Polkadot account, select 'Add account'
* After the account is added, select 'Done'
* Visit <https://blockchain.liberland.org> in your browser
* Connect a supported browser extension to your Ledger
  * e.g. How to connect Ledger device to Subwallet
    * Open SubWallet browser extension
    * Select the current account name
    * Select the hardware icon at the bottom
    * Select 'Connect a Ledger device'
    * Unlock your Ledger
    * Approve connecting to your Ledger
    * In the browser, select 'Connect Ledger device'
    * Select the wallet address to connect, then select 'Connect Ledger device'

![ledger-live-polkadot-search](/files/SIud0a9IfYrQCFz7lWlK)

* Refresh <https://blockchain.liberland.org> in your browser
* Select the wallet name, your selected Ledger wallet should appear in the list of available wallets
* Select your Ledger wallet from the list, continue using Liberland Blockchain Wallet normally

This will enable the ability to sign/confirmt transactions on any Substrate/Polkadot-based chain, including Liberland Blockchain, as long as the Polkadot app is open on your Ledger device.

If you wish to migrate your previously existing account onto a ledger one, visit the [migration guide](/blockchain/ecosystem/account-migration).


# Account Recovery

It is possible to migrate your identity, voting rights and staked merits from one account to the other.\
Only your identity, voting rights and staked merits are able to be migrated. Other tokens such as LLD or liquid merits\
can only be migrated if you have access to both accounts and you send them yourself.\
The reason for the migration feature is that your onchain identity provides a critical feature of a nation state,\
therefore it should be recoverable in case of account loss. Other tokens behave as any other blockchain, and are\
permanently lost if the account is lost.

To migrate your account

* Triple check if you have saved your recovery phrase, and recover the old account with the phrase if possible
* Setup a new account
* Remove the identity from your old account [here](https://blockchain.liberland.org/home/profile)
* Set the identity on your new account to be the same as your previous one here [here](https://blockchain.liberland.org/home/profile)
* Send yourself any tokens and assets from your old account to your new one
* Submit a request to the court by sending an email to <justice@liberland.org> to transfer the identity and staked merits.
  * The court might request additional steps like confirming your physical identity via a passport or other ways
  * In case of account loss, skip the steps done by the old account. However, only your staked LLM will be recovered.


# Known Issues

## Coinstore deposit not showing up (solved)

Coinstore deposits usually take from 15 minutes to 2 hours to arrive.

However, there is a known bug where deposits to coinstore wont show up in certain situations.

Heres how to solve them.

The bug is that Coinstore supports only 1 kind of transaction, and they refused to support the others for enigmatic reasons, preferring to let customer support and customers themselves handle it ¯\_(ツ)\_/¯ .

The most common issue is when users transfer entire balance, for example, through subwallet LLD transfer and clicking on 'all'.

The transfer will go through, but will not show up on coinstore systems.

(Any other amount except 'all' is supported by coinstore)

The 'safest' way to transfer is to use <https://blockchain.liberland.org>

To fix it, you will need to contact ccoinstore support with proof of transaction and its hash.

Get your coinstore deposit address.

Search for the address using chainscan (replace the address in the link with your deposit address)

<https://chainscan.mainnet.liberland.org/account/5GjYePC6HKJGGnEzEZzSvimy6uctuMat4Kr2tjACtKyY9nhT>

Make sure you used your coinstore deposit address, then click on LLD transfers. You should see a LLD transfer you made here.

Click on the event id of the transfer. Then, click on extrinsic number. There, you will see a hash. Copy the link and the hash.

Then, send a support ticket to coinstore. It should be resolved in a week

```
Hello

I deposited LLD on the Liberland network to my coinstore deposit address <COPY YOUR COINSTORE DEPOSIT ADDRESS> , 
however its not showing up in coinstore. 

Transaction hash is <COPY THE HASH HERE> which you can check on <COPY THE LINK HERE> .

Please manually credit me the LLDs from the deposit address.
```


# For Citizens and E-Residents

For those of you that have already completed the journey and become an E-Resident or citizen of Liberland, we congratulate you! In this area you will find information on voting, the Liberland Senate, how to claim residency, becoming a Congressperson, and more.

## Where to Use Liberland Identity Documents

Below is a comprehensive list, as of 10 November 2025, of where you can use your Liberland identity documents (E-Resident card or passport) to verify your identity and access services available to Liberlanders.

### Centralized Exchanges

* [Bifinance](https://www.bifinance.com/trade?symbol=LLD%2FUSDT)
* [Biconomy](https://www.biconomy.com/)

### Financial Services

* [Bitwage](https://bitwage.com/)

### Other

* Hotels when asked for proof of identity


# Voting

You can vote for congress at <https://blockchain.liberland.org/home/voting/congressional-assemble>.

Voting happens on Liberland blockchain every 90 days. Only citizens not on welfare can vote, and they vote with their staked merits.

If you havent already, [start using the LL blockchain](/blockchain/for-citizens/onboarding), just go to [blockchain.liberland.org](https://blockchain.liberland.org/liberland-login) and follow the steps.

Congress is supposed to pass budgets and laws, but during the transitionary period it shares this responsibility with the provisional government.

When voting, select all candidates you wish to see elected. The algorithm will try to get as many of your candidates in congress as possible. For example, if you vote for 3 candidates, but taking into account other peoples votes 2 of those are guaranteed to be elected, your voting power will go to the last candidate, needing just that little bit extra votes to get him over the election threshold.

This way, you can select everyone you want to be in congress, while also making sure your votes arent wasted.

You should order your candidates by preference, as preference voting is used when electing a Speaker of Congress. Preference voting does not matter for electing candidates into congress, it only matters for picking Speaker of Congress from elected congressmen.

It is the same system used by polkadot, you can [learn more about the algorithm, called Weighted Phragmen that is used in Liberland elections here](https://wiki.polkadot.network/docs/learn-phragmen#understanding-phragm%C3%A9n).

Congress passes budgets with senate oversight, senate having the power to veto any spending.

Congress passes legislation with democratic oversight, any new legislation needs to be confirmed by the citizens via a public referendum. While anyone can create referenda, congress created referenda are 'privileged' in the sense that they 'pass by default' - citizens need to vote no to block it, while normal referenda 'fail by default' - citizens need to vote yes to pass it.

This is the same system used by polkadot, [you can learn more about biased referenda here](https://wiki.polkadot.network/docs/learn/learn-governance#public-referenda).

You can also delegate your voting power to a person in congress using the delegate button.

[Vote here](https://blockchain.liberland.org/home/voting/congressional-assemble) [Apply as candidate here](/blockchain/for-citizens/become-congressmen)


# Senate

This is a guide for Senators on how to perform senate actions. This guide is outdated as senators now have UI.

## Propose motion

### Spend from treasury

1. Visit [Polkadot.js Apps](https://polkadotjs.blockchain.liberland.org/?rpc=wss%3A%2F%2Fmainnet.liberland.org#/extrinsics)
2. Go to Developer -> Extrinsics -> `senate` -> `propose(...)`
   * `threshold`: 51% \* number of senate members, round up. Examples:
     * 3 senate members - threshold = 2
     * 4 senate members - threshold = 3
     * 5 senate members - threshold = 3
   * `proposal`:
     * `llm` `treasuryLlmTransferToPolitipool(...)` (or `treasuryLlmTransfer` for liquid LLM or `treasuryLldTransfer` for LLD)
     * `toAccount`: recipient of LLM
     * `amount`: LLM in grains, so 1 LLM = `1000000000000` (12 zeros)
   * `lengthBound`: `54`

### Cancel referendum

1. Visit [Polkadot.js Apps](https://polkadotjs.blockchain.liberland.org/?rpc=wss%3A%2F%2Fmainnet.liberland.org#/extrinsics)
2. Developer -> Extrinsics -> `senate` -> `propose(...)`
   * `threshold`: 51% \* number of senate members, round up
   * `proposal`:
     * `democracy` `emergencyCancel`
     * `refIndex`: index of referendum to cancel
   * `lengthBound`: `10`

### Cancel proposal

1. Visit [Polkadot.js Apps](https://polkadotjs.blockchain.liberland.org/?rpc=wss%3A%2F%2Fmainnet.liberland.org#/extrinsics)
2. Developer -> Extrinsics -> `senate` -> `propose(...)`
   * `threshold`: 51% \* number of senate members, round up
   * `proposal`:
     * `democracy` `cancelProposal`
     * `refIndex`: index of referendum to cancel
   * `lengthBound`: `7`

## Voting on motions

### Get hash of proposal

1. Visit [Polkadot.js Apps](https://polkadotjs.blockchain.liberland.org/?rpc=wss%3A%2F%2Fmainnet.liberland.org#/chainstate)
2. Developer -> Chain state -> `senate` -> `proposals()`
3. Click `+` button
4. The hash is the string that starts with `0x`.

### Check details

1. Visit [Polkadot.js Apps](https://polkadotjs.blockchain.liberland.org/?rpc=wss%3A%2F%2Fmainnet.liberland.org#/chainstate)
2. Developer -> Chain state -> `senate` -> `proposalOf(h256)`
   * Put the hash from previous step.
3. Click `+` button
4. Make sure the section, method and args match what you expect.

### Vote

1. Visit [Polkadot.js Apps](https://polkadotjs.blockchain.liberland.org/?rpc=wss%3A%2F%2Fmainnet.liberland.org#/extrinsics)
2. Developer -> Extrinsics -> `senate` -> `vote(...)`
   * `proposal`: hash from previous step
   * `index`: `0`
   * `approve`: `yes`

## Execution

After at least `threshold` number of senators voted yes, anyone can execute the motion:

1. Visit [Polkadot.js Apps](https://polkadotjs.blockchain.liberland.org/?rpc=wss%3A%2F%2Fmainnet.liberland.org#/extrinsics)
2. Developer -> Extrinsics -> `senate` -> `close(...)`
   * `proposalHash`: hash from previous step
   * `index`: `0`
   * `proposalWeightBound`
     * `refTime`: `1307232`
     * `proofSize`: `0`
   * `lengthBound`: same as in Propose motion section


# Onboarding

This guide is written with SubWallet's mobile app in mind. If you are using another wallet on mobile (e.g., Talisman) or are a web/computer user (using e.g., polkadot{.js}), you can easily adapt the instructions accordingly to the wallet/platform you are using.

## Quick guide

1. Make sure you are an E-Resident/citizen with correct number of merits on [the main website](https://liberland.org).
2. [Install SubWallet](https://www.subwallet.app/download.html), create a wallet, and save the passphrase on paper.
3. Go to the Liberland Blockchain at [blockchain.liberland.org](https://blockchain.liberland.org/liberland-login) and follow the steps.

You will then get your merits transferred to your blockchain wallet in about one business day.

## Step-by-step guide

Setting up your identity on the Liberland Blockchain requires roughly 3 minutes and consists of a few steps:

1. Getting merits and residency on the website
2. Setting up a wallet
3. Securing your keys
4. Claiming merits and E-Residency/citizenship on chain

### 1. Get merits and E-Residency/citizenship

1. Go to [the Dashboard](https://liberland.org/dashboard) of the main website.
2. Make sure your merits and E-Residency/citizenship status are accurate in the Dashboard. It should look something like this:\
   ![](/files/xet7yUy3T9QcBrqCRoup)
3. If you do not see accurate values, contact whomever promised you merits or E-Residency/citizenship status to resolve the inaccuracy.

### 2. Set up a wallet

A wallet address is your public address on the blockchain. It comes with a seed phrase—12 words that are the keys to your on-chain existence.

Use SubWallet, polkadot{.js}, or Talisman as your wallet software based on your platform:

[Mobile wallet setup](/blockchain/ecosystem/mobile-wallet)

[Web wallet setup](/blockchain/ecosystem/desktop-wallet)

### 3. Secure keys

During wallet setup, you got a 12-word mnemonic seed phrase. Store it somewhere where it will not be lost nor found by someone else.

{% hint style="warning" %}
It is ***very important*** not to lose that phrase or share it with anyone, as it is the only key or "password" to your on-chain existence.
{% endhint %}

A common, low-tech solution is to write it on a piece of paper and put it in a safe, or to use a password manager. Taking a photo of it on your phone or the like is *not recommended* because it is mostly likely not encrypted and someone else might see it.

### 4. Claim merits and status on chain

Go to [https://blockchain.liberland.org](https://blockchain.liberland.org/liberland-login) and follow the steps.

If on the web, do the next steps using the browser you have SubWallet, polkadot{.js}, or Talisman installed on (e.g. Chrome, Firefox, etc.).

If on a mobile device, *you must use the SubWallet app's built-in browser located in bottom menu in the app.* The button says **dApps**.

![](/files/hnnH7dduST4r1I1R2WOq)

1. Navigate to [https://blockchain.liberland.org](https://blockchain.liberland.org/liberland-login) and log in.\
   ![](/files/fhmgMQEzHoHB6vknAAbj)
2. It's time to claim your tokens and E-Resident/citizen identity! The dApp should guide you through it, but in case something went wrong, the manual process is as follows: Open the menu and click on the **Profile** button.

{% hint style="info" %}
Since all actions on-chain cost a small amount of gas fees and you are already an E-Resident, you are eligible for a small amount of LLD to get you started.
{% endhint %}

3. First, click the **Claim complimentary LLD** button. After a few seconds, it should tell you to refresh the page and you should have LLD 2 so that you can begin using the blockchain right away.
4. Click **Update identity**, and set it to what you want your on-chain identity to be.

{% hint style="warning" %}
**Note:** There is no requirement to use your real name, but make sure to include your correct citizenship/E-Residency status.
{% endhint %}

5. After you click **Set identity**, as with any on-chain transaction, a popup window from your wallet of choice should appear, and it will ask you to sign the transaction. Sign the transaction and you are good to go.

{% hint style="warning" %}
**Note:** Some browsers might prevent popup windows, so make sure to click on the wallet extension icon if you see no popup.
{% endhint %}

6. After this, it usually takes approximately one day for the Ministry of Interior to confirm your on-chain identity and transfer your merits.

{% hint style="info" %}
Please wait for the on-chain identity and transfer process to be completed, as it is a manual process at this time.
{% endhint %}


# Claiming Residency

To claim e-residency or citizenship of Liberland you need to complete the registration process at [www.liberland.org](https://docs.liberland.org/blockchain/for-citizens/www.liberland.org)

Follow the process in the [Dashboard](https://liberland.org/dashboard)

If you are already supposed to have e-residency or citizenship (for example, by work in the settlement) but it's not reflected in the system, or it is asking you to pay, please contact <info@liberland.org> for help.

Do note that to complete the process, we will need a good quality image of your face for your new Liberland passport as well as good quality images of your existing ID to pass identity verification (KYC).

![Residency dashboard](/files/FyACzsPbYUO2DX1seSTn)


# Congress

[Learn more about our congress](https://liberland-1.gitbook.io/wiki/v/public-documents/primers/congress).

Congress is supposed to pass laws and budgets, though during a transitionary period this power is shared with the provisional government.

Liberland voting and politics takes place on the Liberland blockchain.

[Use the Liberland blockchain](/blockchain/for-citizens/onboarding)

## Applying for congress

It takes a minimum of 5 hours a week to do the job of Liberland congressman properly.

Only full citizens not on welfare can become congressmen. If you havent used the blockchain yet, [onboard now](/blockchain/for-citizens/onboarding)

You can apply at [blockchain.liberland.org](https://github.com/liberland/docs/blob/master/blockchain/for-citizens/blockchain.liberland.org) under the congress tab, where you can click on the apply for congress button.

When you apply, the candidates can see your display name, legal name and website in the candidate list.

You can set them under [your profile](https://blockchain.liberland.org/home/profile) when you click update identity.

Keep in mind that the character limit is 32, so use url shortener in case of long links, or ask for help.

## liberland.org website for congress candidate

A candidate can set candidacy website to anything, but we can also set up a liberland.org candidate site, visible at [liberland.org/elections](https://liberland.org/elections).

Provide a document with the content for your candidacy website and ask a web admin to set it up on the official website.

[Example of a candidate website](https://liberland.org/elections/2024-10-06/candidates/michal-ptacnik)

Once you have the website you can set it under [your profile](https://blockchain.liberland.org/home/profile) when you click update identity.

Keep in mind that the character limit is 32, so use url shortener in case of long links, or ask for help.


# Governance

Liberland is based on the principles of minimal government, and this principle is reflected in the design of blockchain governance, by adding many checks and balances. For example, a general theme is that for every way to do some government action, there are two ways to cancel it

![Governance diagram](/files/M8uDZTYnT45lKl07qga4)

## Citizenship

Only citizens have political power in Liberland. A citizen is a wallet address connected to a physical person, with confirmed on chain identity and 5000 politipooled (staked) merits.

Since citizenship is connected to a physical person, courts can transfer citizenship and staked merits to another account if citizens loses access. Court can only touch 'citizen identity' and staked merits specifically. No other tokens can be touched by court onchain unless explicitly allowed by some smart contract the citizen put tokens into.

Citizens can 'unpool'/unstake merits for a period of 1 month, during which they lose their political rights as they are considered to be on welfare. Unpooling is at a rate of 0.8% of remaining merits per month, which equals to 10% a year. A citizen that drops below 5000 merits does not have political rights until pooled merit amount reaches back to 5000.

Only citizens can be validators, at 1 validator per 1 citizen. This ensures the blockchain remains in the hands of Liberlanders, and provides some measure of network security even at small network size, as any takeover attempt would require not just getting a large amount of tokens, but also a large amount of citizens too.

## Eresidents

Eresidents are allowed to open companies and participate in the (upcoming) Liberland stock exchange, but othwerise have no special on-chain permissions.

## Citizenship office

Citizenship office onboards new citizens and eresidents onchain by giving them the 'confirmed identity' status and staking their off-chain merits for them. Currently the citizenship office can also 'take away' the citizenship by removing the identity confirmed status. Citizenship office has administrator, set by root level call who appoints clerks, who do the set identity and send pooled merits actions. Citizenship office requests merits for onboarding new citizens from the government when it runs low

### Future

In the future we will remove the ability of citizenship office to take away citizenships and make it so that congress appoints the 'minister of identity' - the admin account of the citizenship office

## Public referendum

Public referendum is a root level call able to call even setcode actions. Anyone can start a public referendum. Only citizens can vote and they vote with their staked merits.

Referendums are expected to be mostly used for passing legislation, that is binding off-chain in the laws, courts and jurisdictions of Liberland

Referendums use [polkadots adaptive quorum biasing system](https://wiki.polkadot.network/docs/learn/learn-governance#adaptive-quorum-biasing) to calculate if they fail or pass

## Public Veto

Every legislation except for consitution and international treaty has a 'veto list'. Any citizen can cast a veto for legislation. Once a legislation collects vetos numbering 50% of total number of citizen, any account can execute the onchain action to delete the legislation. Public veto is the 'one citizen - one vote' part of Liberland governance

## Vault

There will only ever be 70 million merits and they are premined in the vault. 10% of the remaining amount is released to congress and senate wallets every year (at a rate of 0.8% per month). Vault is a technical account without private seed and it releases the funds alghoritmically. No onchain action, not even sudo (unless setcode changes the code) can touch vault funds.

## Congress

Congress is the elected body of Liberland representatives. Citizen vote for congressmen at anytime with their merits, and elections conclude every 90 days.

[Read more about elections](/blockchain/for-citizens/voting)

Congress is supposed to pass budgets and legislation.

Congress is funded by LLD inflation, as well as income from new citizenships and voluntary donations.

Congress can pass budgets by itself, but any other action, such as legislation or technical referendum (including setcode referendum) is turned into a privileged public referendum that has a bias to pass. This is copied over from [polkadots adaptive quorum biasing system](https://wiki.polkadot.network/docs/learn/learn-governance#adaptive-quorum-biasing).

Congress needs 50%+1 congressperson vote to pass a motion. Any congress motion can be cancelled by the senate

Absentee votes follow the prime congressman vote if they didnt vote at the time of voting period end.

## Senate

The senate is a safeguard of Liberland, consists of 100 seats kept for a lifetime. Senators have their own wallet which they can fund and engage in shared project, but their main purpose is cancelling malicious congress spendings and referendum proposals, which the senate can do with a 50%+1 vote

## Court

Feature in progress. Court is supposed to be able to take away citizenships and staked merits when sufficiently serious crime happens. Court can also be designated as a smart contract oracle in case contract enters dispute mode, but that is not part of governance.

## Sudo

Sudo is a 2/3 multisig of very trusted anonymous Liberlanders. Sudo is a temporary feature and will be removed soon. It is used mainly to push code upgrades during the period that the chain is still 'unfinished'

## Tech committee

Tech committee will replace sudo and will have the ability to do fast referendums about technical topics.


# Companies

So you have decided to pioneer liberty and decentralization by opening a company and doing business in Liberland.

The benefits of a Liberland company are a less regulated and untaxed business environment, access to Liberland clients, markets, and justice system, as well as bragging rights and the patriotic contribution to the official GDP of Liberland.

Given the early stage of Liberland and its current status as a country not yet recognized by the UN, it is important to note that Liberland companies are not a way to evade tax in other countries. For example, if you are selling physical products in the USA, to USA clients, with USA workers, a Liberland company will not help in reducing tax obligations as far as US law is concerned.

However, if your company is either operating solely online, or with cryptocurrency, or with clients from Liberland or in the territory of Liberland itself, opening a Liberland company makes sense.

This article will explain how to create a company to operate in Liberland's blockchain system and economy or open a subsidiary of another company, how to handle payments either in Liberland itself or internationally or on-chain, how to sign and enforce legally binding contracts in Liberland or international jurisdictions, and how to issue stock or other assets and list on the Liberland stock market.

A simple or dormant company can be registered immediately after [onboarding](/blockchain/for-citizens/onboarding) with no extra charges necessary. For more complex companies you will need to spend between 1 and 250 LLD for the process.

* [How to Acquire LLD](/blockchain/ecosystem/how-to-acquire-lld)
* [Browse existing companies](https://blockchain.liberland.org/home/registries/allCompanies)
* [Browse existing Contracts](https://blockchain.liberland.org/home/contracts/overview)

## Choosing personal or company account

Any person, wallet address, or account can create a company on the Liberland blockchain. However, to be officially registered as a business within the nation of Liberland, it needs to satisfy some minimal requirements such as being an e-resident of Liberland.

[How to Become an E-Resident](/blockchain/for-citizens/claiming-residency) [Onboarding](/blockchain/for-citizens/onboarding)

The first decision is choosing whether you want to open a company under your own personal account/wallet, or to create a new company account.

We recommend setting up a new company account (wallet address) to keep business transactions and contracts separate from your personal finances. You can use your wallet app (e.g. SubWallet, Talisman, etc.) to derive a new account from your existing private key, or generate an entirely new private key and keep your personal and company wallets completely separate. If you're still new to how blockchains work, we recommend deriving a second wallet from your existing key. Your preferred wallet app will guide you on this.

However, if you're the sole person in your company, you might prefer to use your personal account. Your choice depends on your business needs and your current jurisdiction.

It is easy to switch between many accounts at [blockchain.liberland.org](https://blockchain.liberland.org).

After selecting an account, ensure it has at least 2 LLD to exist on-chain (provided for free after [onboarding](/blockchain/for-citizens/onboarding)), then update your identity details including your display name and contact information on your profile page.

This step is crucial as it enables others to easily transfer tokens to your address by searching for your display name through the wallet at [blockchain.liberland.org](https://blockchain.liberland.org).

## Choose company type

There are 4 main company types to consider, depending on your business needs and risk tolerance.

### Dormant company

Dormant companies indicate intention to do business in Liberland 'later', for example after international recognition. This gives bragging rights and contributes to the legitimacy of Liberland. Other use is for marketing purposes, allowing you to advertise your products in the Liberland ecosystem for a business registered in another jurisdiction. They pose no risk at all, and have no requirements except filling out the form and mentioning it is a dormant company.

[Example dormant company charter](https://github.com/liberland/docs/blob/master/blockchain/for-companies/contracts/dormant-company-contract.md)

### Pure Liberland company

A pure Liberland company is either physically headquartered in Liberland, by people who physically and legally live only in Liberland, or operates solely under Liberland jurisdiction, on the Liberland ecosystem such as the Liberland blockchain or Liberland market.

In this case, only Liberland law and voluntary tax code need to be followed.

[Pure Liberland company charter template](https://github.com/liberland/docs/blob/master/blockchain/for-companies/contracts/pure-liberland-company-contract.md)

### "Goodboi" subsidiary company

The "goodboi" company structure is the one that assumes a hostile institution from another country is looking into your activity in Liberland, and attempts to be maximally compliant in case your country of residence assumes the non-existence of your Liberland company. It is the least useful but also least risky form of a Liberland company.

The benefits of a "Goodboi" company are a less regulated business environment, access to Liberland clients, markets, and justice system, as well as bragging rights and the patriotic contribution to the official GDP of Liberland.

In a 'goodboi' company structure, you are required to report all your income to your country of residence and pay all the taxes on your income that your country of residence requires.

A parallel company must exist in your country of residence.

Any money earned in Liberland through this company should be converted into LLD or other widely tradeable currencies, exchanged for fiat on an exchange, and paid out to your parent company's bank account.

Normally, only this last fiat transaction needs to be reported in the other country.

Note that regulations vary from country to country, so make sure to follow the parent company's local law. This process should be sufficient for small businesses in USA, EU, and countries with similar regulations.

[Example Goodboi company charter template can be found here](https://github.com/liberland/docs/blob/master/blockchain/for-companies/contracts/minimum-goodboi-contract.md)

### Other

Liberland has very few regulations about company structures, therefore trusts, DAOs, NGOs and all other kinds of entities are possible. As long as you have a valid contract, follow Liberland law, and don't use Liberland companies for international fraud/crime, you can register it.

Here are just some of the examples:

* [Trust contract template](https://github.com/liberland/docs/blob/master/blockchain/for-companies/contracts/trust-contract-template.md)
* More examples to come

### Create company

To create a company, in <https://blockchain.liberland.org/home/registries/companies/overview> choose registries on the menu and select My companies -> Register company

This will lead you to a form for requesting company registration. Not all fields are required, so you may omit any that are not applicable to your situation.

Sign the transaction and your company request for registration is ready!

The last step is to read the [Terms and Conditions](https://liberland.org/company-terms-and-conditions)

It should take about a day for the request to be approved.

After the company registration is approved, you can obtain the Certificate of Incorporation by clicking the generate certificate button under [My Companies](https://blockchain.liberland.org/home/registries/companies/overview).

Your company will also appear in the [list of Liberland companies](https://blockchain.liberland.org/home/registries/allCompanies) for other citizens and clients to see.

### Create contracts (optional)

In addition to your charter contract that you should register on-chain, your company may be subject to other legally binding agreements in accordance with Liberland law, or you may choose to execute and register contracts with clients or other stakeholders.

Should you desire, it is possible to directly include these agreements within your company registration.

[Browse existing Contracts](https://blockchain.liberland.org/home/contracts/overview)

Please be aware that drafting contracts may necessitate legal expertise specific to the law of Liberland to ensure they are correctly established.

Do not hesitate to ask for help in Signal, [Telegram](https://t.me/liberlanders) or email; there is a helpful community as well as Liberland companies and professionals available who specialize in providing these services.

By default, contracts on-chain are in Markdown format.

Once you have a contract ready, create it by pasting its content and adding all relevant signatures/parties at the contracts tab at<https://blockchain.liberland.org/home/contracts/my-contracts>

We are working on an easy-to-use contract builder, but it will take time to finish.

Once the contract is finalized, you can find it under [My contracts](https://blockchain.liberland.org/home/contracts/my-contracts) after you refresh the page.

Please copy its link and distribute it to the relevant parties and judges for their signatures.

The most frequently utilized 'judge' for this purpose is the official court of Liberland, which can be contacted through groups on Signal, Telegram or email.

### Handling payments

Although Liberland does not impose specific regulations regarding the methods, currencies, or reporting of payments, conducting business transactions on the Liberland blockchain is advisable as it is good for Liberland's further development, particularly when engaging in legally binding contracts.

Assets that are currently available on Liberland blockchain are LLM, LLD and stablecoins like USDT. While Bitcoin and other cryptocurrencies are accepted, it's important to note that they operate on their respective blockchains, separate from Liberland Blockchain.

Nevertheless, 'wrapped' versions of these cryptocurrencies can be accessed via bridges, allowing, for instance, for transactions in 'bitcoin stablecoins' within the Liberland Blockchain ecosystem.

LLD offers the most straightforward exchange options, including conversions to USDT, BTC, other cryptocurrencies, or fiat currencies such as USD and EUR. This flexibility enables you to conduct business with LLD internationally, or with any other cryptocurrency.

Should you choose, you have the flexibility to issue invoices in USD, then convert the amount into LLD for transactions, such as paying for services from another company. Additionally, you may convert LLD into Bitcoin for long-term investment purposes, among other possible financial strategies.

**The government's role is not to dictate how you manage your finances**, but to offer support and assistance as you navigate these processes.

### Fundraising, Assets and the Stock Market

Similar to other blockchains equipped with smart contract capabilities, you have the opportunity to create tokens and assets underpinned by smart contracts. It is possible to structure these tokens/assets as shares of your company and link it to a shareholder agreement.

According to Liberland and international law, though, at this point only citizens and residents of Liberland can be shareholders in Liberland companies.

While Liberland does not prescribe other regulations for such agreements, they typically aim to motivate investment in your company by offering benefits such as profit sharing or voting rights, akin to conventional company stock practices globally.

After the asset or stock has been registered, you can then list it on the Liberland DEX/stock market.

The Liberland DEX/stock marketing listing process costs 100 LLD.

Please be aware that if you list an asset that could be subject to regulation in other countries, such as cryptocurrencies in general, stablecoins, or "securities" (including stocks, bonds, futures, or assets representing commodities), it is likely that such activities are regulated abroad.

For instance, the United States has specific regulations concerning the trading of securities.

Therefore, it is crucial to comply with the local laws of any country in which you intend to resell stock or conduct similar transactions.

For these reasons, only Liberland citizens and eresidents can own and trade stock in Liberland companies, to avoid potential problems.

After you create a company, you can [create a stock](https://blockchain.liberland.org/home/wallet/stocks) for the company. Creation requires a 100 LLD deposit.

You will need to connect your stock to your company on both sides, selecting the connected company when creating the stock, and then editing the information on your company to include the stock in the 'related assets' field.

Note that any changes to your company registrar need to be manually approved so this might take a day.

After that, your company officially has a stock, and you can mint that stock to the shareholders [create a stock](https://blockchain.liberland.org/home/wallet/stocks).

You can also list your company on the [Liberland stock market](https://blockchain.liberland.org/home/wallet/stock-exchange) by clicking on create pool and selecting the assets to pair it with.

Stock market currently only supports "UniswapV2 pools" logic, meaning that you will also need to provide initial liquidity by clicking on "add liquiditiy" next to your pool.

This pool works by assuming the both sides of the pool are of equal value and prices them accordingly. For example, if you put 1000 LLD and 1000 stock into the pool, the initial price is 1LLD per stock. If someone then buys stocks with LLD, the pool might end up with 1500 LLD and 500 stock, meaning the price now is 3LLD per stock. You as a shareholder can then sell your stock into the pool at a profit.

In the future, we will have orderbook stock market, for example with people placing orders at exact prices they want to buy or sell the stock, but for now this feature is not developed. You can always directly sell or buy stock from people willing to trade


# For Validators, Nominators & Stakers


# Run a validator

[Join the node operator room](https://matrix.to/#/#liberland-node:matrix.org)

## Introduction

This guide will walk you through the process of setting up a new validator on Liberland Chain.

[You can follow along a outdated but still workingvideo here](https://www.youtube.com/watch?v=dV0fK1eqSZY)

Note:

* *DO NOT* expose your validators RPC ports (9933 and 9944 by default) publicly on the internet. Treat validators with more care than full nodes.
* You *do not* need to a run a validator to earn LLD staking rewards. As a user you can simply become a nominator and stake your coins without needing to run a validator.

## Requirements

* \~30 GB of free disk space
* 4GB of RAM, but swap is ok, see [How to add swap](https://www.cloudsigma.com/adding-swap-space-on-ubuntu-20-04-a-tutorial/) if you have less than 4GB of RAM
* Liberland wallet with at least 200 LLD. [Ask to be onboarded](https://matrix.to/#/#liberland-node:matrix.org)
* [PolkadotJs wallet](https://polkadot.js.org/extension/)
* [On-chain citizenship](/blockchain/for-citizens/onboarding)

## Claim on-chain citizenship

* You will need your LLD, LLM, and an onchain citizenship to proceed. Follow the [Onboarding](/blockchain/for-citizens/onboarding) steps to proceed.
* At the end of this process, you should have a wallet, and a funded citizen account on the mainnet. Log into [blockchain.liberland.org](https://blockchain.liberland.org/signin) with your liberland account to verify everything works so far.

## Recommended servers

If self hosting is not practical, the up-to-date current order of recommended virtual server providers are

### Option 1: AWS Lightsail

[Go to AWS](https://aws.amazon.com/) and create an account.

* In search, type lightsail
* Under Instances, click Create instance
* Select Linux/Unix, OS Only, Ubuntu 22.04 LTS, scroll down and select the plan with at least 4 GB RAM, 1 vCPU and 60gb SSD
* Scroll down and click on "Create instance"
* Wait for a few minutes for a server to initialize
* Click on the console icon on your instance to open a in-browser console
* Follow the installation steps of this guide

### Option 2: Digital Ocean

[Set up a digital ocean server](https://www.youtube.com/watch?v=dV0fK1eqSZY)

## Installation

### Option 1: automatic script

This script is for Ubuntu and Debian servers. If you're not running Ubuntu or Debian, please contact dev team - they can add support for your distribution.

Run the following command on your server:

```
curl -sSLO https://raw.githubusercontent.com/liberland/liberland_substrate/main/substrate/scripts/install/install.sh
bash install.sh
```

The script will ask you for confirmation before every action. It will:

* install dependencies
* download Liberland node
* setup a systemd service, so that the node starts automatically
* configure time synchronization
* generate session keys for use in next step
* The script gives the node time to start up, if it takes too long it will exit. If that happens, just wait a minute and run the script again.
* If everything goes OK, you will see something like this:

```
Your node is now running. Useful commands:
	Check status: sudo systemctl status liberland-validator
	Stop: sudo systemctl stop liberland-validator
	Start: sudo systemctl start liberland-validator
	Logs: sudo journalctl -u liberland-validator
Node data is stored in /opt/liberland/data.
Session keys for your node: [long text starting with 0x here]
```

* Copy the session keys, you will need them when adding validator.
* If something went wrong and you need to get session keys manually, see [Regenerating session keys](https://github.com/liberland/docs/blob/master/blockchain/for-validators-nominators-and-stakers/regenerate_session_keys.md).

### Option 2: using docker

See [Docker guide](/blockchain/for-developers-and-testers/docker).

### Option 3: manually using prebuilt binaries

See [Using prebuilt binary](https://github.com/liberland/docs/blob/master/blockchain/for-validators-nominators-and-stakers/using_prebuilt_binary.md)

### Option 4: using source

See [Using source](https://github.com/liberland/docs/blob/master/blockchain/for-validators-nominators-and-stakers/using_source.md)

## Wait for your node to sync

Monitor logs of your node.

While syncing, you will see `Syncing` messages and lots of `maybe_release ran all the way` messages.

When synced, `maybe_release ran all the way` will mostly disappear and you will see mostly `Idle` and `Imported` messages.

This process will take a few seconds for every day the blockchain has been running - so expect a few hours.

## Add validator

> Note that in order to do this step you will need some LLD, so ask someone to give you some if you dont already have it.

1. Visit Staking in Liberland dAPP:
   * [Mainnet](https://blockchain.liberland.org/home/staking)
   * [Bastiat (Testnet)](https://testnet.liberland.org/home/staking)
2. Click "Switch to validator" button.
3. Set your commission (20 is fine) and session keys you got from installation step to `Keys from rotateKeys` form.
   * Note: if you lost your session keys, see [Regenerating session keys](https://github.com/liberland/docs/blob/master/blockchain/for-validators-nominators-and-stakers/regenerate_session_keys.md)
4. Click "Start validator" button and sign the transaction.
5. Optionally, click on add stake and stake some LLDs

## Verify

Immediately after adding validator, you should see it as "Waiting":

Now you have to wait to see if it gets elected to current set of validators. You may need to wait until new era starts and then the chance of being elected is based on the amount of staked LLD. To see current set of validators:

1. Visit Staking Accounts on Polkadot.js Apps:
   * [Mainnet](https://polkadotjs.blockchain.liberland.org/?rpc=wss%3A%2F%2Fmainnet.liberland.org#/staking/actions)
   * [Bastiat (Testnet)](https://polkadotjs.blockchain.liberland.org/?rpc=wss%3A%2F%2Ftestchain.liberland.org#/staking/actions)
2. Click "All validators" button.
3. Click "Active" button.
4. You should see list of active validators in the "Validators" table.

## Optional: add nominators

[Join the node operator room](https://matrix.to/#/#liberland-node:matrix.org) Once your validator is up and running and you have a solid track record of no downtime you can ask other LLD holders to nominate your validator node.


# Non-technical run a validator

[Join the node operator room](https://matrix.to/#/#liberland-node:matrix.org)

## Introduction

This guide will walk you through the process of setting up a new validator on Liberland Chain for non technical people. [You can follow along a outdated but still working video here](https://www.youtube.com/watch?v=ufV7igODxcQ)

## Requirements

* Liberland wallet with at least 200 LLD. [Ask to be onboarded](https://matrix.to/#/#liberland-node:matrix.org)
* [PolkadotJs wallet](https://polkadot.js.org/extension/)
* A helper [Ask here if you dont have one](https://matrix.to/#/#liberland-node:matrix.org)
* [On-chain citizenship](/blockchain/for-citizens/onboarding)

## Claim on-chain citizenship

* You will need your LLD, LLM, and an onchain citizenship to proceed. Follow the [Claim citizenship](/blockchain/for-citizens/onboarding) steps to proceed.
* At the end of this process, you should have a wallet, and a funded citizen account on the mainnet. Log into [blockchain.liberland.org](https://blockchain.liberland.org/signin) with your liberland account to verify everything works so far.

## Set up a server

* In this step, we will buy some server space and give access to a helper so he can setup the technical part of a validator for us.
* This guide is for AWS lightsail or DigitalOcean, but other server providers will work too.

### Option 1: AWS Lightsail

[Go to AWS](https://aws.amazon.com/) and create an account.

* In search, type lightsail
* Under Instances, click Create instance
* Select Linux/Unix, OS Only, Ubuntu 22.04 LTS, scroll down and select the plan with at least 4 GB RAM, 1 vCPU and 60gb SSD
* Scroll down and click on "Create instance"
* Wait for a few minutes for a server to initialize
* Ask for your helper to guide you through the next steps

### Option 2: Digital Ocean

[Go to Digital ocean](https://www.digitalocean.com/)

* Ask your helper for his ssh pubkey.
* Create a digital ocean account
* Click on create, and pick droplet
* Create a Ubuntu, version 22 droplet with at least 50 of disk and 4GB of RAM.
* When creating a droplet, under access it will give option of password or ssh. Pick ssh. This will allow your helper to securely connect to your server.
* Add the ssh pubkey from your helper to the server.
* Create the droplet.
* Wait for a minute for droplet to initialize.
* Click on the droplet and copy the IP address and sent the IP to your helper.
* Wait for the helper to inform you that a validator is running. This might take a few hours or days
* Do note that at this time, the helper has full access to your validator, and may decide to *hack* it, which is a potential security risk.
* In order to revoke access to your helper Go to Settings > Security and under SSH keys find your helper and under more pick delete.
* If something is wrong and you need to re-add access to your helper, go to Settings > Security and add ssh key of your helper again.
* At this point, your helper will give you your validator id which is needed for the next step

## Add validator

> Note that in order to do this step you will need some LLD, so ask someone to give you some if you dont already have it.

1. Visit Staking in Liberland dAPP:
   * [Mainnet](https://blockchain.liberland.org/home/staking)
   * [Bastiat (Testnet)](https://testnet.liberland.org/home/staking)
2. Click "Switch to validator" button.
3. Set your commission (20 is fine) and session keys you got from installation step to `Keys from rotateKeys` form.
   * Note: if you lost your session keys, see [Regenerating session keys](https://github.com/liberland/docs/blob/master/blockchain/for-validators-nominators-and-stakers/regenerate_session_keys.md)
4. Click "Start validator" button and sign the transaction.
5. Optionally, click on add stake and stake some LLDs

## Verify

Immediately after adding validator, you should see it as "Waiting":

1. Visit Staking Accounts on Polkadot.js Apps:
   * [Mainnet](https://polkadotjs.blockchain.liberland.org/?rpc=wss%3A%2F%2Fmainnet.liberland.org#/staking/actions)
   * [Bastiat (Testnet)](https://polkadotjs.blockchain.liberland.org/?rpc=wss%3A%2F%2Ftestchain.liberland.org#/staking/actions)
2. Click "Waiting" button.
3. You should see your Stash account in the "Intentions" table.

You are now officially a validator on Liberland! Enjoy the staking rewards!

Now you have to wait to see if it gets elected to current set of validators. You may need to wait until new era starts and then the chance of being elected is based on the amount of staked LLD. To see current set of validators:

* If everything works so far, congratulations, you are now a validator on Liberland!
* It is customary to tip your helper after getting a validator. 50 LLD is a good amount, that you will earn back quickly with your newly running validator.

## Optional: add nominators

[Join the node operator room](https://matrix.to/#/#liberland-node:matrix.org) Once your validator is up and running and you have a solid track record of no downtime you can ask other LLD holders to nominate your validator node.


# Staking

This article explains staking on Liberlands own blockchain. If you hold LLD on other chains like ETH, you can [bridge them](/blockchain/ecosystem/cross-chain-bridge) or [stake them on ETHereum](/blockchain/for-validators-nominators-and-stakers/eth-liquidity-staking) or [stake them on SOLana](/blockchain/for-validators-nominators-and-stakers/sol-liquidity-staking).

LLD is the operational token in Liberland that can be staked to earn returns.

The maximum yearly inflation for LLD is hardcoded at 10%, which will drop in the future.

This inflation is distributed to stakers - validators and nominators.

Validators are the actual servers running the blockchain. Only Liberland Citizens can [run validators](/blockchain/for-validators-nominators-and-stakers/run-a-validator)

Nominators can stake their LLD and pick validators that are honest - not cheating or hacking. By doing this they help the validator get elected and in turn share the inflation and transaction rewards.

Liberlanders can use the [Liberland dApp staking page](https://blockchain.liberland.org/home/staking/overview) to start staking:

* Click on 'Start Nominating'
* Pick the amount of LLD to stake (always leave a small amount of LLD free)
* Sign the transaction
* The screen should update, and show you the available validators
* Pick some validators
* Click on Update Nominations button
* Sign the transaction
* Done! You are now staking

  ![Start staking](/files/3sh5iSlGOa2gQ8fj5IJZ)

  ![Choose validators](/files/1WeCuPYDdEkwrlaSOfo5)

## Learn more

Liberland is a fork of substrate, a Proof of Stake system that runs Polkadot. You can learn more about it by [clicking here](https://wiki.polkadot.network/docs/learn-staking)

The job of nominators is to select - nominate the validators that run the chain. If they select honest validators, everyone gets a reward. If the validators are dishonest or technically unreliable, everyone gets a punishment - a portion of the staked tokens are burned. Since Liberland is still a new chain, the burns are very minimal and the chain is "forgiving".

Validating almost always gives more rewards but only citizens can [run validators](/blockchain/for-validators-nominators-and-stakers/run-a-validator). Citizens do not have to be tech guys to run them though, there is a way for [non-technical people to run validators](/blockchain/for-validators-nominators-and-stakers/run-a-validator-non-technical).

To payout the rewards, you can click on "payout rewards" in the staking interface. This pays out for every era, so there may be more transactions to sign. If you dont payout every 20 days, the old payouts will be deleted. This is to ensure only active validators are running the chain.\
Note that anyone can trigger payouts for the nominators in a particular validator. If there are no payouts to click, it could simply mean someone else already did this. While it can be confusing, this is so the chain can run more efficiently, reducing the number of transactions needed to keep it running.


# ETH Liquidity Staking

Liberland offers LLD rewards for staking Uniswap V2 ETH-LLD Liquidity Pool tokens. This rewards holding LLD and strengthening the trading liquidity pool on decentralized exchanges such as Uniswap. The rewards for doing this are similar for staking the equivalent value on the Liberland blockchain itself which is currently around 15-20% APY, but it dynamically reacts to staked amount, and LLD to ETH ratio. The maximum inflation for the total supply is capped at 10% a year, with commitments to reduce it as time goes on.

You can directly stake your ETH, LLD and LP tokens at [blockchain.liberland.org/home/staking/ethlpstaking](https://blockchain.liberland.org/home/staking/ethlpstaking),

After staking, you can gradually earn rewards in LLD which can be claimed at any time. On ETH LP staking, you can withdraw your LP tokens at any time. The risk you are taking on is the same risk as when providing any liquidity pool. You allow people to trade against both your LLD and ETH, earning trading fees and LLD as people trade and time goes on.

The staking contract is a standard, [audited StakeERC20 contract from Thirdweb](https://thirdweb.com/ethereum/0x286477f868Aa66C534254a16a7D532C7615Ac332). This same contract is audited and used in many other projects. The contract does not own your LP tokens which you can withdraw at any time, but there is a risk that 'reward LLDs' run out without the team remembering to refill them. You can see all the contract stats including reward pool LLDs on the contract itself or in the [Liberland dApp](https://blockchain.liberland.org/home/staking/ethlpstaking)


# SOL Liquidity Staking

Liberland offers LLD farm rewards for staking into SOL-LLD pool on raydium. This rewards holding LLD and strengthening the trading liquidity pool on decentralized exchanges such as Raydium. The rewards for doing this are similar for staking the equivalent value on the Liberland blockchain itself which is currently around 15-20% APY, but it dynamically reacts to staked amount, and LLD to SOL ratio. The maximum inflation for the total supply is capped at 10% a year, with commitments to reduce it as time goes on. In addition to LLD rewards, you also receive trading fees.

To stake your LLD on SOLana

* [Add liquidity to a raydium LLD-SOL pool](https://raydium.io/liquidity/increase/?mode=add\&pool_id=7fMyewrr7x2tLiNVGce7M3VTNiKzqQuriL1Gf3rv1PhR)
* [Stake your liquidity](https://raydium.io/liquidity/increase/?mode=stake\&pool_id=7fMyewrr7x2tLiNVGce7M3VTNiKzqQuriL1Gf3rv1PhR)

And thats it! Your rewards will start accumulating and you can collect them at any time on your [raydium portfolio](https://raydium.io/portfolio/?position_tab=standard)

Note that raydium farms only last up to 90 days. So to make sure you are getting maximum rewards, [revisit your portfolio](https://raydium.io/portfolio/?position_tab=standard) periodically to collect rewards and re-stake again if needed.


# Update node

## Node update guide

Update requires updating to the latest node binary.

For a detailed guide, please choose the proper instruction according to the method used to install the node:

* [Automated script](#automated-script-installs) (a.k.a. nodes installed with [this guide](/blockchain/for-validators-nominators-and-stakers/run-a-validator#option-1-automatic-script))
* [Docker](#docker-installs)
* [Manual](#manual-installs)

## Automated script installs

Run the following command on your server:

```
curl -sSLO https://raw.githubusercontent.com/liberland/liberland_substrate/main/substrate/scripts/install/install.sh
bash install.sh
```

The installer will detect existing install and perform the required updates without wiping any data or keys. If asked about which network to use - make sure you choose the correct one.

## Docker installs

You need to pull the latest image and recreate your container.

If you followed the [Complete example of running a validator on mainnet](/blockchain/for-developers-and-testers/docker) guide, follow these steps:

1. Pull the latest image:

   ```
   docker pull liberland/blockchain-node:latest
   ```
2. Stop and remove the old container. If you followed the guide, it won't remove any data or keys:

   ```
   docker stop liberland && docker rm liberland
   ```
3. Recreate the container:

   ```
   docker run --name liberland -d --network=host --restart always -v $HOME/liberland_data:/data liberland/blockchain-node:latest -d /data --chain mainnet --validator
   ```

## Manual installs

If you've installed manually, you need to:

1. Download latest node binary (`linux_x86_build`) from the [releases page](https://github.com/liberland/liberland_substrate/releases)
2. Stop your node
3. Replace the binary you're using with the downloaded one
4. Restart your node


# Resync node

## Resyncing node

To resync your Liberland Node, you need to:

1. If you're a validator and the chain is live and not stalled:
   1. Stop validating using [Liberland dApp](https://blockchain.liberland.org/) or [Polkadot.js Apps](https://polkadot.js.org/apps/?rpc=wss://mainnet.liberland.org#/legacy-staking/actions)
   2. Make sure your node is not in [the active validator set](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fmainnet.liberland.org#/legacy-staking)
2. stop the node
3. remove the directory containing Liberland Node Database (`chains/mainnet/db`)
4. restart the node
5. wait until it resyncs

Node data directory structure is as follows:

```
chains
└── mainnet
    ├── db
    ├── keystore
    └── network
```

**DO NOT** remove `keystore` or `network` directories. Only remove the `db` directory.

For a detailed guide, please choose the proper instruction according to the method used to install the node:

* [Automated script](#automated-script-installs) (a.k.a. nodes installed with [this guide](/blockchain/for-validators-nominators-and-stakers/run-a-validator#option-1-automatic-script))
* [Docker](#docker-installs)

## Automated script installs

If your node is a validator and the chain is live and not stalled:

1. Stop validating using [Liberland dApp](https://blockchain.liberland.org/) or [Polkadot.js Apps](https://polkadot.js.org/apps/?rpc=wss://mainnet.liberland.org#/legacy-staking/actions)
2. Make sure your node is not in [the active validator set](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fmainnet.liberland.org#/legacy-staking)

When your node is no longer a validator, or the chain is currently stalled, run the following commands on your server:

```
systemctl stop liberland-validator
rm -rf /opt/liberland/data/chains/mainnet/db
systemctl start liberland-validator
```

## Docker installs

If your node is a validator and the chain is live and not stalled:

1. Stop validating using [Liberland dApp](https://blockchain.liberland.org/) or [Polkadot.js Apps](https://polkadot.js.org/apps/?rpc=wss://mainnet.liberland.org#/legacy-staking/actions)
2. Make sure your node is not in [the active validator set](https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fmainnet.liberland.org#/legacy-staking)

When your node is no longer a validator, or the chain is currently stalled, run the following commands on your server:

```
docker stop liberland
rm -rf $HOME/liberland_data/chains/mainnet/db
docker start liberland
```

If you run it in a custom way, and not with the [Complete example of running a validator on mainnet](/blockchain/for-developers-and-testers/docker) guide, adjust the container name and DB path accordingly.


# For Developers & Testers


# Build, run & test using source code

This guide will walk you through:

* building the blockchain node from source code,
* running a local development instance, which spawns a new single-node testnet,
* interacting with development instance,
* running automated tests.

## Install dependencies

For Ubuntu & Debian derivatives:

```
sudo apt update
sudo apt install build-essential git clang curl libssl-dev llvm libudev-dev make protobuf-compiler pkg-config
```

Next install Rust itself. Run and follow prompts:

```
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup default stable
```

And install WASM target:

```
rustup target add wasm32-unknown-unknown
```

See [Substrate docs](https://docs.substrate.io/install/) for detailed guide and other platforms.

## Fetch latest source code

Development of Liberland Blockchain Node happens in two branches:

* `main`, which contains latest stable release
* `develop`, which contains latest, not yet released as stable changes

To fetch source code, run the following (you may replace `main` with `develop` if desired):

```
git clone https://github.com/liberland/liberland_substrate.git -b main
cd liberland_substrate
```

## Minimum requirements

Make sure you have at least 4 GB of RAM available. If you dont, add whats missing to swap. [Adding swap for ubuntu](https://www.cloudsigma.com/adding-swap-space-on-ubuntu-20-04-a-tutorial/) Note that this will fix some out of memory build errors, but will significantly prolong the build.

## Build the node

To build the node, run:

```
cargo build --release
```

Note that this will likely take a long time. If everything goes correctly, you'll see:

```
    Finished release [optimized] target(s)
```

And will be able to run the node using built executable (output might differ slightly):

```
user@machine:~/liberland_substrate$ ./target/release/substrate --version
substrate 3.0.0-dev-41cd30e9e7d
```

## Run and interact with development instance

To run a development instance of Liberland node, execute:

```
cargo run --release -- --dev
```

Development instance is a single-node testnet, in which standard development accounts (Alice, Bob, etc.) are endowed with assets. To interact with it, visit [Polkadot.js Apps](https://polkadotjs.blockchain.liberland.org/?rpc=ws://localhost:9944).

## Run automated tests

Liberland Blockchain node is comprehensively covered with automated unit tests. To run them, execute:

```
cargo test --features runtime-benchmarks
```

As these typically take a long time, you can also choose to run tests only for specific pallets. Here's example for the legislation pallet:

```
cargo test --features runtime-benchmarks -p pallet-liberland-legislation --lib
```


# Run in Docker

Prequirements: This guide assumes your running a Linux based operating system and have Docker already installed.

## Docker image details

Liberland's node docker image is hosted on GitHub Container Registry: [ghcr.io/liberland/blockchain-node](https://github.com/orgs/liberland/packages/container/package/blockchain-node). It's build automatically from public [Dockerfile](https://github.com/liberland/liberland_substrate/blob/main/Dockerfile-prebuilt). Configuration:

* Node binary is stored at `/node`
* Exposed ports: `30333`, `9944`.
* Runs as unpriviledged user with UID 1000

## Usage examples

### Minimal Bastiat (testnet) node with persistent data

To make sure your node's data is persistant, mount a host directory as a volume using `-v` argument:

```bash
$ mkdir $HOME/liberland_data
$ sudo chown 1000:1000 $HOME/liberland_data
$ docker run -it --rm -v $HOME/liberland_data:/data ghcr.io/liberland/blockchain-node:latest -d /data --chain bastiat
```

### Using custom chain spec

To use custom chain spec, you must mount it into the container:

```bash
$ mkdir $HOME/liberland_data
$ sudo chown 1000:1000 $HOME/liberland_data
$ docker run -it --rm -v $HOME/liberland_data:/data -v $HOME/custom_chain_spec.raw.json:/custom_chain_spec.raw.json ghcr.io/liberland/blockchain-node:latest -d /data --chain /custom_chain_spec.raw.json
```

### Accessing your node locally via Polkadot.js Apps

To be able to access your node locally via Polkadot.js Apps, pass `--network=host` argument so that RPC port is accessible:

```bash
$ mkdir $HOME/liberland_data
$ sudo chown 1000:1000 $HOME/liberland_data
$ docker run -it --rm --network=host -v $HOME/liberland_data:/data ghcr.io/liberland/blockchain-node:latest -d /data --chain bastiat
```

You'll now be able to access your node via <https://polkadotjs.blockchain.liberland.org/?rpc=ws://localhost:9944>.

### Complete example of running a validator on mainnet

This example:

* passes `-v $HOME/liberland_data:/data` to make data persistent on the host
* passes `--network=host` to make RPC accessible locally and P2P accessible on all interfaces
* passes `-d` to run in background
* passes `--restart always` to automatically restart node on reboot / crash
* uses mainnet chain spec
* passes `--validator` option to node to enable acting as validator

```bash
$ mkdir $HOME/liberland_data
$ sudo chown 1000:1000 $HOME/liberland_data
$ docker run --name liberland -d --network=host --restart always -v $HOME/liberland_data:/data ghcr.io/liberland/blockchain-node:latest -d /data --chain mainnet --validator
```

You can:

* monitor this instance with `docker ps -a`
* see its logs with `docker logs liberland`
* stop with `docker stop liberland` - note that it will restart automatically on reboot / Docker restart
* restart with `docker restart liberland`
* remove with `docker rm liberland`

#### Generate session keys

See [regenerate session keys](https://github.com/liberland/docs/blob/master/blockchain/for-validators-nominators-and-stakers/regenerate_session_keys.md) document.

With an instance running like this you may now follow the [Run a validator](/blockchain/for-validators-nominators-and-stakers/run-a-validator#wait-for-your-node-to-sync) starting with **Wait for your node to sync** section.


# Manual testing guide

<https://docs.google.com/document/d/1ntrT6bafTD2LfXUG9QLxOieogXELn9icN1y\\_\\_EGfZ98/edit?usp=sharing>


# Runtime upgrade

### How to upgrade the chain

Prerequirements: Read substrate official documentation Read about webassembly and utilize "subwasm" Watch Alex's runtime migrations video: <https://www.youtube.com/watch?v=MQgDV37JrIY> Read about runtime migrations: <https://github.com/apopiak/substrate-migrations>

## Step 1

Add your changes to the code repository and make sure your pallets are included in the runtime. Increment the spec\_version by adding +1.

Compile your node

## Step 2

Go over modifed changes made to the storage and apply storage migrations to convert the old types to the new once in the `on_runtime_upgrade` function

Note: Failing to migrate important storage changes will have a negative effect on the chain Note: use logging to display what migrations kicked in

## Step 3

Verify that the compiled wasm file looks good with subwasm and srtool(<https://github.com/paritytech/srtool>).

## Step 4

Compile the node locally and use the current spec\_version that is deployed on chain(check polkadot.js for last upgrade in chainstate) Push the runtime upgrade either with as Sudo Call or as a democracy vote on your local instance. If all is well and the pallet's interact good after the upgrade, go ahead to the next step

## Step 5

Prep a release page for the node with the output from srtool and the hashes of the binary files, upload the wasm file aswell to the releases page.

## Step 6

Push the upgrade on-chain

### Links:

<https://develop--substrate-docs.netlify.app/how-to-guides/v3/storage-migrations/basics/> <https://docs.substrate.io/build/runtime-storage/> <https://docs.substrate.io/build/upgrade-the-runtime/>


# Rust API docs

Liberland Blockchain Node contains thorough in-code documentation.

## Seeing Rust API docs locally

Assuming you have your development environment setup (see [Build, Run & Test guide](/blockchain/for-developers-and-testers/dev)), execute following in main `liberland_substrate` repo directory:

```
cargo doc --open --no-deps -p pallet-llm -p pallet-liberland-legislation -p pallet-liberland-initializer
```


# Bootstrapping new testnet

## 1. Prepare your env

This guide assumes you have environment capable of building the substrate node. Follow [Build, run & test using source code](/blockchain/for-developers-and-testers/dev) guide to setup it.

## 2. Prepare release

Tag the commit from which you'll build the chain spec and run initial nodes. Use this version of code for all following commands.

## 3. Preparing your initial nodes' keys

For each of your initial nodes/validators, you need following keys:

* controller account, that will allow starting/stopping validation
* stash account, that will actually hold staked LLD
* sessions keys:
  * grandpa (ed25519)
  * babe (sr25519)
  * im\_online (sr25519)
  * authority\_discovery (sr25519)

## 4. Preparing shell

Commands below require the `LIBERLAND_NODE` variable to be set to command of node binary. Examples:

```
liberland_substrate (develop)> export LIBERLAND_NODE="cargo run -q --release --" # build from source
liberland_substrate (develop)> export LIBERLAND_NODE="./target/release/substrate" # use locally built binary
liberland_substrate (develop)> export LIBERLAND_NODE="$HOME/linux_x86_node" # use downloaded prebuilt binary
```

Scripts also respect the `LIBERLAND_NODE` variable, but default to running `cargo` if variable is unset.

### Generating Controller and stash keys

These are regular accounts, you can use Polkadot Extension to generate them.

If you prefer, you can also generate them manually from seed:

```
liberland_substrate (develop)> $LIBERLAND_NODE key inspect '<<YOUR_SEED_HERE>>'
liberland_substrate (develop)> $LIBERLAND_NODE key inspect '<<YOUR_SEED_HERE>>//stash'
```

### Generating session keys

Make sure you're using different seed for each node.

#### Option 1: using script

Use the `get_session_keys_from_seed.sh`:

```
liberland_substrate (develop)> ./scripts/get_session_keys_from_seed.sh 
Provide your seed. If you don't have one, feel free to copy this freshly generated one:
 strong uncover fossil tag because announce coast mom blue endless file warrior
Seed: <<YOUR_SEED_HERE>>
gran (ed25519): 8280a7b1f74bc53e6fb2cf686566fbdcc850a61014e96a457e7d763a5e67a3e7
babe (sr25519): 0caf07d84a96f800892699d69eb74d963ae2d8c5ced5c54199c061a270d2b827
imon (sr25519): 509cd46a791813b05615a14b240319c56bc2f7a19106aadb26193bb126e27c40
audi (sr25519): 7c5f75b761139f09b612b4457f24615080dcb0721ba8eb88ee7571d9f4589731
```

#### Option 2: manually

Notice that first command (for `grandpa`) uses `ed25519` scheme and others use `sr25519` scheme.

```
liberland_substrate (develop)> $LIBERLAND_NODE key inspect --scheme ed25519 '<<YOUR_SEED_HERE>>//gran' # grandpa
liberland_substrate (develop)> $LIBERLAND_NODE key inspect --scheme sr25519 '<<YOUR_SEED_HERE>>//babe' # babe
liberland_substrate (develop)> $LIBERLAND_NODE key inspect --scheme sr25519 '<<YOUR_SEED_HERE>>//imon' # im_online
liberland_substrate (develop)> $LIBERLAND_NODE key inspect --scheme sr25519 '<<YOUR_SEED_HERE>>//audi' # authority_discovery
```

## 4. Building chain spec

While it's possible to create the spec file manually, it's recommended to build it from code.

Make sure you have the correct version of code checked out. Go to `bin/node/cli/src/chain_spec.rs` and find the `fn staging_testnet_config_genesis()` function. In there, do the following changes:

1. Update `initial_authorities`. This is the place were you need to put your initial nodes' keys from [Step 2](#2-preparing-your-initial-nodes-keys). The order for each item is:
   * Stash's public key (SS58)
   * Controller's public key (SS58)
   * Grandpa public key (hex)
   * Babe public key (hex)
   * Im\_online public key (hex)
   * Authority\_discovery public key (hex)
2. Update the `citizens`. Each address on this list will be a valid citizen with a KnownGood judgement and will receive `10^18` LLD.
3. Update the `registrar_key` - it's the address of Citizenship Registrar that will be able to provide identity judgements for citizenship.
4. Update the `root_key` - it's the account capable of executing sudo calls
5. Update the `technical_committee`

After updating the code, we may now generate the human-readable template for spec:

```
liberland_substrate (develop)> $LIBERLAND_NODE build-spec --chain staging --disable-default-bootnode > new_chain_spec.json
```

Open the generated `new_chain_spec.json` file in your editor. You may want to adjust things like `name`, `id`, `properties.displayName` to match your new testnet.

Generate the raw chain spec:

```
liberland_substrate (develop)> $LIBERLAND_NODE build-spec --chain new_chain_spec.json --disable-default-bootnode > new_chain_spec.raw.json
```

The generated `new_chain_spec.raw.json` is the file that should be distributed to all participants of the network and will be used to run our initial nodes.

## 5. Running our first node

### Inserting session keys

#### Option 1: using script

If you've generated session keys using `get_session_keys_from_seed.sh`, you may now run `insert_session_keys_from_seed.sh` with the same seed. Make sure you pass the correct chain spec and path where node should store its data:

```
liberland_substrate (develop)> ./scripts/insert_session_keys_from_seed.sh --chain new_chain_spec.raw.json -d /data/liberland_node/
Provide your seed. If you don't have one, feel free to copy this freshly generated one:
 strong uncover fossil tag because announce coast mom blue endless file warrior
Seed: <<YOUR_SEED_HERE>>
gran (ed25519): 8280a7b1f74bc53e6fb2cf686566fbdcc850a61014e96a457e7d763a5e67a3e7
babe (sr25519): 0caf07d84a96f800892699d69eb74d963ae2d8c5ced5c54199c061a270d2b827
imon (sr25519): 509cd46a791813b05615a14b240319c56bc2f7a19106aadb26193bb126e27c40
audi (sr25519): 7c5f75b761139f09b612b4457f24615080dcb0721ba8eb88ee7571d9f4589731
```

#### Option 2: manually

Run following commands. Make sure you pass proper chain spec file, path to node storage and insert the same seed as one used for preparing keys for chain spec. Notice that first command (for `grandpa`) uses `ed25519` scheme and others use `sr25519` scheme.

```
liberland_substrate (develop)> $LIBERLAND_NODE key insert --chain new_chain_spec.raw.json -d /data/liberland_node --scheme ed25519 --key-type gran --suri '<<YOUR_SEED_HERE>>//gran'
liberland_substrate (develop)> $LIBERLAND_NODE key insert --chain new_chain_spec.raw.json -d /data/liberland_node --scheme sr25519 --key-type babe --suri '<<YOUR_SEED_HERE>>//babe'
liberland_substrate (develop)> $LIBERLAND_NODE key insert --chain new_chain_spec.raw.json -d /data/liberland_node --scheme sr25519 --key-type imon --suri '<<YOUR_SEED_HERE>>//imon'
liberland_substrate (develop)> $LIBERLAND_NODE key insert --chain new_chain_spec.raw.json -d /data/liberland_node --scheme sr25519 --key-type audi --suri '<<YOUR_SEED_HERE>>//audi'
```

### Running the first node

Make sure you pass the same chain spec and path to data as when inserting session keys:

```
liberland_substrate (develop)> $LIBERLAND_NODE --chain new_chain_spec.raw.json -d /data/liberland_node --force-authoring --validator
2023-01-03 12:27:50 Substrate Node    
2023-01-03 12:27:50 ✌️  version 3.0.0-dev-2c2aac70051    
2023-01-03 12:27:50 ❤️  by Parity Technologies <admin@parity.io>, 2017-2023    
2023-01-03 12:27:50 📋 Chain specification: Staging Testnet    
2023-01-03 12:27:50 🏷  Node name: energetic-button-0223    
2023-01-03 12:27:50 👤 Role: AUTHORITY    
2023-01-03 12:27:50 💾 Database: RocksDb at ../test1/chains/staging_testnet/db/full    
2023-01-03 12:27:50 ⛓  Native runtime: liberland-4 (liberland-node-0.tx1.au10)    
2023-01-03 12:27:53 [0] 💸 generated 3 npos voters, 3 from validators and 0 nominators    
2023-01-03 12:27:53 [0] 💸 generated 3 npos targets    
2023-01-03 12:27:54 🔨 Initializing Genesis block/state (state: 0x50e6…fc65, header-hash: 0x7899…7aac)    
2023-01-03 12:27:54 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.    
2023-01-03 12:27:55 👶 Creating empty BABE epoch changes on what appears to be first startup.    
2023-01-03 12:27:55 Using default protocol ID "sup" because none is configured in the chain specs    
2023-01-03 12:27:55 🏷  Local node identity is: 12D3KooWL8az46KDc6d4iMCtwwx2RW7fxP7DfNYMVQRX7STWzBcj    
2023-01-03 12:27:55 💻 Operating system: linux    
2023-01-03 12:27:55 💻 CPU architecture: x86_64    
2023-01-03 12:27:55 💻 Target environment: gnu    
```

Note the `Local node identity is: 12D3KooWL8az46KDc6d4iMCtwwx2RW7fxP7DfNYMVQRX7STWzBcj` in output. Copy this ID from your output, we'll need it later.

## 6. Running remaining initial nodes

### Inserting session keys

Follow [the same procedure as for the first node](#inserting-session-keys). Make sure you're using different seed for each node.

### Running the node

Create the bootstrap node address. The format is:

```
/ip4/<IP_ADDRESS>/tcp/30333/p2p/<ID>
```

Where:

* `<IP_ADDRESS>` must be replaced with the IP address of your initial node
* `ID` must be replaced with the `Local node identity` printed in startup log of your initial node.

Make sure you pass the same chain spec and path to data as when inserting session keys.

```
liberland_substrate (develop)> $LIBERLAND_NODE --chain new_chain_spec.raw.json -d /data/liberland_node --validator --bootnodes /ip4/<IP_ADDRESS>/tcp/30333/p2p/<ID>
2023-01-03 12:27:50 Substrate Node    
2023-01-03 12:27:50 ✌️  version 3.0.0-dev-2c2aac70051    
2023-01-03 12:27:50 ❤️  by Parity Technologies <admin@parity.io>, 2017-2023    
[...]
2023-01-03 12:34:12 💤 Idle (1 peers), best: #0 (0x7899…7aac), finalized #0 (0x7899…7aac), ⬇ 0 ⬆ 0    
```

Make sure it shows `(1 peers)` (or more) in the logs after a minute. If not, verify that your initial node is running and bootnode address is correct. It's OK if it doesn't produce/finalize blocks yet, we need all nodes for that.

## 6. Verify

Now that we've added all initial nodes, we should see that blocks are getting finalized.

Good (notice `finalized #9`):

```
2023-01-03 12:34:12 💤 Idle (2 peers), best: #12 (0x608e…ba6f), finalized #9 (0xb83d…0e43), ⬇ 0 ⬆ 0    
```

Bad (notice `finalized #0`):

```
2023-01-03 12:34:12 💤 Idle (2 peers), best: #12 (0x608e…ba6f), finalized #0 (0x7899…7aac), ⬇ 0 ⬆ 0    
```

If blocks aren't finalized, verify that correct session keys were inserted to each node.


# Chain Crash Recovery Procedure

This procedure should be performed by Liberland Blockchain Dev Team in case of chain failure that led to blocks not being produced or made it impossible to submit extrinsics.

1. Identify the hash of the block that broke the runtime:
   * If finalized, maybe chain explorer has it:

     ```
     query {
       events(first:1,filter:{section:{equalTo:"system"},method:{equalTo:"CodeUpdated"}}, orderBy:BLOCK_NUMBER_DESC) {
         nodes {
           block {
             number,
             hash,
             timestamp
           }
         }
       }
     }
     ```
   * Otherwise look for `system.CodeUpdated` event in recent blocks
2. Update JSONs (both `.raw.json` and normal) with chain specification in `specs/` to include hash of the block with `CodeUpdated` in `badBlocks`. **Notice:** this will revert all changed made in this block and all blocks that came after it, including things like transferring funds! This might cause consistency issues for exchanges, relayers, indexers that already processed these blocks in some way, especially if it was already finalized. Example:

   ```
     "badBlocks": ["0xab1f37b6306b2844320fba83152475efe06ab276cd46177da93e420079598609"],
   ```
3. Perform the standard release process to build new node binary. Remember to also build and publish new Docker image!
4. Instruct all nodes in network (validators, exchanges, bridges, RPC endpoints, users) to perform [Node Update](/blockchain/for-validators-nominators-and-stakers/update).
5. If the removed block was already finalized, in addition to the update instruct all nodes to perform [Resync](/blockchain/for-validators-nominators-and-stakers/resync). Make sure it's not done all at once - there should always be a healthy number of nodes that are not resyncing.


# Payment gateway

## MVP

Liberland payment gateway is unique in that it handles most of the data on chain and does not keep permanent records on the server itself, both for legal and decentralization reasons. It is merely a middleman telling the buyer how to pay the merchant, and then notifying the merchant of the payment.

The merchant will build a link similar to this

<http://testnet.liberland.org/home/wallet/gateway/557?price=4\\&toId=5Cz12KQKCmLMg7GULaJfAEe78DtTHSfs7LjaJKtWSA1DtwQg\\&callback=https%3A%2F%2Fgoogle.com\\&remark=%27Get%20citizenship%20now%27\\&failure=https%3A%2F%2Fseznam.cz\\&hook=https%3A%2F%2Fwebhook.site%2F06892882-f63f-4bfb-a57d-632d2953e631>

* The first number is the order id created by the merchant.
* Second number price is the price in LLD
* Third argument toId is the merchants address on the Liberland chain
* Callback is the redirect after successful payment
* Remark is the note that will be recorded onchain and it can contain identifying info
* Failure is the redirect on failure
* Hook is a webhook that will return the data about the payment

A payment is considered complete when a payment is sent to the correct address with the correct remark and amount within the next 10000 blocks.

The happy path works in this order:

1. Merchant creates the payment link
2. User clicks on the link and executes the payment
3. User is redirected to the site and a webhook provides data about the payment - address, price and remark
4. The merchant verifies that the webhook data received matches the order regarding address, price and (optionally) remark
5. Merchant executes the order

Any failed orders where LLD was sent can be easily handled manually via <https://chainscan.mainnet.liberland.org/>

### Verifying payment

#### Check signature

Webhook gets data from api.blockchain.liberland.org with a header signature signed with public key, which can be verified. The key is

```
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsnqntFgG8ZS01FJ4eoxc
5yAaIKz+O/p9e2+r8INQV71fbtscBG0+cv+pexhYtD10tshvoqS5O3W0s7Sea1b2
hlc1ePo0VCIRQew7csMIikALY/AIi/6swfzyxRulCPuBiNtA0tAQBplQJxRYkps6
Wf4KIAypJk/mr7JPO76VcCAtqg/chApWNBlg7qpFqfjO/N3EnHxYRmZ8/bCLml7h
YnmjK0fH6ceQcxy1WMN0wB06tFvEzDpAJrex/ilWJvhemVH2IpT4IYjpYAPj//Cj
8/cdjED9mx2RuP5xsp96Qr1Vk4GXhM89emp35h936fBq4i4b0nvRQ+vIUIPA5pPa
qwIDAQAB
-----END PUBLIC KEY-----
```

The verification pseudocode is

```
import { readFileSync } from "fs";
import { createVerify, randomBytes } from "crypto";

const publicKey = readFileSync(pubKeyPath, "utf-8");
const verifier = createVerify("SHA256");
verifier.update(responseJSONStringified);
verifier.end();
const signatureBuffer = Buffer.from(signature, "base64");
return verifier.verify(publicKey, signatureBuffer);

// pubKeyPath is the file path to public key
// responseJSONStringified and signature are parameters
// responseJSONStringified is the whole response, JSON stringified
```

#### Check chain

Alternatively the merchant can check the chain directly or call the middleware API for payment status

endpoint is /verify-purchase with orderId, price and toId POST parameters.

Mainnet <https://api.blockchain.liberland.org/v1/verify-purchase>

Testnet <https://staging.api.blockchain.liberland.org/v1/verify-purchase>

## Upcoming v1.5

Upcoming version 1.5 will integrate with companies on Liberland chain. The hook, success and fail callbacks will be setup during company registration and will not be included in the link generated by merchant but read from the chain directly to add additional layer of security.

Companies will be able to have multiple addresses.

Companies will be able to see a history of transactions on the blockchain for all addresses as well as failed transactions, acting as history and metrics.

## Upcoming v2.0

Each order will be an unique walletaddress that the company controls, so the orders will be able to be completed not only in blockchain.liberland.org but any substrate wallet


# Recovery procedures

## Public node failure

In case of a permanent failure of a public node like dwellir or liberland govt nodes

* Setup a new node
* Update the node link in all places where it is used
  * <https://blockchain.liberland.org>
  * <https://chainscan.mainnet.liberland.org/>
  * <https://election-details.liberland.org/>
  * <https://api.blockchain.liberland.org>
  * <https://archive.mainnet.liberland.org/graphql>
  * <https://liberland.org>
  * Check SORA bridge
  * Contact teams of:
    * Edge wallet
    * Subwallet
    * Talisman wallet
    * Fearless wallet
    * MEXC
    * Bitmart
    * Biconomy
    * Coinstore
    * Emirex


# Media


# Press Kit

### Thanks for your interest in Liberland!

Here's our press kit featuring the nation’s logo, flags, a collection of photos, and other information about our small, but intrepid nation.

## About Liberland

Liberland is built on classical liberal (libertarian) ideals which emphasize autonomy and minimize the state's encroachment on individual liberties. Rule of law, bodily autonomy, free trade, freedom of choice, freedom of movement, and others are all core tenets of our fledgling nation.

Liberland is a constitutional republic with elements of direct democracy that allows direct engagement of the citizens. The founder and head of state is President Vít Jedlička, and the state has two vice presidents and five ministers. The official language is English and the national currency is the Liberland merit.

**Liberland’s motto:** To Live and Let Live.

Liberland is building an open-source government that will maximize the freedom of its citizens. It was also the first nation to draft its constitution alongside its governance platform, the Liberland Blockchain.

## Settlement

Liberland has had a permanent settlement since early August 2023. At its height there were 20 settlers on-site, building basic infrastructure, homes, and community-focused amenities. Several settlers have remained throughout Winter 2023/2024, and we anticipate an even larger settlement will begin Spring 2024. This concludes our fulfillment of the Montevideo Convention on statehood.

## Logo

For information on implementing our logo in different applications, please contact <press@liberland.org>.

Download full logo set → [Click to Download](https://github.com/liberland/docs/blob/master/media/LL-Logos.zip)

### Media Kit

* Liberland Badge, PNG → [Click to Download](https://github.com/liberland/docs/blob/master/media/Badge_LL.png)
* Flag of Liberland, PNG → [Click to Download](https://github.com/liberland/docs/blob/master/media/Liberland_Flag.png)
* Flag of Liberland, SVG → [Click to Download](https://github.com/liberland/docs/blob/master/media/Liberland_Flag.svg)
* Liberland Shield, PNG → [Click to Download](https://github.com/liberland/docs/blob/master/media/Liberland_Shield.png)
* Liberland Shield, SVG → [Click to Download](https://github.com/liberland/docs/blob/master/media/Liberland_Shield.svg)
* Liberland Dollar, PNG → [Click to Download](https://github.com/liberland/docs/blob/master/media/Liberland_Dollar_Circle.png)
* Liberland Dollar, SVG → [Click to Download](https://github.com/liberland/docs/blob/master/media/Liberland_Dollar_Square.svg)
* Liberland Merit, PNG → [Click to Download](https://github.com/liberland/docs/blob/master/media/Liberland_Merit_Square.png)
* Liberland Merit, SVG → [Click to Download](https://github.com/liberland/docs/blob/master/media/Liberland_Merit_Square.svg)

## Screenshots

High-resolution assets of our interface on desktop and mobile, as well as a selection of GIFs showing functionality across the app.

* Blockchain dApp, Home: [Light UI](https://github.com/liberland/docs/blob/master/media/dapp-home-light.png) | [Dark UI](https://github.com/liberland/docs/blob/master/media/dapp-home-dark.png)
* Blockchain dApp, Finances: [Light UI](https://github.com/liberland/docs/blob/master/media/dapp-finances-light.png) | [Dark UI](https://github.com/liberland/docs/blob/master/media/dapp-finances-dark.png)
* Blockchain dApp, DEX: [Light UI](https://github.com/liberland/docs/blob/master/media/dapp-dex-light.png) | [Dark UI](https://github.com/liberland/docs/blob/master/media/dapp-dex-dark.png)
* Blockchain dApp, Companies: [Light UI](https://github.com/liberland/docs/blob/master/media/dapp-companies-light.png) | [Dark UI](https://github.com/liberland/docs/blob/master/media/dapp-companies-dark.png)
* Blockchain dApp, Offices: [Light UI](https://github.com/liberland/docs/blob/master/media/dapp-offices-light.png) | [Dark UI](https://github.com/liberland/docs/blob/master/media/dapp-offices-dark.png)

## Illustrations

Our illustrations are a core component of our identity, allowing us to visualize our ideas and concepts in an approachable and playful way.

Download full illustration set → [Click to Download](https://github.com/liberland/docs/blob/master/media/LL-Illustrations.zip)

### Media Kit

* LLD Illustration → [Click to Download](https://github.com/liberland/docs/blob/master/media/lld-graphic-bg.png)
* LLM Illustration → [Click to Download](https://github.com/liberland/docs/blob/master/media/lld-graphic-transparent.png)
* LLD Original, transparent → [Click to Download](https://github.com/liberland/docs/blob/master/media/llm-graphic-bg.png)
* LLM Original, transparent → [Click to Download](https://github.com/liberland/docs/blob/master/media/llm-graphic-transparent.png)

## Leadership

These are the leaders of Liberland, including the President and Cabinet.

Vít Jedlička, President → [Click to Download](https://github.com/liberland/docs/blob/master/media/vit-jedlicka.png)\
Boguslaw Wozniak, Vice President → [Click to Download](https://github.com/liberland/docs/blob/master/media/boguslaw-wozniak.png)\
Thomas Walls, Minister of Foreign Affairs → [Click to Download](https://github.com/liberland/docs/blob/master/media/thomas-walls.png)\
Navid Saberin, Minister of Finance → [Click to Download](https://github.com/liberland/docs/blob/master/media/navid-saberin.png)\
Michal Ptáčník, Minister of Justice → [Click to Download](https://github.com/liberland/docs/blob/master/media/michal-ptacnik.png)\
Dr. Tariq Abbasi, Secretary of State → [Click to Download](https://github.com/liberland/docs/blob/master/media/tariq-abbasi.png)

## Photos

When it comes to our culture, we'd rather show than tell. Here are some photos to give you a sense of the day to day.

* [Ark Liberland 001](https://github.com/liberland/docs/blob/master/media/IMG_3898.jpeg)
* [Ark Liberland 002](https://github.com/liberland/docs/blob/master/media/IMG_3897.jpeg)
* [Ark Liberland 003](https://github.com/liberland/docs/blob/master/media/IMG_3900.jpeg)
* [Ark Liberland 004](https://github.com/liberland/docs/blob/master/media/IMG_3899.jpeg)
* [Ark Liberland 005](https://github.com/liberland/docs/blob/master/media/IMG_3902.jpeg)
* [Ark Liberland 006](https://github.com/liberland/docs/blob/master/media/IMG_3938.jpeg)
* [Ark Liberland 007](https://github.com/liberland/docs/blob/master/media/IMG_4008.jpeg)
* [Ark Liberland 008](https://github.com/liberland/docs/blob/master/media/IMG_4029.jpeg)
* [Liberland on the Ground 001](https://github.com/liberland/docs/blob/master/media/liberland-flags-entry.jpeg)
* [Liberland on the Ground 002](https://github.com/liberland/docs/blob/master/media/house-in-making.jpeg)
* [Liberland on the Ground 003](https://github.com/liberland/docs/blob/master/media/liberland-house.jpeg)
* [Liberland on the Ground 004](https://github.com/liberland/docs/blob/master/media/house-ll.jpeg)
* [Liberland on the Ground 005](https://github.com/liberland/docs/blob/master/media/kitchen-in-making.jpeg)
* [Yacht House](https://github.com/liberland/docs/blob/master/media/yachthouse-1.jpeg)

## Social Media Platforms

* [X](https://x.com/liberland_org)
* [Telegram](https://t.me/liberlanders)
* [Discord](https://discord.gg/z6vsBd3eUD)
* [Facebook](http://www.facebook.com/liberland/)
* [LinkedIn](https://www.linkedin.com/company/liberland/)
* [Instagram](https://www.instagram.com/liberlandofficial/)
* [YouTube](https://www.youtube.com/@LiberlandOfficial)
* [Twitch](https://www.twitch.tv/liberlanddailyshow)

## Press Contact

We're also happy to help with any questions you have. Just email <press@liberland.org>. You'll reach a real human who can arrange interviews and provide original materials!


