Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OUSD harvest #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Need a bot? Or looking for MEV? You've come to the right place partner 🤠
| Maker wstETH liquidations | Liquidations | Reocurring | Liquidate bad wstETH debt positions on Maker to earn liquidation bonus | [Link](/specs/maker-wsteth-liquidations.md)
| Vesper VUSD Arbitrage | Arbitrage | Reocurring | Arbitrage between the VUSD and USDC/DAI | [Link](/specs/vusd-arbitrage.md)
| Liquity | Liquidations | Reocurring | Liquidate undercollateralized Troves to earn liquidation bonus | [Link](/specs/liquity-liquidations.md) |
| OUSD | Harvest | Reocurring | Harvest and sell reward tokens. 1% of proceeds to caller. | [Link](/specs/ousd-harvest.md) |

### Want to list your protocol's opportunity?

Expand Down
56 changes: 56 additions & 0 deletions specs/ousd-harvest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
## OUSD Reward Token Harvesting

### Description

The OUSD Harvester contract collects reward tokens earned by the OUSD strategies, sells them, and sends them on to increase protocol yield. Anyone can call the harvest and earn 1% of the resulting USDT for doing so. Chainlink oracles are used to ensure the sale prices are within limits.

### Difficulty

moderate

### Recurring

This opportunity occurs whenever the USDT to be gained from the harvest is greater than the gas cost to execute the transaction.

### Steps to capture MEV

1. Pick the right moment when it will be profitable
2. Call the harvest

### How to call

To harvest, you call harvester.harvestAndSwap(strategyAddress, rewardTo).

The harvester address and available strategy addresses can be found in the strategy tab of the OUSD [contract registry](https://docs.ousd.com/smart-contracts/registry) docs. There are multiple strategies. Only some strategies may be active at any given time.

The rewardTo address is the account that will receive the USDT funds as a reward for calling the function - use your own address for it.


### Harvest ABI

```
[{
"inputs": [
{
"internalType": "address",
"name": "_strategyAddr",
"type": "address"
},
{
"internalType": "address",
"name": "_rewardTo",
"type": "address"
}
],
"name": "harvestAndSwap",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}]
```

### Support

OUSD has a [guide on calling this](https://docs.ousd.com/guides/incentivized-harvesting-guide) in the docs.

If you have a question, feel free to contact a developer in the Orign Dollar discussion channel in the [Origin Protocol Discord](https://discord.gg/w7kEuJs7N2).