0 txs
33 calls
constructor
constructor()
functions
allowance
viewfunction allowance(address owner, address spender) view returns (uint256)
balanceOf
viewfunction balanceOf(address account) view returns (uint256)
decimals
viewfunction decimals() view returns (uint8)
name
viewfunction name() view returns (string)
owner
viewfunction owner() view returns (address)
paused
viewfunction paused() view returns (bool)
swapFee
viewfunction swapFee() view returns (uint16)
symbol
viewfunction symbol() view returns (string)
totalSupply
viewfunction totalSupply() view returns (uint256)
usad
viewfunction usad() view returns (address)
usdc
viewfunction usdc() view returns (address)
addLiquidity
nonpayablefunction addLiquidity(uint256 amount) returns (uint256 lpMinted)
addUSADLiquidity
nonpayablefunction addUSADLiquidity(uint256 usadAmount) returns (uint256 lpMinted)
addUSDCLiquidity
nonpayablefunction addUSDCLiquidity(uint256 usdcAmount) returns (uint256 lpMinted)
approve
nonpayablefunction approve(address spender, uint256 value) returns (bool)
initialize
nonpayablefunction initialize(address _usad, address _usdc)
pause
nonpayablefunction pause()
removeLiquidity
nonpayablefunction removeLiquidity(uint256 lpAmount) returns (uint256 usadReturned, uint256 usdcReturned)
renounceOwnership
nonpayablefunction renounceOwnership()
setSwapFee
nonpayablefunction setSwapFee(uint16 newFee)
swapExactUSADToUSDC
nonpayablefunction swapExactUSADToUSDC(uint256 usadAmount)
swapExactUSDCToUSAD
nonpayablefunction swapExactUSDCToUSAD(uint256 usdcAmount)
transfer
nonpayablefunction transfer(address to, uint256 value) returns (bool)
transferFrom
nonpayablefunction transferFrom(address from, address to, uint256 value) returns (bool)
transferOwnership
nonpayablefunction transferOwnership(address newOwner)
unpause
nonpayablefunction unpause()
events
Approval
event Approval(address indexed owner, address indexed spender, uint256 value)
FeeUpdated
event FeeUpdated(uint256 oldFee, uint256 newFee)
Initialized
event Initialized(uint64 version)
LiquidityAdded
event LiquidityAdded(address indexed user, uint256 usadAmount, uint256 usdcAmount, uint256 lpTokens)
LiquidityRemoved
event LiquidityRemoved(address indexed user, uint256 lpTokens, uint256 usadAmount, uint256 usdcAmount)
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
Paused
event Paused(address account)
Swapped
event Swapped(address indexed user, address indexed inToken, uint256 inAmount, uint256 outAmount)
Transfer
event Transfer(address indexed from, address indexed to, uint256 value)
Unpaused
event Unpaused(address account)
errors
AddressEmptyCode
error AddressEmptyCode(address target)
AddressInsufficientBalance
error AddressInsufficientBalance(address account)
EnforcedPause
error EnforcedPause()
ERC20InsufficientAllowance
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed)
ERC20InsufficientBalance
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed)
ERC20InvalidApprover
error ERC20InvalidApprover(address approver)
ERC20InvalidReceiver
error ERC20InvalidReceiver(address receiver)
ERC20InvalidSender
error ERC20InvalidSender(address sender)
ERC20InvalidSpender
error ERC20InvalidSpender(address spender)
ExpectedPause
error ExpectedPause()
FailedInnerCall
error FailedInnerCall()
InvalidInitialization
error InvalidInitialization()
NotInitializing
error NotInitializing()
OwnableInvalidOwner
error OwnableInvalidOwner(address owner)
OwnableUnauthorizedAccount
error OwnableUnauthorizedAccount(address account)
SafeERC20FailedOperation
error SafeERC20FailedOperation(address token)
creation bytecode
0x608060405234801561001057600080fd5b5061001961001e565b6100d0565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161561006e5760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146100cd5780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b611a8f806100df6000396000f3fe608060405234801561001057600080fd5b506004361061016e5760003560e01c80635c975abb116100ce5780639c8f9f23116100875780639c8f9f23146102d35780639cd05bfd146102fb5780639eabbc431461030e578063a9059cbb14610321578063dd62ed3e14610334578063dfd1384f14610347578063f2fde38b1461035a57600080fd5b80635c975abb1461029857806370a08231146102a0578063715018a6146102b35780638456cb59146102bb5780638da5cb5b146102c357806395d89b41146102cb57600080fd5b8063313ce5671161012b578063313ce567146102015780633c14daa3146102105780633e413bee146102365780633f4ba83a14610249578063485cc9551461025157806351c6590a1461026457806354cf2aeb1461027757600080fd5b8063022d295314610173578063033e62381461019957806306fdde03146101ae578063095ea7b3146101c357806318160ddd146101e657806323b872dd146101ee575b600080fd5b610186610181366004611674565b61036d565b6040519081526020015b60405180910390f35b6101ac6101a7366004611674565b610445565b005b6101b6610553565b60405161019091906116b1565b6101d66101d1366004611700565b6105f4565b6040519015158152602001610190565b61018661060e565b6101d66101fc36600461172a565b610623565b60405160128152602001610190565b600054610229906201000090046001600160a01b031681565b6040516101909190611766565b600154610229906001600160a01b031681565b6101ac610649565b6101ac61025f36600461177a565b61065b565b610186610272366004611674565b610806565b6000546102859061ffff1681565b60405161ffff9091168152602001610190565b6101d66108dc565b6101866102ae3660046117ad565b6108f1565b6101ac61091c565b6101ac61092e565b61022961093e565b6101b661096c565b6102e66102e1366004611674565b610989565b60408051928352602083019190915201610190565b6101ac6103093660046117c8565b610b91565b61018661031c366004611674565b610c46565b6101d661032f366004611700565b610d0b565b61018661034236600461177a565b610d19565b6101ac610355366004611674565b610d55565b6101ac6103683660046117ad565b610e5f565b6000610377610e9d565b60028210156103d95760405162461bcd60e51b8152602060048201526024808201527f466978656452617465506f6f6c3a205553414420616d6f756e7420746f6f20736044820152631b585b1b60e21b60648201526084015b60405180910390fd5b6000546103f7906201000090046001600160a01b0316333085610ec3565b610402600283611802565b905061040e3382610f30565b60408051838152600060208201529081018290523390600080516020611a3a833981519152906060015b60405180910390a2919050565b61044d610e9d565b6000811161049d5760405162461bcd60e51b815260206004820152601f60248201527f466978656452617465506f6f6c3a205a65726f205553444320616d6f756e740060448201526064016103d0565b60008054612710906104b39061ffff1684611824565b6104bd9190611802565b905060006104cb828461183b565b6001549091506104e6906001600160a01b0316333086610ec3565b600054610503906201000090046001600160a01b03163383610f6a565b60015460408051858152602081018490526001600160a01b039092169133917fa078c4190abe07940190effc1846be0ccf03ad6007bc9e93f9697d0b460befbb91015b60405180910390a3505050565b6060600061055f610fa0565b90508060030180546105709061184e565b80601f016020809104026020016040519081016040528092919081815260200182805461059c9061184e565b80156105e95780601f106105be576101008083540402835291602001916105e9565b820191906000526020600020905b8154815290600101906020018083116105cc57829003601f168201915b505050505091505090565b600033610602818585610fc4565b60019150505b92915050565b600080610619610fa0565b6002015492915050565b600033610631858285610fd1565b61063c85858561101e565b60019150505b9392505050565b61065161107d565b6106596110af565b565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156106a15750825b905060008267ffffffffffffffff1660011480156106be5750303b155b9050811580156106cc575080155b156106ea5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561071457845460ff60401b1916600160401b1785555b6107616040518060400160405280600c81526020016b0555341442f55534443204c560a41b815250604051806040016040528060078152602001660555341442d4c560cc1b815250611106565b610769611118565b61077233611128565b60008054600180546001600160a01b038a81166001600160a01b03199092169190911790915561ffff19908a166201000002166001600160b01b031990911617603217905583156107fd57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b6000610810610e9d565b8160000361086c5760405162461bcd60e51b8152602060048201526024808201527f466978656452617465506f6f6c3a205a65726f206c697175696469747920616d6044820152631bdd5b9d60e21b60648201526084016103d0565b60005461088a906201000090046001600160a01b0316333085610ec3565b6001546108a2906001600160a01b0316333085610ec3565b50806108ae3382610f30565b60408051838152602081018490529081018290523390600080516020611a3a83398151915290606001610438565b6000806108e7611139565b5460ff1692915050565b6000806108fc610fa0565b6001600160a01b0390931660009081526020939093525050604090205490565b61092461107d565b610659600061115d565b61093661107d565b6106596111ce565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b60606000610978610fa0565b90508060040180546105709061184e565b600080610994610e9d565b826000036109e45760405162461bcd60e51b815260206004820152601d60248201527f466978656452617465506f6f6c3a205a65726f204c5020616d6f756e7400000060448201526064016103d0565b60006109ee61060e565b6000546040516370a0823160e01b8152919250829186916201000090046001600160a01b0316906370a0823190610a29903090600401611766565b602060405180830381865afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190611888565b610a749190611824565b610a7e9190611802565b6001546040516370a0823160e01b8152919450829186916001600160a01b0316906370a0823190610ab3903090600401611766565b602060405180830381865afa158015610ad0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af49190611888565b610afe9190611824565b610b089190611802565b9150610b143385611215565b600054610b31906201000090046001600160a01b03163385610f6a565b600154610b48906001600160a01b03163384610f6a565b604080518581526020810185905290810183905233907f1dc8bb69df2b8e91fbdcbfcf93d951b3f0000f085a95fe3f7946d6161439245d9060600160405180910390a250915091565b610b9961107d565b6101f48161ffff161115610bef5760405162461bcd60e51b815260206004820152601b60248201527f466978656452617465506f6f6c3a2046656520746f6f2068696768000000000060448201526064016103d0565b6000805461ffff83811661ffff1983168117909355604080519190921680825260208201939093527f528d9479e9f9889a87a3c30c7f7ba537e5e59c4c85a37733b16e57c62df61302910160405180910390a15050565b6000610c50610e9d565b6002821015610cad5760405162461bcd60e51b8152602060048201526024808201527f466978656452617465506f6f6c3a205553444320616d6f756e7420746f6f20736044820152631b585b1b60e21b60648201526084016103d0565b600154610cc5906001600160a01b0316333085610ec3565b610cd0600283611802565b9050610cdc3382610f30565b6040805160008152602081018490529081018290523390600080516020611a3a83398151915290606001610438565b60003361060281858561101e565b600080610d24610fa0565b6001600160a01b03948516600090815260019190910160209081526040808320959096168252939093525050205490565b610d5d610e9d565b60008111610dad5760405162461bcd60e51b815260206004820152601f60248201527f466978656452617465506f6f6c3a205a65726f205553414420616d6f756e740060448201526064016103d0565b6000805461271090610dc39061ffff1684611824565b610dcd9190611802565b90506000610ddb828461183b565b600054909150610dfc906201000090046001600160a01b0316333086610ec3565b600154610e13906001600160a01b03163383610f6a565b6000546040805185815260208101849052620100009092046001600160a01b03169133917fa078c4190abe07940190effc1846be0ccf03ad6007bc9e93f9697d0b460befbb9101610546565b610e6761107d565b6001600160a01b038116610e91576000604051631e4fbdf760e01b81526004016103d09190611766565b610e9a8161115d565b50565b610ea56108dc565b156106595760405163d93c066560e01b815260040160405180910390fd5b6040516001600160a01b038481166024830152838116604483015260648201839052610f2a9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505061124b565b50505050565b6001600160a01b038216610f5a57600060405163ec442f0560e01b81526004016103d09190611766565b610f66600083836112a5565b5050565b6040516001600160a01b03838116602483015260448201839052610f9b91859182169063a9059cbb90606401610ef8565b505050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0090565b610f9b83838360016113cd565b6000610fdd8484610d19565b90506000198114610f2a578181101561100f57828183604051637dc7a0d960e11b81526004016103d0939291906118a1565b610f2a848484840360006113cd565b6001600160a01b038316611048576000604051634b637e8f60e11b81526004016103d09190611766565b6001600160a01b03821661107257600060405163ec442f0560e01b81526004016103d09190611766565b610f9b8383836112a5565b3361108661093e565b6001600160a01b031614610659573360405163118cdaa760e01b81526004016103d09190611766565b6110b76114b2565b60006110c1611139565b805460ff1916815590507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516110fb9190611766565b60405180910390a150565b61110e6114d7565b610f668282611520565b6111206114d7565b610659611551565b6111306114d7565b610e9a8161156e565b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330090565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6111d6610e9d565b60006111e0611139565b805460ff1916600117815590507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110ee3390565b6001600160a01b03821661123f576000604051634b637e8f60e11b81526004016103d09190611766565b610f66826000836112a5565b60006112606001600160a01b03841683611576565b9050805160001415801561128557508080602001905181019061128391906118c2565b155b15610f9b5782604051635274afe760e01b81526004016103d09190611766565b60006112af610fa0565b90506001600160a01b0384166112de57818160020160008282546112d391906118e4565b9091555061133d9050565b6001600160a01b0384166000908152602082905260409020548281101561131e5784818460405163391434e360e21b81526004016103d0939291906118a1565b6001600160a01b03851660009081526020839052604090209083900390555b6001600160a01b03831661135b57600281018054839003905561137a565b6001600160a01b03831660009081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113bf91815260200190565b60405180910390a350505050565b60006113d7610fa0565b90506001600160a01b03851661140357600060405163e602df0560e01b81526004016103d09190611766565b6001600160a01b03841661142d576000604051634a1406b160e11b81526004016103d09190611766565b6001600160a01b038086166000908152600183016020908152604080832093881683529290522083905581156114ab57836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040516114a291815260200190565b60405180910390a35b5050505050565b6114ba6108dc565b61065957604051638dfc202b60e01b815260040160405180910390fd5b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661065957604051631afcd79f60e31b815260040160405180910390fd5b6115286114d7565b6000611532610fa0565b905060038101611542848261195d565b5060048101610f2a838261195d565b6115596114d7565b6000611563611139565b805460ff1916905550565b610e676114d7565b60606106428383600084600080856001600160a01b0316848660405161159c9190611a1d565b60006040518083038185875af1925050503d80600081146115d9576040519150601f19603f3d011682016040523d82523d6000602084013e6115de565b606091505b50915091506115ee8683836115f8565b9695505050505050565b60608261160d576116088261164b565b610642565b815115801561162457506001600160a01b0384163b155b156116445783604051639996b31560e01b81526004016103d09190611766565b5080610642565b80511561165b5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60006020828403121561168657600080fd5b5035919050565b60005b838110156116a8578181015183820152602001611690565b50506000910152565b60208152600082518060208401526116d081604085016020870161168d565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146116fb57600080fd5b919050565b6000806040838503121561171357600080fd5b61171c836116e4565b946020939093013593505050565b60008060006060848603121561173f57600080fd5b611748846116e4565b9250611756602085016116e4565b9150604084013590509250925092565b6001600160a01b0391909116815260200190565b6000806040838503121561178d57600080fd5b611796836116e4565b91506117a4602084016116e4565b90509250929050565b6000602082840312156117bf57600080fd5b610642826116e4565b6000602082840312156117da57600080fd5b813561ffff8116811461064257600080fd5b634e487b7160e01b600052601160045260246000fd5b60008261181f57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417610608576106086117ec565b81810381811115610608576106086117ec565b600181811c9082168061186257607f821691505b60208210810361188257634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561189a57600080fd5b5051919050565b6001600160a01b039390931683526020830191909152604082015260600190565b6000602082840312156118d457600080fd5b8151801515811461064257600080fd5b80820180821115610608576106086117ec565b634e487b7160e01b600052604160045260246000fd5b601f821115610f9b576000816000526020600020601f850160051c810160208610156119365750805b601f850160051c820191505b8181101561195557828155600101611942565b505050505050565b815167ffffffffffffffff811115611977576119776118f7565b61198b81611985845461184e565b8461190d565b602080601f8311600181146119c057600084156119a85750858301515b600019600386901b1c1916600185901b178555611955565b600085815260208120601f198616915b828110156119ef578886015182559484019460019091019084016119d0565b5085821015611a0d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008251611a2f81846020870161168d565b919091019291505056fe64b83944e79c3ce8d4c297411de637c3e102d064677aac0c163976ebdcd6f50ea2646970667358221220d04857906dbfa972e2f671e5096de7a3d0d64a53db06102df70bce519e9895fa64736f6c63430008180033