Question: Swedish Livonia, which constituted the southern part of modern Estonia, was fully ceded in what peace treaty between Sweden, the Polish-Lithuanian Commonwealth, the Habsburgs and Brandenburg-Prussia?

Context articles: Uniformity policy
Wenden Voivodeship
Treaty of Oliva
Treaty of Schwedt
Estonia under Swedish rule
Swedish Livonia
Treaty of Tartu (Russian–Estonian)
Dorpat Voivodeship
Polish–Lithuanian royal election, 1704
Peace of Busza

The uniformity policy was the concept of implementing Swedish law to the dominions of Sweden during the latter's time as an empire.
 It is symbolized by the slogan unus rex, una lex et grex unus ("one king, one law, one people") possibly coined by Johan Skytte, governor-general in Swedish Estonia, Ingria and Livonia.
 However, the phrase is also found in the debates on the possible union of Scotland and England in 1607, when Sir Edwyn Sandys noted King James VI & I's view that for a perfect union there should be unus rex, unus grex, una lex.
 Most notably, the uniformity policy aimed at abolishing serfdom then common in Estonia, Livonia and the Swedish dominons in the Holy Roman Empire (Ingermanland naturally had a free peasantry).
 While implemented in Livonia against the will of the local Baltic German nobles, the Estonian and Pomeranian peasants remained serfs: Estonia had voluntarily submitted to Sweden and thus had been given leeway in keeping the traditional local law code, while Swedish Pomerania had retained its traditional law code when, on behalf of the then ruling Swedish high nobility, the Peace of Westphalia granted it to Sweden while remaining part of the Holy Roman Empire, and not in a formal cession which would have resulted in the implementation of Swedish law.
 Swedish law was thus only introduced to Swedish Pomerania after the dissolution of the Holy Roman Empire in 1806.
Wenden Voivodeship (Polish: "Województwo wendeńskie" ) was a unit of administrative division and local government in the Duchy of Livonia, part of the Polish-Lithuanian Commonwealth.
 It was formed in 1598 by King Zygmunt III Waza, out of Wenden Presidency (Province), which had been created in 1582 by King Stefan Batory, after the Truce of Jan Zapolski.
 The voivodeship remained in the Commonwealth until the Swedish Empire's conquest of the Livonia in the 1620s.
 The remainder of Polish Livonia was named Inflanty Voivodeship, and continued to be part of the Commonwealth until the first partition of Poland in 1772.
The Treaty or Peace of Oliva of 23 April (OS)/3 May (NS) 1660 (Polish: "Pokój Oliwski" , Swedish: "Freden i Oliva" , German: "Vertrag von Oliva" ) was one of the peace treaties ending the Second Northern War (1655-1660).
 At Oliva (Oliwa, Royal Prussia), peace was made between Sweden, the Polish-Lithuanian Commonwealth, the Habsburgs and Brandenburg-Prussia.
The Treaty of Schwedt was concluded on 6 October 1713, during the Great Northern War, between the Tsardom of Russia and Brandenburg-Prussia in Schwedt.
 Brandenburg-Prussia was promised southern Swedish Pomerania up to the Peene river, which had just been conquered by Russia.
 In turn, Brandenburg-Prussia accepted Russia's annexation of Swedish Ingria, Estonia and Karelia, and agreed to pay 400,000 thalers to Russia.
 Southern Swedish Pomerania was to be administered by Brandenburg-Prussia until a definite ruling in a peace treaty was reached.
Estonia under Swedish rule signifies the time between 1558 and 1710, when parts of present-day Estonia (and after 1645 all of the present-day country) were under Swedish rule.
 In the wake of the breakup of the State of the Teutonic Order, the Baltic German local aristocracy in the areas of Harrien (Harjumaa) and Wierland (Virumaa), as well as the city of Reval (Tallinn) in June 1561 (and somewhat later Jerwen (Järvamaa)) asked for and were granted protection by the Swedish king Eric XIV, leading to Swedish involvement in the Livonian War.
 At the conclusion of hostilities in 1583, Sweden was in control of the northern parts of modern Estonia and Hiiumaa island; this territory was created the Duchy of Estonia.
 Following renewed wars between Poland and Sweden, the southern parts of present-day Estonia (then Livonia) were incorporated into Sweden by the Treaty of Altmark in 1629.
 In 1645, Sweden also conquered the island of Ösel (Saaremaa) from Denmark, and were thus in control of all of present-day Estonia.
Swedish Livonia (Swedish: "Svenska Livland" ) was a dominion of the Swedish Empire from 1629 until 1721.
 The territory, which constituted the southern part of modern Estonia (including the island of Ösel ceded by Denmark after the Treaty of Brömsebro) and the northern part of modern Latvia (the Vidzeme region), represented the conquest of the major part of the Polish-Lithuanian Duchy of Livonia during the 1600–1629 Polish-Swedish War.
 Parts of Livonia and the city of Riga were under Swedish control as early as 1621 and the situation was formalized in Truce of Altmark 1629, but the whole territory was not ceded formally until the Treaty of Oliva in 1660.
 The minority part of the Wenden Voivodeship retained by the Polish–Lithuanian Commonwealth was renamed the Inflanty Voivodeship (""Livonian Principality""), which today corresponds to the Latgale region of Latvia.
Tartu Peace Treaty (Estonian: "Tartu rahu" , literally "Tartu peace") or Treaty of Tartu was a peace treaty between Estonia and Soviet Russia signed on February 2, 1920 ending the Estonian War of Independence.
 The terms of the treaty stated that ""Russia unreservedly recognises"" the independence of Republic of Estonia "de jure" and renounced in perpetuity all rights to the territory of Estonia.
 Ratifications of the treaty were exchanged in Moscow on March 30, 1920.
 It was registered in "League of Nations Treaty Series" on July 12, 1922.
The Dorpat Voivodeship (Polish: "Województwo dorpackie" or "województwo derpskie") was a unit of administrative division and local government in the Duchy of Livonia, part of the Polish-Lithuanian Commonwealth, from 1598 until the Swedish conquest of Livonia in the 1620s.
 The seat of the voivode was in the town of Dorpat (Tartu), while the regional assembly (sejmik) for the whole province of Livonia was located in Wenden.
 The area of the Dorpat Voivodeship was app.
 9,000 square kilometers, and it had two senators in the Senate of the Polish-Lithuanian Commonwealth.
In early 1700, King of Poland, Grand Duke of Lithuania and Elector of Saxony, Augustus II the Strong began the Great Northern War by attacking Swedish Livonia.
 Despite Russian support, Saxon army lost several battles, and soon afterwards, forces of the Swedish Empire controlled most of the Polish-Lithuanian Commonwealth.
 In June 1703, Augustus II convened the Extraordinary Sejm in Lublin, where he faced widespread criticism.
 His opponent were led by Primate of Poland, Michał Radziejowski, and sons of late King Jan III Sobieski, Jakub and Konstanty.
The Peace of Busza (Busha, Bose) also known as the Treaty of Jaruga was negotiated by Stanisław Żółkiewski of the Polish-Lithuanian Commonwealth and Iskender Pasha of the Ottoman Empire in Busza (Bose) near the Jaruga and Dniester rivers on 23 September 1617.
 Polish and Ottoman armies met, but decided to negotiate, instead of to fight.
 In this peace treaty Polish-Lithuanian Commonwealth agreed to cede the Khotyn to the Ottomans and to stop its interference in Moldavia.