@startuml
!theme bluegray

actor Alice
actor Dapper

Database AliceFUT

Database DapperFUT 

file Bid [
    fullfill.cdc
]

frame iouupdated [
    A.xx.IOU.IOURedeemed
    ---
    uuid: UInt64
    from: Address
    to: Address
    type: Type
    amount: UFix64
    validUntil: UFix64
    ---
    from: Bob
    to: Alice
    type: A.xx.FlowUtilityToken.Vault
    amount:110
]


card Vault [
        <b>A.xx.FlowUtilityCoin.Vault
        ---
        uuid:3
        type: FlowUtilityCoin
        amount:110
    ]


card NFT [
    <b>A.xx.Example.NFT
    ---
    uuid: 1
]

card Auction [
    <b>A.xx.Example.Auction
    ---
    uuid: 2
    start-price: 10
]

agent IOU [
    <b>A.xx.IOU.Vault
    ---
    let receiver: Cap<&{FT.Receiver}>
    var amount: UFix64
    let type: Type
    let sender:Address
    ---
    sender: Bob
    receiver: Alice Cap
    uuid:4
    amount: 110
    type: A.xx.FlowUtilityCoin
    validUntil: now+7days
]

Alice --> Bid : sign
Dapper -right-> Bid: sign

Bid -right-> Auction: fulfill bid
Auction -down-> IOU : redeem and \ndestroy IOU
Bid <-- Vault : withdraw
Vault <-- DapperFUT: from
Dapper --> DapperFUT : owns

IOU -down-> AliceFUT: send funds
AliceFUT -left-> DapperFUT: TokenForwarding

Auction --> NFT : item 

IOU -right-> iouupdated: emit
Alice --> NFT : owns

Alice --> AliceFUT: owns
@enduml
