-
Convex Network Flows
Authors:
Theo Diamandis,
Guillermo Angeris,
Alan Edelman
Abstract:
We introduce a general framework for flow problems over hypergraphs. In our problem formulation, which we call the convex flow problem, we have a concave utility function for the net flow at every node and a concave utility function for each edge flow. The objective is to maximize the sum of these utilities, subject to constraints on the flows allowed at each edge, which we only assume to be a con…
▽ More
We introduce a general framework for flow problems over hypergraphs. In our problem formulation, which we call the convex flow problem, we have a concave utility function for the net flow at every node and a concave utility function for each edge flow. The objective is to maximize the sum of these utilities, subject to constraints on the flows allowed at each edge, which we only assume to be a convex set. This framework not only includes many classic problems in network optimization, such as max flow, min-cost flow, and multi-commodity flows, but also generalizes these problems to allow, for example, concave edge gain functions. In addition, our framework includes applications spanning a number of fields: optimal power flow over lossy networks, routing and resource allocation in ad-hoc wireless networks, Arrow-Debreu Nash bargaining, and order routing through financial exchanges, among others. We show that the convex flow problem has a dual with a number of interesting interpretations, and that this dual decomposes over the edges of the hypergraph. Using this decomposition, we propose a fast solution algorithm that parallelizes over the edges and admits a clean problem interface. We provide an open source implementation of this algorithm in the Julia programming language, which we show is significantly faster than the state-of-the-art commercial convex solver Mosek.
△ Less
Submitted 18 May, 2024; v1 submitted 31 March, 2024;
originally announced April 2024.
-
Multidimensional Blockchain Fees are (Essentially) Optimal
Authors:
Guillermo Angeris,
Theo Diamandis,
Ciamac Moallemi
Abstract:
In this paper we show that, using only mild assumptions, previously proposed multidimensional blockchain fee markets are essentially optimal, even against worst-case adversaries. In particular, we show that the average welfare gap between the following two scenarios is at most $O(1/\sqrt{T})$, where $T$ is the length of the time horizon considered. In the first scenario, the designer knows all fut…
▽ More
In this paper we show that, using only mild assumptions, previously proposed multidimensional blockchain fee markets are essentially optimal, even against worst-case adversaries. In particular, we show that the average welfare gap between the following two scenarios is at most $O(1/\sqrt{T})$, where $T$ is the length of the time horizon considered. In the first scenario, the designer knows all future actions by users and is allowed to fix the optimal prices of resources ahead of time, based on the designer's oracular knowledge of those actions. In the second, the prices are updated by a very simple algorithm that does not have this oracular knowledge, a special case of which is similar to EIP-1559, the base fee mechanism used by the Ethereum blockchain. Roughly speaking, this means that, on average, over a reasonable timescale, there is no difference in welfare between 'correctly' fixing the prices, with oracular knowledge of the future, when compared to the proposed algorithm. We show a matching lower bound of $Ω(1/\sqrt{T})$ for any implementable algorithm and also separately consider the case where the adversary is known to be stochastic.
△ Less
Submitted 18 May, 2024; v1 submitted 13 February, 2024;
originally announced February 2024.
-
The Specter (and Spectra) of Miner Extractable Value
Authors:
Guillermo Angeris,
Tarun Chitra,
Theo Diamandis,
Kshitij Kulkarni
Abstract:
Miner extractable value (MEV) refers to any excess value that a transaction validator can realize by manipulating the ordering of transactions. In this work, we introduce a simple theoretical definition of the 'cost of MEV', prove some basic properties, and show that the definition is useful via a number of examples. In a variety of settings, this definition is related to the 'smoothness' of a fun…
▽ More
Miner extractable value (MEV) refers to any excess value that a transaction validator can realize by manipulating the ordering of transactions. In this work, we introduce a simple theoretical definition of the 'cost of MEV', prove some basic properties, and show that the definition is useful via a number of examples. In a variety of settings, this definition is related to the 'smoothness' of a function over the symmetric group. From this definition and some basic observations, we recover a number of results from the literature.
△ Less
Submitted 12 October, 2023; v1 submitted 11 October, 2023;
originally announced October 2023.
-
The Geometry of Constant Function Market Makers
Authors:
Guillermo Angeris,
Tarun Chitra,
Theo Diamandis,
Alex Evans,
Kshitij Kulkarni
Abstract:
Constant function market makers (CFMMs) are the most popular type of decentralized trading venue for cryptocurrency tokens. In this paper, we give a very general geometric framework (or 'axioms') which encompass and generalize many of the known results for CFMMs in the literature, without requiring strong conditions such as differentiability or homogeneity. One particular consequence of this frame…
▽ More
Constant function market makers (CFMMs) are the most popular type of decentralized trading venue for cryptocurrency tokens. In this paper, we give a very general geometric framework (or 'axioms') which encompass and generalize many of the known results for CFMMs in the literature, without requiring strong conditions such as differentiability or homogeneity. One particular consequence of this framework is that every CFMM has a (unique) canonical trading function that is nondecreasing, concave, and homogeneous, showing that many results known only for homogeneous trading functions are actually fully general. We also show that CFMMs satisfy a number of intuitive and geometric composition rules, and give a new proof, via conic duality, of the equivalence of the portfolio value function and the trading function. Many results are extended to the general setting where the CFMM is not assumed to be path-independent, but only one trade is allowed. Finally, we show that all 'path-independent' CFMMs have a simple geometric description that does not depend on any notion of a 'trading history'.
△ Less
Submitted 15 August, 2023;
originally announced August 2023.
-
A Note on the Welfare Gap in Fair Ordering
Authors:
Theo Diamandis,
Guillermo Angeris
Abstract:
Public blockchains group submitted transactions into batches, called blocks. A natural question is how to determine which transactions are included in these batches. In this note, we show a gap between the welfare of so-called `fair' ordering, namely first-in-first-out (an ideal that a number of blockchain protocols strive to achieve), where the first transactions to arrive are the ones put into t…
▽ More
Public blockchains group submitted transactions into batches, called blocks. A natural question is how to determine which transactions are included in these batches. In this note, we show a gap between the welfare of so-called `fair' ordering, namely first-in-first-out (an ideal that a number of blockchain protocols strive to achieve), where the first transactions to arrive are the ones put into the block, and the welfare of `optimal' inclusion that is, at least approximately, welfare-maximizing, such as choosing which transactions are included in a block via an auction. We show this gap is positive under a simple model with mild assumptions where we assume transactions are, roughly speaking, uniformly drawn from a reasonable distribution. Our results formalize a performance metric for blockchain inclusion rules and consequently provide a framework to help design and compare these rules. The results can be directly extended to ordering mechanisms as well.
△ Less
Submitted 14 September, 2023; v1 submitted 27 March, 2023;
originally announced March 2023.
-
An Efficient Algorithm for Optimal Routing Through Constant Function Market Makers
Authors:
Theo Diamandis,
Max Resnick,
Tarun Chitra,
Guillermo Angeris
Abstract:
Constant function market makers (CFMMs) such as Uniswap have facilitated trillions of dollars of digital asset trades and have billions of dollars of liquidity. One natural question is how to optimally route trades across a network of CFMMs in order to ensure the largest possible utility (as specified by a user). We present an efficient algorithm, based on a decomposition method, to solve the prob…
▽ More
Constant function market makers (CFMMs) such as Uniswap have facilitated trillions of dollars of digital asset trades and have billions of dollars of liquidity. One natural question is how to optimally route trades across a network of CFMMs in order to ensure the largest possible utility (as specified by a user). We present an efficient algorithm, based on a decomposition method, to solve the problem of optimally executing an order across a network of decentralized exchanges. The decomposition method, as a side effect, makes it simple to incorporate more complicated CFMMs, or even include 'aggregate CFMMs' (such as Uniswap v3), into the routing problem. Numerical results show significant performance improvements of this method, tested on realistic networks of CFMMs, when compared against an off-the-shelf commercial solver.
△ Less
Submitted 9 February, 2023;
originally announced February 2023.
-
Concave Pro-rata Games
Authors:
Nicholas A. G Johnson,
Theo Diamandis,
Alex Evans,
Henry de Valence,
Guillermo Angeris
Abstract:
In this paper, we introduce a family of games called concave pro-rata games. In such a game, players place their assets into a pool, and the pool pays out some concave function of all assets placed into it. Each player then receives a pro-rata share of the payout; i.e., each player receives an amount proportional to how much they placed in the pool. Such games appear in a number of practical scena…
▽ More
In this paper, we introduce a family of games called concave pro-rata games. In such a game, players place their assets into a pool, and the pool pays out some concave function of all assets placed into it. Each player then receives a pro-rata share of the payout; i.e., each player receives an amount proportional to how much they placed in the pool. Such games appear in a number of practical scenarios, including as a simplified version of batched decentralized exchanges, such as those proposed by Penumbra. We show that this game has a number of interesting properties, including a symmetric pure equilibrium that is the unique equilibrium of this game, and we prove that its price of anarchy is $Ω(n)$ in the number of players. We also show some numerical results in the iterated setting which suggest that players quickly converge to an equilibrium in iterated play.
△ Less
Submitted 4 February, 2023;
originally announced February 2023.
-
A primer on perpetuals
Authors:
Guillermo Angeris,
Tarun Chitra,
Alex Evans,
Matthew Lorig
Abstract:
We consider a continuous-time financial market with no arbitrage and no transactions costs. In this setting, we introduce two types of perpetual contracts, one in which the payoff to the long side is a fixed function of the underlyers and the long side pays a funding rate to the short side, the other in which the payoff to the long side is a fixed function of the underlyers times a discount factor…
▽ More
We consider a continuous-time financial market with no arbitrage and no transactions costs. In this setting, we introduce two types of perpetual contracts, one in which the payoff to the long side is a fixed function of the underlyers and the long side pays a funding rate to the short side, the other in which the payoff to the long side is a fixed function of the underlyers times a discount factor that changes over time but no funding payments are required. Assuming asset prices are continuous and strictly positive, we derive model-free expressions for the funding rate and discount rate of these perpetual contracts as well as replication strategies for the short side. When asset prices can jump, we derive expressions for the funding and discount rates, which are semi-robust in the sense that they do not depend on the dynamics of the volatility process of the underlying risky assets, but do depend on the intensity of jumps under the market's pricing measure. When asset prices can jump and the volatility process is independent of the underlying risky assets, we derive an explicit replication strategy for the short side of a perpetual contract. Throughout the paper, we illustrate through examples how specific perpetual contracts relate to traditional financial instruments such as variance swaps and leveraged exchange traded funds.
△ Less
Submitted 7 September, 2022;
originally announced September 2022.
-
Dynamic Pricing for Non-fungible Resources: Designing Multidimensional Blockchain Fee Markets
Authors:
Theo Diamandis,
Alex Evans,
Tarun Chitra,
Guillermo Angeris
Abstract:
Public blockchains implement a fee mechanism to allocate scarce computational resources across competing transactions. Most existing fee market designs utilize a joint, fungible unit of account (e.g., gas in Ethereum) to price otherwise non-fungible resources such as bandwidth, computation, and storage, by hardcoding their relative prices. Fixing the relative price of each resource in this way inh…
▽ More
Public blockchains implement a fee mechanism to allocate scarce computational resources across competing transactions. Most existing fee market designs utilize a joint, fungible unit of account (e.g., gas in Ethereum) to price otherwise non-fungible resources such as bandwidth, computation, and storage, by hardcoding their relative prices. Fixing the relative price of each resource in this way inhibits granular price discovery, limiting scalability and opening up the possibility of denial-of-service attacks. As a result, many prominent networks such as Ethereum and Solana have proposed multi-dimensional fee markets. In this paper, we provide a principled way to design fee markets that efficiently price multiple non-fungible resources. Starting from a loss function specified by the network designer, we show how to compute dynamic prices that align the network's incentives (to minimize the loss) with those of the users and miners (to maximize their welfare), even as demand for these resources changes. Our pricing mechanism follows from a natural decomposition of the network designer's problem into two parts that are related to each other via the resource prices. These results can be used to efficiently set fees in order to improve network performance.
△ Less
Submitted 3 November, 2022; v1 submitted 16 August, 2022;
originally announced August 2022.
-
A Note on Generalizing Power Bounds for Physical Design
Authors:
Guillermo Angeris
Abstract:
In this note we show how to construct a number of nonconvex quadratic inequalities for a variety of physics equations appearing in physical design problems. These nonconvex quadratic inequalities can then be used to construct bounds on physical design problems where the objective is a quadratic or a ratio of quadratics. We show that the quadratic inequalities and the original physics equations are…
▽ More
In this note we show how to construct a number of nonconvex quadratic inequalities for a variety of physics equations appearing in physical design problems. These nonconvex quadratic inequalities can then be used to construct bounds on physical design problems where the objective is a quadratic or a ratio of quadratics. We show that the quadratic inequalities and the original physics equations are equivalent under a technical condition that holds in many practical cases which is easy to computationally (and, in some cases, manually) verify.
△ Less
Submitted 8 August, 2022;
originally announced August 2022.
-
Bounds on Efficiency Metrics in Photonics
Authors:
Guillermo Angeris,
Theo Diamandis,
Jelena Vučković,
Stephen Boyd
Abstract:
In this paper, we present a method for computing bounds for a variety of efficiency metrics in photonics, such as the focusing efficiency or the mode purity. We focus on the special case where the objective function can be written as the ratio of two quadratic functions of the field and show that there exists a simple semidefinite programming relaxation for this problem. We provide a numerical exa…
▽ More
In this paper, we present a method for computing bounds for a variety of efficiency metrics in photonics, such as the focusing efficiency or the mode purity. We focus on the special case where the objective function can be written as the ratio of two quadratic functions of the field and show that there exists a simple semidefinite programming relaxation for this problem. We provide a numerical example of bounding the maximal mode conversion purity for a device of given size. This paper is accompanied by an open source Julia package for basic simulations and bounds.
△ Less
Submitted 28 June, 2023; v1 submitted 11 April, 2022;
originally announced April 2022.
-
Optimal Routing for Constant Function Market Makers
Authors:
Guillermo Angeris,
Tarun Chitra,
Alex Evans,
Stephen Boyd
Abstract:
We consider the problem of optimally executing an order involving multiple crypto-assets, sometimes called tokens, on a network of multiple constant function market makers (CFMMs). When we ignore the fixed cost associated with executing an order on a CFMM, this optimal routing problem can be cast as a convex optimization problem, which is computationally tractable. When we include the fixed costs,…
▽ More
We consider the problem of optimally executing an order involving multiple crypto-assets, sometimes called tokens, on a network of multiple constant function market makers (CFMMs). When we ignore the fixed cost associated with executing an order on a CFMM, this optimal routing problem can be cast as a convex optimization problem, which is computationally tractable. When we include the fixed costs, the optimal routing problem is a mixed-integer convex problem, which can be solved using (sometimes slow) global optimization methods, or approximately solved using various heuristics based on convex optimization. The optimal routing problem includes as a special case the problem of identifying an arbitrage present in a network of CFMMs, or certifying that none exists.
△ Less
Submitted 11 April, 2022;
originally announced April 2022.
-
Replicating Monotonic Payoffs Without Oracles
Authors:
Guillermo Angeris,
Alex Evans,
Tarun Chitra
Abstract:
In this paper, we show that any monotonic payoff can be replicated using only liquidity provider shares in constant function market makers (CFMMs), without the need for additional collateral or oracles. Such payoffs include cash-or-nothing calls and capped calls, among many others, and we give an explicit method for finding a trading function matching these payoffs. For example, this method provid…
▽ More
In this paper, we show that any monotonic payoff can be replicated using only liquidity provider shares in constant function market makers (CFMMs), without the need for additional collateral or oracles. Such payoffs include cash-or-nothing calls and capped calls, among many others, and we give an explicit method for finding a trading function matching these payoffs. For example, this method provides an easy way to show that the trading function for maintaining a portfolio where 50% of the portfolio is allocated in one asset and 50% in the other is exactly the constant product market maker (e.g., Uniswap) from first principles. We additionally provide a simple formula for the total earnings of an arbitrageur who is arbitraging against these CFMMs.
△ Less
Submitted 26 November, 2021;
originally announced November 2021.
-
Constant Function Market Makers: Multi-Asset Trades via Convex Optimization
Authors:
Guillermo Angeris,
Akshay Agrawal,
Alex Evans,
Tarun Chitra,
Stephen Boyd
Abstract:
The rise of Ethereum and other blockchains that support smart contracts has led to the creation of decentralized exchanges (DEXs), such as Uniswap, Balancer, Curve, mStable, and SushiSwap, which enable agents to trade cryptocurrencies without trusting a centralized authority. While traditional exchanges use order books to match and execute trades, DEXs are typically organized as constant function…
▽ More
The rise of Ethereum and other blockchains that support smart contracts has led to the creation of decentralized exchanges (DEXs), such as Uniswap, Balancer, Curve, mStable, and SushiSwap, which enable agents to trade cryptocurrencies without trusting a centralized authority. While traditional exchanges use order books to match and execute trades, DEXs are typically organized as constant function market makers (CFMMs). CFMMs accept and reject proposed trades based on the evaluation of a function that depends on the proposed trade and the current reserves of the DEX. For trades that involve only two assets, CFMMs are easy to understand, via two functions that give the quantity of one asset that must be tendered to receive a given quantity of the other, and vice versa. When more than two assets are being exchanged, it is harder to understand the landscape of possible trades. We observe that various problems of choosing a multi-asset trade can be formulated as convex optimization problems, and can therefore be reliably and efficiently solved.
△ Less
Submitted 26 July, 2021;
originally announced July 2021.
-
Reciprocal Multi-Robot Collision Avoidance with Asymmetric State Uncertainty
Authors:
Kunal Shah,
Guillermo Angeris,
Mac Schwager
Abstract:
We present a general decentralized formulation for a large class of collision avoidance methods and show that all collision avoidance methods of this form are guaranteed to be collision free. This class includes several existing algorithms in the literature as special cases. We then present a particular instance of this collision avoidance method, CARP (Collision Avoidance by Reciprocal Projection…
▽ More
We present a general decentralized formulation for a large class of collision avoidance methods and show that all collision avoidance methods of this form are guaranteed to be collision free. This class includes several existing algorithms in the literature as special cases. We then present a particular instance of this collision avoidance method, CARP (Collision Avoidance by Reciprocal Projections), that is effective even when the estimates of other agents' positions and velocities are noisy. The method's main computational step involves the solution of a small convex optimization problem, which can be quickly solved in practice, even on embedded platforms, making it practical to use on computationally-constrained robots such as quadrotors. This method can be extended to find smooth polynomial trajectories for higher dynamic systems such at quadrotors. We demonstrate this algorithm's performance in simulations and on a team of physical quadrotors. Our method finds optimal projections in a median time of 17.12ms for 285 instances of 100 randomly generated obstacles, and produces safe polynomial trajectories at over 60hz on-board quadrotors. Our paper is accompanied by an open source Julia implementation and ROS package.
△ Less
Submitted 22 July, 2021;
originally announced July 2021.
-
Optimal Fees for Geometric Mean Market Makers
Authors:
Alex Evans,
Guillermo Angeris,
Tarun Chitra
Abstract:
Constant Function Market Makers (CFMMs) are a family of automated market makers that enable censorship-resistant decentralized exchange on public blockchains. Arbitrage trades have been shown to align the prices reported by CFMMs with those of external markets. These trades impose costs on Liquidity Providers (LPs) who supply reserves to CFMMs. Trading fees have been proposed as a mechanism for co…
▽ More
Constant Function Market Makers (CFMMs) are a family of automated market makers that enable censorship-resistant decentralized exchange on public blockchains. Arbitrage trades have been shown to align the prices reported by CFMMs with those of external markets. These trades impose costs on Liquidity Providers (LPs) who supply reserves to CFMMs. Trading fees have been proposed as a mechanism for compensating LPs for arbitrage losses. However, large fees reduce the accuracy of the prices reported by CFMMs and can cause reserves to deviate from desirable asset compositions. CFMM designers are therefore faced with the problem of how to optimally select fees to attract liquidity. We develop a framework for determining the value to LPs of supplying liquidity to a CFMM with fees when the underlying process follows a general diffusion. Focusing on a popular class of CFMMs which we call Geometric Mean Market Makers (G3Ms), our approach also allows one to select optimal fees for maximizing LP value. We illustrate our methodology by showing that an LP with mean-variance utility will prefer a G3M over all alternative trading strategies as fees approach zero.
△ Less
Submitted 1 April, 2021;
originally announced April 2021.
-
Replicating Market Makers
Authors:
Guillermo Angeris,
Alex Evans,
Tarun Chitra
Abstract:
We present a method for constructing Constant Function Market Makers (CFMMs) whose portfolio value functions match a desired payoff. More specifically, we show that the space of concave, nonnegative, nondecreasing, 1-homogeneous payoff functions and the space of convex CFMMs are equivalent; in other words, every CFMM has a concave, nonnegative, nondecreasing, 1-homogeneous payoff function, and eve…
▽ More
We present a method for constructing Constant Function Market Makers (CFMMs) whose portfolio value functions match a desired payoff. More specifically, we show that the space of concave, nonnegative, nondecreasing, 1-homogeneous payoff functions and the space of convex CFMMs are equivalent; in other words, every CFMM has a concave, nonnegative, nondecreasing, 1-homogeneous payoff function, and every payoff function with these properties has a corresponding convex CFMM. We demonstrate a simple method for recovering a CFMM trading function that produces this desired payoff. This method uses only basic tools from convex analysis and is intimately related to Fenchel conjugacy. We demonstrate our result by constructing trading functions corresponding to basic payoffs, as well as standard financial derivatives such as options and swaps.
△ Less
Submitted 26 March, 2021;
originally announced March 2021.
-
A Note on Privacy in Constant Function Market Makers
Authors:
Guillermo Angeris,
Alex Evans,
Tarun Chitra
Abstract:
Constant function market makers (CFMMs) such as Uniswap, Balancer, Curve, and mStable, among many others, make up some of the largest decentralized exchanges on Ethereum and other blockchains. Because all transactions are public in current implementations, a natural next question is if there exist similar decentralized exchanges which are privacy-preserving; i.e., if a transaction's quantities are…
▽ More
Constant function market makers (CFMMs) such as Uniswap, Balancer, Curve, and mStable, among many others, make up some of the largest decentralized exchanges on Ethereum and other blockchains. Because all transactions are public in current implementations, a natural next question is if there exist similar decentralized exchanges which are privacy-preserving; i.e., if a transaction's quantities are hidden from the public view, then an adversary cannot correctly reconstruct the traded quantities from other public information. In this note, we show that privacy is impossible with the usual implementations of CFMMs under most reasonable models of an adversary and provide some mitigating strategies.
△ Less
Submitted 1 March, 2021;
originally announced March 2021.
-
When does the tail wag the dog? Curvature and market making
Authors:
Guillermo Angeris,
Alex Evans,
Tarun Chitra
Abstract:
Liquidity and trading activity on constant function market makers (CFMMs) such as Uniswap, Curve, and Balancer has grown significantly in the second half of 2020. Much of the growth of these protocols has been driven by incentivized pools or 'yield farming', which reward participants in crypto assets for providing liquidity to CFMMs. As a result, CFMMs and associated protocols, which were historic…
▽ More
Liquidity and trading activity on constant function market makers (CFMMs) such as Uniswap, Curve, and Balancer has grown significantly in the second half of 2020. Much of the growth of these protocols has been driven by incentivized pools or 'yield farming', which reward participants in crypto assets for providing liquidity to CFMMs. As a result, CFMMs and associated protocols, which were historically very small markets, now constitute the most liquid trading venues for a large number of crypto assets. But what does it mean for a CFMM to be the most liquid market? In this paper, we propose a basic definition of price sensitivity and liquidity. We show that this definition is tightly related to the curvature of a CFMM's trading function and can be used to explain a number of heuristic results. For example, we show that low-curvature markets are good for coins whose market value is approximately fixed and that high-curvature markets are better for liquidity providers when traders have an informational edge. Additionally, the results can also be used to model interacting markets and explain the rise of incentivized liquidity provision, also known as 'yield farming.'
△ Less
Submitted 14 December, 2020;
originally announced December 2020.
-
Heuristic Methods and Performance Bounds for Photonic Design
Authors:
Guillermo Angeris,
Jelena Vučković,
Stephen Boyd
Abstract:
In the photonic design problem, a scientist or engineer chooses the physical parameters of a device to best match some desired device behavior. Many instances of the photonic design problem can be naturally stated as a mathematical optimization problem that is computationally difficult to solve globally. Because of this, several heuristic methods have been developed to approximately solve such pro…
▽ More
In the photonic design problem, a scientist or engineer chooses the physical parameters of a device to best match some desired device behavior. Many instances of the photonic design problem can be naturally stated as a mathematical optimization problem that is computationally difficult to solve globally. Because of this, several heuristic methods have been developed to approximately solve such problems. These methods often produce very good designs, and, in many practical applications, easily outperform 'traditional' designs that rely on human intuition. Yet, because these heuristic methods do not guarantee that the approximate solution found is globally optimal, the question remains of just how much better a designer might hope to do. This question is addressed by performance bounds or impossibility results, which determine a performance level that no design can achieve. We focus on algorithmic performance bounds, which involve substantial computation to determine. We illustrate a variety of both heuristic methods and performance bounds on two examples. In these examples (and many others not reported here) the performance bounds show that the heuristic designs are nearly optimal, and can considered globally optimal in practice. This review serves to clearly set up the photonic design problem and unify existing approaches for calculating performance bounds, while also providing some natural generalizations and properties.
△ Less
Submitted 11 January, 2021; v1 submitted 12 November, 2020;
originally announced November 2020.
-
Optimal Representative Sample Weighting
Authors:
Shane Barratt,
Guillermo Angeris,
Stephen Boyd
Abstract:
We consider the problem of assigning weights to a set of samples or data records, with the goal of achieving a representative weighting, which happens when certain sample averages of the data are close to prescribed values. We frame the problem of finding representative sample weights as an optimization problem, which in many cases is convex and can be efficiently solved. Our formulation includes…
▽ More
We consider the problem of assigning weights to a set of samples or data records, with the goal of achieving a representative weighting, which happens when certain sample averages of the data are close to prescribed values. We frame the problem of finding representative sample weights as an optimization problem, which in many cases is convex and can be efficiently solved. Our formulation includes as a special case the selection of a fixed number of the samples, with equal weights, i.e., the problem of selecting a smaller representative subset of the samples. While this problem is combinatorial and not convex, heuristic methods based on convex optimization seem to perform very well. We describe rsw, an open-source implementation of the ideas described in this paper, and apply it to a skewed sample of the CDC BRFSS dataset.
△ Less
Submitted 18 May, 2020;
originally announced May 2020.
-
Improved Price Oracles: Constant Function Market Makers
Authors:
Guillermo Angeris,
Tarun Chitra
Abstract:
Automated market makers, first popularized by Hanson's logarithmic market scoring rule (or LMSR) for prediction markets, have become important building blocks, called 'primitives,' for decentralized finance. A particularly useful primitive is the ability to measure the price of an asset, a problem often known as the pricing oracle problem. In this paper, we focus on the analysis of a very large cl…
▽ More
Automated market makers, first popularized by Hanson's logarithmic market scoring rule (or LMSR) for prediction markets, have become important building blocks, called 'primitives,' for decentralized finance. A particularly useful primitive is the ability to measure the price of an asset, a problem often known as the pricing oracle problem. In this paper, we focus on the analysis of a very large class of automated market makers, called constant function market makers (or CFMMs) which includes existing popular market makers such as Uniswap, Balancer, and Curve, whose yearly transaction volume totals to billions of dollars. We give sufficient conditions such that, under fairly general assumptions, agents who interact with these constant function market makers are incentivized to correctly report the price of an asset and that they can do so in a computationally efficient way. We also derive several other useful properties that were previously not known. These include lower bounds on the total value of assets held by CFMMs and lower bounds guaranteeing that no agent can, by any set of trades, drain the reserves of assets held by a given CFMM.
△ Less
Submitted 26 June, 2020; v1 submitted 22 March, 2020;
originally announced March 2020.
-
Fundamental bounds for scattering from absorptionless electromagnetic structures
Authors:
Rahul Trivedi,
Guillermo Angeris,
Logan Su,
Stephen Boyd,
Shanhui Fan,
Jelena Vuckovic
Abstract:
The ability to design the scattering properties of electromagnetic structures is of fundamental interest in optical science and engineering. While there has been great practical success applying local optimization methods to electromagnetic device design, it is unclear whether the performance of resulting designs is close to that of the best possible design. This question remains unsettled for abs…
▽ More
The ability to design the scattering properties of electromagnetic structures is of fundamental interest in optical science and engineering. While there has been great practical success applying local optimization methods to electromagnetic device design, it is unclear whether the performance of resulting designs is close to that of the best possible design. This question remains unsettled for absorptionless electromagnetic devices since the absence of material loss makes it difficult to provide provable bounds on their scattering properties. We resolve this problem by providing non-trivial lower bounds on performance metrics that are convex functions of the scattered fields. Our bounding procedure relies on accounting for a constraint on the electric fields inside the device, which can be provably constructed for devices with small footprints or low dielectric constrast. We illustrate our bounding procedure by studying limits on the scattering cross-sections of dielectric and metallic particles in the absence of material losses.
△ Less
Submitted 29 February, 2020;
originally announced March 2020.
-
A New Heuristic for Physical Design
Authors:
Guillermo Angeris,
Jelena Vučković,
Stephen Boyd
Abstract:
In a physical design problem, the designer chooses values of some physical parameters, within limits, to optimize the resulting field. We focus on the specific case in which each physical design parameter is the ratio of two field variables. This form occurs for photonic design with real scalar fields, diffusion-type systems, and others. We show that such problems can be reduced to a convex optimi…
▽ More
In a physical design problem, the designer chooses values of some physical parameters, within limits, to optimize the resulting field. We focus on the specific case in which each physical design parameter is the ratio of two field variables. This form occurs for photonic design with real scalar fields, diffusion-type systems, and others. We show that such problems can be reduced to a convex optimization problem, and therefore efficiently solved globally, given the sign of an optimal field at every point. This observation suggests a heuristic, in which the signs of the field are iteratively updated. This heuristic appears to have good practical performance on diffusion-type problems (including thermal design and resistive circuit design) and some control problems, while exhibiting moderate performance on photonic design problems. We also show in many practical cases there exist globally optimal designs whose design parameters are maximized or minimized at each point in the domain, i.e., that there is a discrete globally optimal structure.
△ Less
Submitted 13 February, 2020;
originally announced February 2020.
-
Automatic Repair of Convex Optimization Problems
Authors:
Shane Barratt,
Guillermo Angeris,
Stephen Boyd
Abstract:
Given an infeasible, unbounded, or pathological convex optimization problem, a natural question to ask is: what is the smallest change we can make to the problem's parameters such that the problem becomes solvable? In this paper, we address this question by posing it as an optimization problem involving the minimization of a convex regularization function of the parameters, subject to the constrai…
▽ More
Given an infeasible, unbounded, or pathological convex optimization problem, a natural question to ask is: what is the smallest change we can make to the problem's parameters such that the problem becomes solvable? In this paper, we address this question by posing it as an optimization problem involving the minimization of a convex regularization function of the parameters, subject to the constraint that the parameters result in a solvable problem. We propose a heuristic for approximately solving this problem that is based on the penalty method and leverages recently developed methods that can efficiently evaluate the derivative of the solution of a convex cone program with respect to its parameters. We illustrate our method by applying it to examples in optimal control and economics.
△ Less
Submitted 29 January, 2020;
originally announced January 2020.
-
An analysis of Uniswap markets
Authors:
Guillermo Angeris,
Hsien-Tang Kao,
Rei Chiang,
Charlie Noyes,
Tarun Chitra
Abstract:
Uniswap -- and other constant product markets -- appear to work well in practice despite their simplicity. In this paper, we give a simple formal analysis of constant product markets and their generalizations, showing that, under some common conditions, these markets must closely track the reference market price. We also show that Uniswap satisfies many other desirable properties and numerically d…
▽ More
Uniswap -- and other constant product markets -- appear to work well in practice despite their simplicity. In this paper, we give a simple formal analysis of constant product markets and their generalizations, showing that, under some common conditions, these markets must closely track the reference market price. We also show that Uniswap satisfies many other desirable properties and numerically demonstrate, via a large-scale agent-based simulation, that Uniswap is stable under a wide range of market conditions.
△ Less
Submitted 9 February, 2021; v1 submitted 8 November, 2019;
originally announced November 2019.
-
Minimizing a Sum of Clipped Convex Functions
Authors:
Shane Barratt,
Guillermo Angeris,
Stephen Boyd
Abstract:
We consider the problem of minimizing a sum of clipped convex functions; applications include clipped empirical risk minimization and clipped control. While the problem of minimizing the sum of clipped convex functions is NP-hard, we present some heuristics for approximately solving instances of these problems. These heuristics can be used to find good, if not global, solutions and appear to work…
▽ More
We consider the problem of minimizing a sum of clipped convex functions; applications include clipped empirical risk minimization and clipped control. While the problem of minimizing the sum of clipped convex functions is NP-hard, we present some heuristics for approximately solving instances of these problems. These heuristics can be used to find good, if not global, solutions and appear to work well in practice. We also describe an alternative formulation, based on the perspective transformation, which makes the problem amenable to mixed-integer convex programming and yields computationally tractable lower bounds. We illustrate one of our heuristic methods by applying it to various examples and use the perspective transformation to certify that the solutions are relatively close to the global optimum. This paper is accompanied by an open-source implementation.
△ Less
Submitted 29 October, 2019; v1 submitted 27 October, 2019;
originally announced October 2019.
-
Fast Reciprocal Collision Avoidance Under Measurement Uncertainty
Authors:
Guillermo Angeris,
Kunal Shah,
Mac Schwager
Abstract:
We present a fully distributed collision avoidance algorithm based on convex optimization for a team of mobile robots. This method addresses the practical case in which agents sense each other via measurements from noisy on-board sensors with no inter-agent communication. Under some mild conditions, we provide guarantees on mutual collision avoidance for a broad class of policies including the one…
▽ More
We present a fully distributed collision avoidance algorithm based on convex optimization for a team of mobile robots. This method addresses the practical case in which agents sense each other via measurements from noisy on-board sensors with no inter-agent communication. Under some mild conditions, we provide guarantees on mutual collision avoidance for a broad class of policies including the one presented. Additionally, we provide numerical examples of computational performance and show that, in both 2D and 3D simulations, all agents avoid each other and reach their desired goals in spite of their uncertainty about the locations of other agents.
△ Less
Submitted 31 May, 2019; v1 submitted 30 May, 2019;
originally announced May 2019.
-
Computational Bounds For Photonic Design
Authors:
Guillermo Angeris,
Jelena Vuckovic,
Stephen Boyd
Abstract:
Physical design problems, such as photonic inverse design, are typically solved using local optimization methods. These methods often produce what appear to be good or very good designs when compared to classical design methods, but it is not known how far from optimal such designs really are. We address this issue by develo** methods for computing a bound on the true optimal value of a physical…
▽ More
Physical design problems, such as photonic inverse design, are typically solved using local optimization methods. These methods often produce what appear to be good or very good designs when compared to classical design methods, but it is not known how far from optimal such designs really are. We address this issue by develo** methods for computing a bound on the true optimal value of a physical design problem; physical designs with objective smaller than our bound are impossible to achieve. Our bound is based on Lagrange duality and exploits the special mathematical structure of these physical design problems. For a multi-mode 2D Helmholtz resonator, numerical examples show that the bounds we compute are often close to the objective values obtained using local optimization methods, which reveals that the designs are not only good, but in fact nearly optimal. Our computational bounding method also produces, as a by-product, a reasonable starting point for local optimization methods.
△ Less
Submitted 1 June, 2019; v1 submitted 30 November, 2018;
originally announced November 2018.