Created
March 20, 2023 18:41
-
-
Save sekrystal/7a11bc8f5c5141c7586facf7d7fa67d1 to your computer and use it in GitHub Desktop.
Defi Lending Concepts 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.8.13; | |
function bark(bytes32 ilk, address urn, address kpr) external returns (uint256 id) { | |
require(live == 1, "Dog/not-live"); | |
(uint256 ink, uint256 art) = vat.urns(ilk, urn); | |
Ilk memory milk = ilks[ilk]; | |
uint256 dart; | |
uint256 rate; | |
uint256 dust; | |
{ | |
uint256 spot; | |
(,rate, spot,, dust) = vat.ilks(ilk); | |
require(spot > 0 && mul(ink, spot) < mul(art, rate), "Dog/not-unsafe"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment