AgToken
mint()
or burn()
in a StableMaster
contract. The StableMaster
contract then calls the AgToken
to issue or burn the tokens. These tokens are convertible against one of the collateral of the protocol at oracle value and with very small fees. It is possible to mint agTokens using for instance USDC and to use these agTokens to redeem DAI: the collateral that was used to mint the agTokens does not prevent holders to claim another collateral from the agToken.FlashLoan
contract may have minting right on the token, just like some VaultManager
contracts associated to the Borrowing Module.ERC20PermitUpgradeable
code.IAgToken
and ERC20PermitUpgradeable
. This contract is upgradeable.AgToken
contractsstableMaster
: Reference to the StableMaster
contract associated to this agToken.treasury
: Reference to the Treasury
contract associated to this agToken. This concerns AgTokens which can be minted from Angle Borrowing ModuleisMinter
: In the Borrowing Module, maps an address to whether it has the minting right on the AgToken
.onlyStableMaster()
has been defined to restrict access to some functions to just the stableMaster
.balanceOf()
, transfer()
, transferFrom()
, approve()
, totalSupply()
, etc.amount
token for the caller without giving collateral back. When calling this function, people should specify the poolManager
for which they want to decrease the stocksUsers
: this a way for the protocol to maintain healthy accounting variables.amount
: Amount to burnpoolManager
: Reference to the PoolManager
contract for which the stocksUsers
will need to be updatedBondingCurve
contract.account
: Account to burn on behalf ofamount
: Amount to burnpoolManager
: Reference to the PoolManager
contract for which the stocksUsers
will need to be updatedPoolManager
contract.amount
: Amount to burnStableMaster
contract. The StableMaster
will call these functions after having been requested to do so by a userStableMaster
contract mint agTokens, a VaultManager
, if initialized the FlashLoan
contract or a whitelisted address mint agTokensaccount
: Address to mint toamount
: Amount to mintamount
tokens from a burner
address. This method is to be called by any contract with a minting right on the AgToken
after being requested to do so by an address willing to burn tokens from its addressamount
: Amount of tokens to burnburner
: Address to burn fromamount
tokens from a burner
address after being asked to by sender
. This method is to be called by the StableMaster
contract or any contract with a minting right on the token after being requested to do so by a msg.sender
address willing to burn tokens from another sender
addresssender
and the burner
.amount
: Amount of tokens to burnburner
: Address to burn fromsender
: Address which requested the burn from burner
owner
: The owner of the fundsspender
: The spender of the fundsvalue
: The amount the spender
is permitted to usedeadline
: The deadline timestamp that the permit is valid. Use type(uint256).max
for no deadlinev
: Signature Parameterr
: Signature Parameters
: Signature ParameterTreasury
contract to perform some governance actions. Generally, the Treasury
will do so after being requested by governance.addMinter
: to grant the minter right to an address.removeMinter
: to remove the minter right to an address. A minter can self-revoke itself and the Treasury
cannot revoke the stableMaster
setTreasury
: to change the reference to the treasury contract