Skip to content
This repository was archived by the owner on May 21, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f018a02
Merge pull request #130 from UnlockdFinance/development
0xadrii Feb 13, 2023
81f3be3
🔄 Upgrade mainnet: add Yearn
0xadrii Feb 13, 2023
0589d8c
🔄 Update interest rates address
0xadrii Feb 13, 2023
12dae73
fixes
0xadrii Jun 5, 2023
b84c57c
Tests and code fixed
fepvenancio Jun 5, 2023
0a11e38
Final tests
fepvenancio Jun 6, 2023
2610807
Removed convex and added the fixes
fepvenancio Jun 6, 2023
f79ffc9
fix: gap and constructor
fepvenancio Jun 8, 2023
856f01c
improvement: comments.
fepvenancio Jun 8, 2023
07091f5
improvement: comments libraries.
fepvenancio Jun 9, 2023
0b0d51d
improvements: final checks and optimizations
fepvenancio Jun 10, 2023
458d9d2
git actions
fepvenancio Jun 10, 2023
ef83e45
git actions
fepvenancio Jun 10, 2023
014bdc7
Tweaks and revision
0xadrii Jun 14, 2023
fe56655
Merge branch 'mainnet' into development
0xadrii Jun 14, 2023
e442129
Merge pull request #140 from UnlockdFinance/development
fepvenancio Jun 18, 2023
5b4fb8c
Merge branch 'development' of github.com:UnlockdFinance/unlockd into …
fepvenancio Jun 22, 2023
6b6f19f
improvement: adding tests for debtMarket with HF <1
fepvenancio Jun 23, 2023
585bf41
bug: debtMarket new tests shows a bug
fepvenancio Jun 23, 2023
5f55f3e
fix: changed balanceOf to weth and added approvals
fepvenancio Jun 23, 2023
e75c74d
fix: tests, still 3 tests failing
fepvenancio Jun 23, 2023
0f36474
fix: debtMarket tests fixed
fepvenancio Jun 26, 2023
3c35059
remove reservoir test
0xadrii Jun 26, 2023
929a175
Merge branch 'development' of github.com:UnlockdFinance/unlockd into …
fepvenancio Jun 27, 2023
f492e69
fix: Tests, most raicing conditions fixed
fepvenancio Jun 27, 2023
c4e6aac
Merge pull request #141 from UnlockdFinance/development
0xadrii Jul 3, 2023
2e84836
Mainnet deployment + audits
0xadrii Jul 3, 2023
6c9585f
fix: changed lockey discount to only happen if price - discount > deb…
fepvenancio Aug 3, 2023
a20a455
fix: test.txt deleted
fepvenancio Aug 3, 2023
a04fcf1
small fixes
0xadrii Aug 3, 2023
9f1ffc8
fix: tests for buyout
fepvenancio Aug 4, 2023
cbea22e
fix: removed test.txt, added some console logs on 2 tests
fepvenancio Aug 4, 2023
9b353c1
Merge pull request #142 from UnlockdFinance/buyout_price
fepvenancio Aug 4, 2023
9f6337e
Logic for buyout changed
fepvenancio Oct 11, 2023
45b59bd
tests fixed, still 3 tests failing
fepvenancio Oct 11, 2023
708436d
tests fixed for buyout
fepvenancio Oct 12, 2023
c0ffbeb
Tests and punkgateway fixed
fepvenancio Oct 12, 2023
781f9a6
Merge pull request #146 from UnlockdFinance/liquidateLogic_buyout
0xadrii Oct 12, 2023
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
5 changes: 3 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ jobs:
- name: Test
run: npm run test
env:
FORK: goerli
RPC_ENDPOINT: https://eth-goerli.g.alchemy.com/v2/y4KsllNNT0Wcjb9hVb3NwpJFqh8k185q
FORK: main
FORK_BLOCK_NUMBER: 16784435
RPC_ENDPOINT: https://eth-mainnet.g.alchemy.com/v2/y4KsllNNT0Wcjb9hVb3NwpJFqh8k185q
27 changes: 1 addition & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,31 +149,6 @@ yarn compile
| main:print-config | Prints all addresses and configuration set in Ethereum mainnet deployed contracts
</details>

## Unlockd tasks
Unlockd tasks are a specific set of tasks that allow direct interaction with the currently deployed contracts. They require a set of params to be passed as flags in the command, which will be translated to be the params passed to the function to be executed. All params are explained in the definition of each task. These set of tasks can be run in terminal by using Hardhat commands. Network specification is fetched from the RPC_ENDPOINT environment variable. As an example, we'll try to run a 1 WETH deposit into the LendPool. The `deposit` task takes three params (`amount`, `reservename`, and `to`), and the task name is `lendpool:deposit`, so the command to run will be:

```bash
npx hardhat lendpool:deposit --amount 100000000000000000 --reservename WETH --to 0x1a470e9916f3dFF8E268A69A39fa2E9F7B954927
```
<details>
<summary>Show Unlockd tasks</summary>

| Task | Description |
| ------------- | ------------- |
| lendpool:deposit | Deposits an amount in the LendPool |
| lendpool:withdraw | Withdraws an amount from the LendPool |
| configurator:configureNftAsCollateral | Sets the configuration parameters to the specified NFT |
| lendpool:borrow | Borrows an amount of a specific reserve from unlockd, depositing an NFT as collateral |
| lendpool:getdebtdata | Returns de debt data for a given loan |
| lendpool:getauctiondata | Returns de auction data for a given loan that is in auction state |
| lendpool:repay | Repays a specified amount from a previous borrow to the LendPool |
| lendpool:redeem | Redeems a specific amount from an auctioned NFT and pays a bid fine |
| lendpool:auction | Places a bid for an unhealthy position in the protocol |
| lendpool:liquidate | Liquidates an unhealthy position, transferring the NFT to the liquidator |
| lendpool:liquidateNFTX | Liquidates an unhealthy position in NFTX market |

</details>

# 🚀 Deployments

For deploying Unlockd Protocol, you can use the available scripts located at `package.json`. For a complete list, run `npm run` to see all the tasks.
Expand Down Expand Up @@ -209,7 +184,7 @@ npx hardhat --network localhost "dev:deploy-mock-reserves"
npx hardhat --network localhost "dev:deploy-mock-nfts"
# then update pool config nft address

npx hardhat --network localhost "dev:deploy-mock-aggregators" --pool Unlockd
npx hardhat --network localhost "dev:deploy-all-mock-aggregators" --pool Unlockd
# then update pool config reserve aggregators address

npx hardhat --network localhost "dev:deploy-mock-unft-registry" --pool Unlockd
Expand Down
Loading