The Aggregator

At the heart of every Covenant is the Aggregator. By liberating on-chain AMM aggregation, it allows any wallet, DAPP, DFO, DAO or customized smart contract to farm, inflate, multi-swap, arbitrage, craft liquidity, collateralize stablecoins and more across multiple AMMs at the same time.

On-Chain Aggregators vs Semi On-Chain Aggregators

The Aggregator is the first ever on-chain AMM aggregator.

All other aggregators—1inch, for example—operate semi on-chain. While excellent at finding the best prices for trades, they process all transactions via their off-chain frontends. Smart contracts cannot read frontends, so they can’t interact with these aggregators. Only human individual wallets and off-chain arbitration bots can, and only for basic token swaps.

The Covenant Aggregator is free from such limitations. It is equipped with AMM-standardizing Solidity APIs that smart contracts can read. This means that any wallet, dApp, DAO, DFO or customized smart contract can use it, and for much more than just token swaps: multi-AMM farming, on-chain arbitrage, token inflation, liquidity crafting, stablecoin collateralization and other functionalities are possible.

AMM-Standardizing APIs

All AMMs implement the same three basic functions—swap liquidity, add liquidity and remove liquidity—in different ways. Uniswap routes users to liquidity pools via hard-coded lists; Mooniswap connects users directly; Balancer allows for multi-token pools; and so on.

However, they all do this using the same standard logic. The Aggregator’s APIs interact with each AMM via the pathways of this logic, and this is how it can facilitate fully on-chain aggregation and the unprecedented possibilities instantiated by Covenant contracts.

The Covenants DFO, governed by $UniFi holders, is responsible for all listing.

API List

Swap (single / batch)

Swap (or, if supported, batch-swap erc1155 / Item-based or ERC20 Batch) assets

add/remove Liquidity (single / batch)

add/remove liquidity to a single pool (or, if supported, batch-add a variety of erc1155 / Item-based or ERC20 Batch assets to multiple pools)

Get info by liquidity pool

Read pool info and amounts

Get info by tokens

Read pair info and amounts of a single token (not available for Balancer)

Get liquidity pool balance and token balance by percentage

Get token balances by liquidity pool amount

Get balances by single token

Read how many liquidity pool tokens correspond to the amount of a single token

The Orchestrator

This is the Aggregator’s extendible knowledge base. It keeps track of all whitelisted AMMs and allows them to be upgraded / downgraded via a plugin system. There are multiple plugins for each AMM, each with its own version number, upgradable features and previous bug fixes.

Integrate Your dApp With the Aggregator

All Ethereum dApps can be integrated with the Aggregator, a fully decentralized protocol. And whenever $UniFi holders—via governance of the Covenants DFO—whitelist the Aggregator with a new AMM, integrated dApps can interact with it immediately and automatically.

Wrapped USD

One stablecoin to pool them all in all the pools of DeFi. $WUSD is minted at the confluence of other stablecoins, which stream out and collateralize it in the pools of AMMs everywhere. Free from any oracle or issuer, it is the most resilient and decentralized stablecoin out there—and the first you can farm.

The Basics

$WUSD is minted by collateralizing pairs of whitelisted stablecoins in the pools of whitelisted AMMs. By decentralizing the distribution of its collateral, and capable of rebalancing it for stability, $WUSD is not vulnerable to any single point of failure; it can only fail if the entire stablecoin industry collapses. The protocol is governed exclusively by $UniFi holders via the Covenants DFO, and cannot be censored or manipulated by any state, issuer or any other off-chain centralized intermediary.

$WUSD the most resilient stablecoin there is, and is unstoppable as Ethereum itself.

Minting & Burning

Anyone can mint and burn $WUSD anytime using the Covenants frontend (or by calling the smart contracts themselves).


$WUSD is minted by collateralizing stablecoins that have been whitelisted by the Covenants DFO across Aggregator-whitelisted AMM pools at a 1:1 ratio.


Mint 2x $WUSD by adding 1x Stablecoin A and 1x Stablecoin B


$WUSD collateral can be retrieved by burning $WUSD at the same ratio.


Burn 2x $WUSD and receive 1x Stablecoin A and 1x Stablecoin C


Certain events can destabilize the $WUSD : collateral supply equilibrium. The protocol can restore it using two secure rebalancing methods, and profits in the process.

Credit Rebalancing

The $WUSD protocol, by providing its stablecoin collateral to liquidity pools, earns additional stablecoins from trading fees. These are equal to an excess in the collateral supply relative to the $WUSD supply.

To restore equilibrium, the protocol, once a month, enables an operation that can be executed by anyone to mint enough $WUSD. This $WUSD is distributed as follows:

The rest is distributed as follows:

8% to the Covenants treasury, owned and ruled by $UniFi holders

60% to the FARM treasury, dedicated to rewarding $WUSD farming

20% to the $2XUSD treasury, reserved for Debit Rebalancing

10% to the $5XUSD treasury, also reserved for Debit Rebalancing

Debit Rebalancing

