A distributed credit system using Solidity
A token issued upon stake and burned with the withdrawal of that stake
A token issued as a reward for on time payments of loans (no late fees)
A contract that tracks credit being issued and paid back to a user (externally).
A contract that allows a user to stake and get credit as a percentage of the stake (externally). The contract also allows for the withdraw of stakes given they are not in use as collateral for an active loan.
Deployed for testing.
Deployers Address: 0x60e1C4DfB97e920D6C227cff4a0f39C4B560224B
Contract | Address | Network |
---|---|---|
Finance Liquid Token | 0xcdAD459fEEE277DfEE22856D763feb55EdF963ba | Sepolia |
Finance Reward Token | 0xc962e4bdE44632caA916f0689904306E470ed93C | Sepolia |
Credit Line | 0x61f84f38575b73655cBa43bf1e9F3D4FC7a85332 | Sepolia |
Stake Lockup | 0x3D6DC33633F739321C1116506a2dDdf1C1b9B014 | Sepolia |
- Deploy liquid token and reward token
- Deploy credit line using the reward token address as a constructor arg
- Set owner of reward token as credit line contract
- Deploy Stake lockup using the credit line address and the liquid token address as the constructor args
- Set owner of liquid token as the stake lockup contract
- Stake Lockup contract requires deployment using optimization with 2k runs
There are 4 main parts to the service.
For loans to be granted, a stake must exist. This is because the loan amount is a function of this stake amount which is used as collateral.
If no active credit exists for a user then a user can withdraw the staked value held in the lockup contract. If there is active credit then the user can only withdraw the fraction of the stake required as collateral.
The credit calls can only be done via the owner of the contract. The reason for this is that a centralized application will handle the allocation of the credit since it can be credited in a multitude of different currencies not necessarily on a blockchain. This process should be done and confirmed before the credit is given in the centralized application.
The credit calls can only be done via the owner of the contract. The reason is because the user can pay back the loan using other currencioes not necessarily on a blockchain. The user should pay back loan amount (+ late fees if any) before this call is made.