-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from astrodevs-labs/docs
Docs
- Loading branch information
Showing
28 changed files
with
910 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Publish Retype powered website to GitHub Pages | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- docs/**/* | ||
|
||
jobs: | ||
publish: | ||
name: Publish to retype branch | ||
|
||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: retypeapp/action-build@latest | ||
with: | ||
config: docs/retype.yml | ||
|
||
- uses: retypeapp/action-github-pages@latest | ||
with: | ||
update-branch: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
|
||
# Overview | ||
|
||
![Logo](./assets/logoFull.png) | ||
|
||
|
||
Tholgar is a DeFi protocol that build products on top of other DeFi protocol enabling users to gain higher yield than alone. | ||
|
||
We empower synergy with Paladin Vote stakeholders to build products that will benefit the whole ecosystem. | ||
|
||
Our first product is an auto-compounder built on top of Warlord. It will let anyone join a vault and gain higher and more optimized yield in a non custodial manner. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
input: . | ||
output: .retype | ||
url: https://docs.tholgar.xyz # Add your website address here | ||
branding: | ||
title: Tholgar | ||
label: Docs | ||
logo: assets/logo512.png | ||
footer: | ||
copyright: "© Copyright {{ year }}. All rights reserved." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
sidebar_position: 3 | ||
--- | ||
|
||
# Deposit | ||
|
||
Currently, two set of tokens can be deposited : WAR and AURA/CVX. The process is nearly the same for both sets. | ||
|
||
## Deposit WAR | ||
|
||
### Accessing WAR deposit | ||
|
||
The war deposit is the default option when the app is loaded. You can still retrieve it by selecting the deposit tab and selecting WAR token in the bottom-left dropdown. | ||
|
||
![WAR Deposit](../assets/WarDeposit.png) | ||
|
||
### Depositing | ||
|
||
#### Enter amount | ||
|
||
Enter the desired amount of WAR you wish to deposit and click the "Deposit" button. | ||
|
||
#### Approval | ||
|
||
A dialog will open by first asking you to approve the WAR spending (according to ERC-20 standards). | ||
You can select to approve only your deposit amount or approve the max spending to avoid this step on the following deposits. | ||
|
||
![Approve allowances](../assets/WarDeposit-Approve.png) | ||
|
||
#### Deposit | ||
|
||
You will then be prompted to sign the transaction to deposit. This is the final step. | ||
|
||
![Deposit](../assets/WarDeposit-Deposit.png) | ||
|
||
#### Verify | ||
|
||
The "Circulating Supply" and "War Locked" stats should be increased by your deposit amount. If it is not immediatly the case, try to refresh you page. | ||
|
||
![Deposited](../assets/WarDeposit-Deposited.png) | ||
|
||
|
||
## Deposit AURA/CVX | ||
### Accessing AURA/CVX deposit | ||
|
||
To access AURA/CVX deposit, you need to change the deposit token(s) by using the bottom-left dropdown in the deposit tab. | ||
|
||
![Aura/CVX deposit](../assets/AuraCvxDeposit.png) | ||
|
||
### Depositing | ||
|
||
#### Enter amount | ||
|
||
Enter the desired amount of AURA and/or CVX you wish to deposit and click the "Deposit" button. | ||
|
||
#### Approval | ||
|
||
A dialog will open by first asking you to approve the AURA and CVX spendings (according to ERC-20 standards). | ||
You can select to approve only your deposit amount or approve the max spending to avoid those step on the following deposits. | ||
|
||
![Approve AURA allowances](../assets/AuraCvxDeposit-ApproveAura.png) | ||
![Approve CVX allowances](../assets/AuraCvxDeposit-ApproveCvx.png) | ||
|
||
#### Deposit | ||
|
||
You will then be prompted to sign the transaction to deposit. This is the final step. | ||
|
||
![Deposit](../assets/AuraCvxDeposit-Deposit.png) | ||
|
||
#### Verify | ||
|
||
The "Circulating Supply" and "War Locked" stats should be increased by your deposit amounts wheighted by the current ratios. If it is not immediatly the case, try to refresh you page. | ||
|
||
![Deposited](../assets/AuraCvxDeposit-Deposited.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Overview | ||
|
||
## What is Warlord ? | ||
|
||
Warlord is an index of governance tokens which gains yield and that will auto compound some rewards into WAR + optimize the overall yield with an auto voter on most rewarding vote incentives. You can read more about it [here](https://doc.paladin.vote/warlord/overview). | ||
|
||
## What is the Warlord Vault ? | ||
|
||
It is a product built by Tholgar team. This is an auto-compounder built on top of Warlord. It will let anyone join a vault and gain higher and more optimized yield in a non custodial manner. | ||
|
||
All vote incentives will be claimed every week and auto-compounded into the vault gaining even more yield. | ||
|
||
It uses the ERC4626 standard to follow the industry standart developped by yearn to enable more composability with other protocols. | ||
|
||
## Addresses | ||
|
||
- Vault: [0x188cA46Aa2c7ae10C14A931512B62991D5901453](https://etherscan.io/address/0x188ca46aa2c7ae10c14a931512b62991d5901453) | ||
- Zap: [0x0598c652eEB0F95137Af02f32022005139453744](https://etherscan.io/address/0x0598c652eeb0f95137af02f32022005139453744) | ||
- Swapper: [0x4247d145049B426d39f19F41555137D9cB154B99](https://etherscan.io/address/0x4247d145049b426d39f19f41555137d9cb154b99) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
sidebar_position: 5 | ||
--- | ||
|
||
# Redeem | ||
|
||
To redeem in AURA/CVX, you will first have to withdraw your tWAR into WAR tokens ([see how](withdraw.md)). | ||
|
||
Once you have WAR tokens in your wallet, you will need to go to Paladin's Warlord app to initiate the reddem process. | ||
|
||
The instructions can be found here <https://doc.paladin.vote/warlord/redeeming-war> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,178 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Swapper | ||
|
||
This is an contract that will handle all of the swaps for the vault. So far it will use an router to swap any tokens and send them back to the sender. It is set as another contract to be able to change it in the future if the paradigm of router change drastically. It is meant to be used in a push / pull manner with the **swap** function. | ||
|
||
|
||
## State Variables | ||
### swapRouter | ||
Dex/aggregaor router to call to perform swaps | ||
|
||
|
||
```solidity | ||
address public swapRouter; | ||
``` | ||
|
||
|
||
### tokenTransferAddress | ||
Address to allow to swap tokens | ||
|
||
|
||
```solidity | ||
address public tokenTransferAddress; | ||
``` | ||
|
||
|
||
### vault | ||
Address of the ERC4626 vault | ||
|
||
|
||
```solidity | ||
address public vault; | ||
``` | ||
|
||
|
||
## Functions | ||
### onlyVault | ||
|
||
|
||
```solidity | ||
modifier onlyVault(); | ||
``` | ||
|
||
### constructor | ||
|
||
|
||
```solidity | ||
constructor(address initialOwner, address initialSwapRouter, address initialTokenTransferAddress) | ||
Owned2Step(initialOwner); | ||
``` | ||
|
||
### setSwapRouter | ||
|
||
Set the dex/aggregator router to call to perform swaps | ||
|
||
|
||
```solidity | ||
function setSwapRouter(address newSwapRouter) external onlyOwner; | ||
``` | ||
**Parameters** | ||
|
||
|Name|Type|Description| | ||
|----|----|-----------| | ||
|`newSwapRouter`|`address`|address of the router| | ||
|
||
|
||
### setTokenTransferAddress | ||
|
||
Set the token proxy address to allow to swap tokens | ||
|
||
|
||
```solidity | ||
function setTokenTransferAddress(address newTokenTransferAddress) external onlyOwner; | ||
``` | ||
**Parameters** | ||
|
||
|Name|Type|Description| | ||
|----|----|-----------| | ||
|`newTokenTransferAddress`|`address`|address of the token proxy| | ||
|
||
|
||
### setVault | ||
|
||
Set the vault address | ||
|
||
|
||
```solidity | ||
function setVault(address newVault) external onlyOwner; | ||
``` | ||
**Parameters** | ||
|
||
|Name|Type|Description| | ||
|----|----|-----------| | ||
|`newVault`|`address`|address of the vault| | ||
|
||
|
||
### recoverERC20 | ||
|
||
Recover ERC2O tokens in the contract | ||
|
||
*Recover ERC2O tokens in the contract* | ||
|
||
|
||
```solidity | ||
function recoverERC20(address token) external onlyOwner returns (bool); | ||
``` | ||
**Parameters** | ||
|
||
|Name|Type|Description| | ||
|----|----|-----------| | ||
|`token`|`address`|Address of the ERC2O token| | ||
|
||
**Returns** | ||
|
||
|Name|Type|Description| | ||
|----|----|-----------| | ||
|`<none>`|`bool`|bool: success| | ||
|
||
|
||
### swap | ||
|
||
Swap tokens using the router/aggregator | ||
|
||
*The calldatas should set the recipient of the tokens to the vault* | ||
|
||
|
||
```solidity | ||
function swap(address[] calldata tokens, bytes[] calldata callDatas) external onlyVault; | ||
``` | ||
**Parameters** | ||
|
||
|Name|Type|Description| | ||
|----|----|-----------| | ||
|`tokens`|`address[]`|array of tokens to swap| | ||
|`callDatas`|`bytes[]`|array of bytes to call the router/aggregator| | ||
|
||
|
||
### _performRouterSwap | ||
|
||
Perform the swap using the router/aggregator | ||
|
||
|
||
```solidity | ||
function _performRouterSwap(bytes calldata callData) internal; | ||
``` | ||
**Parameters** | ||
|
||
|Name|Type|Description| | ||
|----|----|-----------| | ||
|`callData`|`bytes`|bytes to call the router/aggregator| | ||
|
||
|
||
## Events | ||
### SwapRouterUpdated | ||
Event emitted when the swap router is updated | ||
|
||
|
||
```solidity | ||
event SwapRouterUpdated(address oldSwapRouter, address newSwapRouter); | ||
``` | ||
|
||
### TokenTransferAddressUpdated | ||
Event emitted when the token proxy is updated | ||
|
||
|
||
```solidity | ||
event TokenTransferAddressUpdated(address oldTokenTransferAddress, address newTokenTransferAddress); | ||
``` | ||
|
||
### VaultUpdated | ||
Event emitted when the vault is updated | ||
|
||
|
||
```solidity | ||
event VaultUpdated(address oldVault, address newVault); | ||
``` |
Oops, something went wrong.