If one of the $WUSD protocol’s collateralized stablecoins fails and loses value, this will lead to a lower collateral supply relative to the $WUSD supply. If it falls ten or more units lower, this will trigger the $WUSD protocol to enable the burning of $WUSD to mint Multiplier Tokens until equilibrium is restored.

Here’s an example of how this would play out:

1. CZ rugs. The $BUSD protocol fails. $BUSD’s price tanks and it loses all value.

2. $UniFi holders vote to remove pools that contain it from the collateral whitelist, resulting in a collateral supply that is less than ten or more units of the $WUSD supply.

3. Triggered by the imbalance, the protocol initiates Debit Rebalancing. Holders are now able to burn $WUSD to mint Multiplier Tokens at a 1:1 ratio:

1x burnt $WUSD mints 1x $2XUSD

1x burnt $WUSD mints 1x $5XUSD.

4. The $WUSD supply decreases via this burning until supply equilibrium with the collateral is within ten units, at which point Multiplier Token minting is no longer possible.

Multiplier Tokens

To incentivize a rapid return to equilibrium during a Debit Rebalancing event, Multiplier Tokens can be burnt when one is not happening to receive more $WUSD than was burnt to mint them.

They entitle holders to the amount of $WUSD denoted by their respective tickers:

1x $2XUSD can be burnt to receive 2x $WUSD (1:2)

1x $5XUSD can be burnt to receive 5x $WUSD (1:5)

This $WUSD comes from the $2XUSD and $5XUSD dedicated treasuries, accumulated there via Credit Rebalancing. The $2XUSD treasury accumulates 10% faster than the $5XUSD one. This causes a relative scarcity of $WUSD in the $5XUSD treasury that will affect how $WUSD holders act during a Debit Rebalancing event; it may in fact be more prudent to mint $2XUSD.

Other $WUSD Security and Emergency Strategies

1. $WUSD pool collateral is locked in an external smart contract that cannot be unlocked by anyone—not even the Covenants DFO, preventing voter fraud by bad-faith actors.

2. In the event of a bug, exploit or generally problematic update, $UniFi holders can vote via the Covenants DFO to pause the smart contract. This prevents the minting or rebalancing of $WUSD. Holders can still redeem $WUSD for pooled collateral.

3. In such an event, $UniFi holders can also vote to revert the smart contract to an earlier version with established security. Again, holders can still redeem $WUSD for collateral.

4. $UniFi holders cannot change the X2 and X5 treasuries in any way, nor the rate at which they accumulate $WUSD. This prevents exploitative governance attacks on the DFO.

Farm $WUSD

$WUSD is the first ever farmable stablecoin.

It can be Free Farmed using Covenant farming contracts, and is rewarded exclusively in more $WUSD. This reward $WUSD comes from the otherwise locked FARM treasury, accumulated there via Credit Rebalancing.

“Once a month, the amount of $WUSD in the FARM treasury is recalculated via an operational contract (that can be executed by anyone for a reward). This entire amount is then distributed, over one month, on a block-to-block basis, to reward $WUSD farmers, all in accordance with standard free farming dynamics. After the month ends, the recalculation operation can be executed again; and the cycle repeats itself. This is elaborated on with more technical depth in Volume II of the Grimoire.”

Integrating dApps With the $WUSD Protocol

ddApps can be implemented with $WUSD auto- wrap/unwrap and other functionalities.

Covenant Farming

Ethereans love to farm. They do it all day and night—apes, penguins and wizards alike. But farming in DeFi is not always well-managed, and the hard-earned harvests of farmers are often at risk.

Covenant farming contracts allow us to farm safely and on our own terms. Anyone can host or participate in Free and Locked setups that pool tokens across multiple AMMs at once.

The Basics

Covenant farming contracts have multi-AMM functionality and are designed to be used by anyone for a wide variety of purposes.


Any DAO, DFO, individual wallet or customized smart contract can host a farming setup. You can even set it up to have no host at all. This flexible design makes it easy to set rules for distributing rewards (from a treasury or via minting) while preventing hosts from touching farmer tokens or manipulating rewards for positions, securing farmers from exploitation. Treasury

A core part of farming contracts is the treasury. It holds the reward tokens for all of the contract’s setups, and is programmed with the logic for how rewards will be distributed—i.e, via transfer or mint. Reward tokens must be sent to it before a setup can commence, securing farmers from any potential threats from poorly or maliciously coded custom extensions.


All setups reward farmers with one token. It is the centrepiece of the setup, around which the rest of the contract is customized. This simplifies managing the customizable extension for each setup’s reward method (Mint or Transfer) and makes it easy to calculate the total amount of the token being inflated via rewards; all anyone has to do is call the setup(s) using it as a reward and they will be provided with the relevant data.


Farming setups can be either Free or Locked.

All setups can be customized to automatically renew immediately after they end. However, this does not automatically renew old positions; new ones must be opened manually.

Free Farming


Block-based fixed periods. Farmers can stake / un-stake liquidity anytime.

Position Availability

Any amount of farmers can participate anytime in a free farming setup.



