Leverager is a defi protocol for margin positions for EVM chains
Users deposit funds to leverager as margin rather than collateral, and create margined position for LPing, swapping, staking, etc. An endogenous token is created to provide leveraged portion of the position as well as serve as the unit of account.
Each type of asset is given liquidation ratio, and together produce the liquidation threshold of the position. Should the value of the position falls below this threshold, arbitrageurs are incentivized to liquidation it for profit.
Leverager is build with Foundry for any EVM chains. It rely on an external oracle for price information, and Uniswap is used for liquidation and repayment of debt. A custom data structure is created for tracking position's asset, liquidation threshold, and other info. ERC20 and 721 are implemented for the endogenous debt token and position token respectively.