Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2704a67
Fixes after review
viatrix Feb 21, 2025
3a00493
deposit(amount)
viatrix Feb 21, 2025
5f80a56
Use new deposit interface
lastperson Feb 21, 2025
d5f7894
Fix tests
viatrix Feb 21, 2025
214f603
Update deposit and withdraw
viatrix Feb 23, 2025
c92021a
Add pause for borrowing
viatrix Feb 23, 2025
5ec11f8
Add Pausable
viatrix Feb 24, 2025
73193dc
Remove upgradeability
viatrix Feb 24, 2025
d4b9d5b
Fix lint
viatrix Feb 24, 2025
4904505
Update LiquidityPool
viatrix Feb 25, 2025
dee5cb1
Update Rebalancer with multiple local pools support
lastperson Feb 25, 2025
a8bdda4
Add BorrowAndSwap
viatrix Feb 25, 2025
be08e32
Merge branch 'fix-liq-pool' of https://github.com/sprintertech/sprint…
viatrix Feb 25, 2025
3a4cc22
Update signature for borrowAndSwap
viatrix Feb 25, 2025
c9c34fe
Fix lint
viatrix Feb 25, 2025
a0e4bd9
Add LiquidityPoolBase and refactor
lastperson Feb 26, 2025
fb869d1
Fix deploy
lastperson Feb 26, 2025
fe0974d
Deploy LiquidityPoolBase in networks without Aave
lastperson Feb 26, 2025
84301e7
Add pauser role to deploy
lastperson Feb 26, 2025
b57cca0
Fix AAVE pool deploy params order
lastperson Feb 26, 2025
5de2bb0
Add tests for liq pools
viatrix Feb 26, 2025
eb19aaf
Fix test
viatrix Feb 27, 2025
bc6bc13
Increase multiplier precision in mining
lastperson Feb 27, 2025
adde2ee
Merge branch 'main' into fix-liq-pool
lastperson Feb 27, 2025
92ef954
Rename pools
lastperson Feb 27, 2025
96b0555
Remove fill params from borrow and swap sig
lastperson Feb 27, 2025
013fbfa
Always include caller in the MPC signature
lastperson Feb 27, 2025
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
9 changes: 5 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ ADMIN=
ADJUSTER=
# Deposits to Liquidity Hub are only allowed till this limit is reached.
ASSETS_LIMIT=
# Liquidity mining tiers. Multiplier will be divided by 100. So 175 will result in 1.75x.
# Liquidity mining tiers. Multiplier will be divided by 1000,000,000. So 1750000000 will result in 1.75x.
# There is no limit to the number of tiers, but has to be atleast one.
TIER_1_SECONDS=7776000
TIER_1_MULTIPLIER=30
TIER_1_MULTIPLIER=300000000
TIER_2_SECONDS=15552000
TIER_2_MULTIPLIER=80
TIER_2_MULTIPLIER=800000000
TIER_3_SECONDS=31104000
TIER_3_MULTIPLIER=170
TIER_3_MULTIPLIER=1666666667
# Rebalance caller.
REBALANCE_CALLER=
# Liquidity Pool parameters.
Expand All @@ -21,6 +21,7 @@ MIN_HEALTH_FACTOR=500
DEFAULT_LTV=20
MPC_ADDRESS=
WITHDRAW_PROFIT=
PAUSER=
# General deployment parameters.
DEPLOYER_PRIVATE_KEY=
VERIFY=false
Expand Down
2 changes: 1 addition & 1 deletion contracts/LiquidityHub.sol
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ contract LiquidityHub is ILiquidityHub, ERC4626Upgradeable, AccessControlUpgrade
SafeERC20.safeTransferFrom(IERC20(asset()), caller, address(LIQUIDITY_POOL), assets);
_mint(receiver, shares);
$.totalAssets += assets;
LIQUIDITY_POOL.deposit();
LIQUIDITY_POOL.deposit(assets);
emit Deposit(caller, receiver, assets, shares);
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/LiquidityMining.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
contract LiquidityMining is ERC20, Ownable {
using SafeERC20 for IERC20;

uint32 public constant MULTIPLIER_PRECISION = 100;
uint32 public constant MULTIPLIER_PRECISION = 1000000000;
IERC20 public immutable STAKING_TOKEN;

struct Tier {
Expand Down
Loading