Provided by the host and locked in a treasury extension before the setup commences. This guarantees that farmers will receive their rewards securely and without having to trust that the host will send them.


Block-to-block among active farmers pro rata to the % of total liquidity each provides.


Rewards can be redeemed anytime with no penalty.


Hosts can alter the rewards per block anytime. This does not apply retroactively.

Locked Farming


Fixed block-based periods. Farmers can stake a position anytime after the period commences, but cannot unstake until it ends—at least not without incurring penalties (see below).

Position Availability

A position can be opened only if enough rewards are still available.



Provided by the host and locked a treasury extension before the setup commences.


Block-to-block from the treasury extension to farmers based on:

1. How much liquidity they stake.

2. How many blocks are left when the position is staked before the period ends.


Redeemable as they become available from the block-to-block distribution. Must be returned if a farmer chooses to unstake their position prematurely.


Can alter the rewards per block or even disable a setup anytime, but this does not affect previously opened positions whatsoever, only those opened afterwards.

Farming Extensions

Covenant farming contracts are extendible. Extensions set the parameters for both basic and more advanced functionalities.


This extension establishes a secure treasury for a setup’s reward token, and is programmed with the logic for how the token—i.e, via transfer or mint—will be distributed.


Hosts can alter the rewards distributed per block for active Free setups and disable both Free and Locked setups anytime. Such alterations are implemented with the next block, but do not apply retroactively; no previously earned rewards are affected, nor are Locked positions in any respect. Any rewards not yet issued or no longer required are automatically returned to the contract’s treasury.


Any dApp, DAO, DFO, individual wallet or customized smart contract can be a host. Setups can even have no host at all, in which case its rules are immutable.

Guidelines on how to code farming extensions based on your needs can be found in the the Grimoire Volume 2: Developer’s Documentation.

Integrating Your dApp or Website With Covenant Farming

Covenant farming contracts are designed for easy integration with external dApps. They greatly simplify reaching on-chain data for external websites and trackers.

Covenant Inflation

Covenant inflation contracts allow Ethereans to fund their magical projects in a fair and safe way. Anyone can set one up to inflate any variety of tokens at daily, weekly and monthly intervals via minting, swapping and transferring. Don’t depend on ICOs or worry about soliciting investors anymore.

The Basics

Fixed inflation contracts can be used to automate token supply inflation, treasury management and any other financial operation that needs to be executed in precise, block-based intervals. Contracts are customizable with one or more entries that define these operations and intervals.


All operations are fixed, and involve any combination of the following:

1. The minting of token(s)

2. The transferral of token(s) from address(es) to address(es)

3. The swapping of token(s) within or among AMMs


The minimum amount of block-based time that must pass between operation executions.


Contracts can reward manual execution of operations. Rewards are customizable as a % of all tokens involved in the operation. In the case of swap entries, the executor can choose to be rewarded with either the input token or the output token.


Like Covenant farming contracts, Covenant inflation contracts are designed to be hostable by any DAO, DFO or customized smart contract.

The hosting logic of a contract, embedded in an extension, defines the permissions for setting up and managing entries, operations and executor rewards, as well as managing inflation via transfer (if interacting with a treasury) or via mint.

Integrating Your dApp, Website or Tracker with Covenant Fixed Inflation

Covenant Fair Inflation contracts are designed for easy integration with external dApps.

Guidelines for this can be found in the Grimoire Volume 2: Developer’s Documentation

Hosting a Covenant Fixed Inflation Contract

Guidelines on how to code inflation extensions based on your needs can be found in the Grimoire Volume 2: Developer’s Documentation

Index Tokens

Covenant index tokens are Items. Anyone can mint them at the Covenant Bazar (or by calling the smart contracts themselves) by locking a fixed amount of set tokens as collateral, and anyone can burn them to unlock that collateral.

Index tokens can also be set up to feature standard metadata, like an icon and a description. Once minted, no one can alter an index token’s rules, and it will always be available to mint.

Integrate Your dApp or Website with Covenant Index Tokens

Covenant index tokens are designed for easy integration with external dApps.

The Covenants Decentralized Flexible Organization (DFO)

Covenants is a DFO, dedicated to researching, developing and governing a responsible Decentralized Finance protocol on Ethereum.

The Basics

Built on the DFOhub standard, Covenants operates entirely on-chain and is completely independent from centralized entities. It is ruled by its on-chain equity $UniFi. $UniFi holders have full ownership of the protocol. They govern all of its assets and every line of code.


The Covenants DFO earns from a few small fees. All are currently set to 0%, aside from the fee for $WUSD minting and burning. After DFOhub upgrades to v0.5, $UniFi holders will be able to increase and govern these fees using the subDAO system.

List of active Covenants Organization's fees

1. 8% of $WUSD Rebalance by Credit

List of (presently) inactive Covenants Organization's fees

1. 0.005% to 0.05% for unstaking farm positions

2. 0.005% to 0.05% Fixed Inflation operation execution

More fees will be introduced in the future as more functionalities are rolled out

Last updated