Comment on page
Sweep coin
Gets the information about a minter. Returns 4 values:
1. boolean that represents if the minter is listed or not.
2. uint that represents the max mint amount.
3. uint that represents the minted amount
4. boolean that represents if the minter can mint or not.
function minters(address minter)
Returns true if the minter is listed in the minter list and if they have a mix amount above of zero.
function isValidMinter(address minter)
Fetches the current and the next target price.
function currentTargetPrice()
function nextTargetPrice()
Fetches the target price, that is used to peg the SWEEP price safely.
If periodTime is over, returns the nextTargetPrice, otherwise the currentTargetPrice.
function targetPrice()
Fetches the period's start time.
function periodStart()
Fetches the delta amount of interest rate to increase/decrease.
It has 6 decimals of precision. 1% = 10.000.
function stepValue()
Displays the total floating SWEEP (minted amount).
function totalSupply()
The most important action for Sweep governance is to control the list of Stabilizers that it funds. Each Stabilizer represents an asset, and a maximum allocation to that asset. Stabilizers should match the mission, liquidity requirements, and risk tolerance of SWEEP.
function addMinter(address minter, uint256 maxAmount)
- minter: Address to be added into minter list
- maxAmount: Max amount for mint
This is how to change the borrow limit or turn off borrowing
function setMinterMaxAmount(address minter, uint256 maxAmount)
- minter: Minter address
- maxAmount: Max mint amount to be changed
On/Off minting for a specific address.
function setMinterEnabled(address minter, bool enabled)
This is how to change transfer approver
function setTransferApprover(address approver)
approver: New contract address for transfer approving
This is how to change interest rate of SWEEP
function setInterestRate(int256 dailyRate, uint256 newPeriodStart)
dailyRate: Interest rate for SWEEP that be changed every day.
newPeriodStart: New period start time.
Sets the current target price and the next target price.
funciton setTargetPrice(uint256 newCurrentTargetPrice)
The value to increment/decrement the interest rate every time there is the interest rate is refreshed.
function setStepValue(int256 newStepValue)
This is how to pause transfer of SWEEP token
function pause()
This is how to unpause transfer of SWEEP token
function unpause()
Sets the treasury address
function setTreasury(address newTreasury)
Sets the balancer address
function setBalancer(address newBalancer)
Sweep code will be upgradeable during the beta period.
The SWEEP coin, Sweep.sol, is an upgradeable proxy contract. It can accept code upgrades from the contract owner.
The contract owner is controlled by protocol governance in the following way [describe]
Stabilizer code cannot be upgraded. The code for a Stabilizer represents a specific agreement between the protocol and a borrower. To change this agreement, the protocol and the borrower should create and fund a new Stabilizer. The protocol will then set the borrow limits to zero on the old Stabilizer and request redemption.
Other contracts can be upgraded by deploying new versions, and attaching the new versions to the Sweep.sol contract. This will help the protocol change the logic of the Balancer and the transfer permissions.
Last modified 3mo ago